asp.net-mvc
tags question: http://stackoverflow.com/q/25245976
tags question: http://stackoverflow.com/q/25377640
tags question: http://stackoverflow.com/q/25317306
tags question: http://stackoverflow.com/q/25303000
tags question: http://stackoverflow.com/q/25280809
tags question: http://stackoverflow.com/q/25246211
tags question: http://stackoverflow.com/q/25297255
tags question: http://stackoverflow.com/q/25338495
tags question: http://stackoverflow.com/q/25240719
tags question: http://stackoverflow.com/q/25325224
tags question: http://stackoverflow.com/q/25338529
tags question: http://stackoverflow.com/q/25237935
tags question: http://stackoverflow.com/q/25290019
tags question: http://stackoverflow.com/q/25239221
tags question: http://stackoverflow.com/q/25281966
tags question: http://stackoverflow.com/q/25241561
tags question: http://stackoverflow.com/q/25281577
tags question: http://stackoverflow.com/q/25278489
tags question: http://stackoverflow.com/q/25282177
tags question: http://stackoverflow.com/q/25230599
tags question: http://stackoverflow.com/q/25364698
tags question: http://stackoverflow.com/q/25270719
tags question: http://stackoverflow.com/q/25285165
tags question: http://stackoverflow.com/q/25310125
tags question: http://stackoverflow.com/q/25311447
tags question: http://stackoverflow.com/q/25280758
tags question: http://stackoverflow.com/q/25310025
tags question: http://stackoverflow.com/q/25295762
tags question: http://stackoverflow.com/q/25334986
tags question: http://stackoverflow.com/q/25279920
tags question: http://stackoverflow.com/q/25258899
tags question: http://stackoverflow.com/q/25260962
tags question: http://stackoverflow.com/q/25310871
tag name: asp.net-mvc
tags question: http://stackoverflow.com/q/25327711
tags question: http://stackoverflow.com/q/25330193
tags question: http://stackoverflow.com/q/25314430
tags question: http://stackoverflow.com/q/25259853
tags question: http://stackoverflow.com/q/25270972
tags question: http://stackoverflow.com/q/25231089
tags question: http://stackoverflow.com/q/25265242
tags question: http://stackoverflow.com/q/25274727
tags question: http://stackoverflow.com/q/25281176
tags question: http://stackoverflow.com/q/25358877
tags question: http://stackoverflow.com/q/25333190
type: Tag
tags question: http://stackoverflow.com/q/25304610
tags question: http://stackoverflow.com/q/25279221
tags question: http://stackoverflow.com/q/25329998
tags question: http://stackoverflow.com/q/25262247
tags question: http://stackoverflow.com/q/25263378

http://stackoverflow.com/comment/39561751
comment on: http://stackoverflow.com/q/25370128
score: 0
type: Comment
type: QuestionComment
has text: Please clarify the expected value of ```min1```, ```max1```, ```min2```, ```max2``` and an example of a value that could _become outside the range_

http://stackoverflow.com/q/25248487
downvote count: 0
accepted answer: http://stackoverflow.com/a/26170562
tagged with: html2canvas
favorite count: 0
has answer: http://stackoverflow.com/a/26154404
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26154404
score: 1
upvote count: 1
has body: I made a recursive function for generate a PDF iterating some divs. When there's no more divs, I save the PDF. I'm using html2canvas to catpure the HTML code of each div into a canvas and jsPDF to put the canvas as an image and generate the PDF. This code works well, except when the PDF exceeds 8MB, it stops adding content: I want to know if jsPDF have a limit in size when generating PDF's. var doc = new jsPDF(); appendDataToPDF(some_div, doc, 1); /* calling function below */ function appendDataToPDF(div, doc, top) { html2canvas(div, { onrendered: function(canvas) { var img = canvas.toDataURL(); doc.addImage(img, 'JPEG', 10, top, width, height); if(top &gt; 200 /* some value to detect if limit of page reached */) { doc.addPage(); top = 1; } else top += 40; div = div.nextSibling; if(div === null) doc.save('Test.pdf'); else appendDataToPDF(div, doc, top); } }); }
has title: Cannot add content after PDF reaches certain size
has answer: http://stackoverflow.com/a/26170562
type: Question
tagged with: javascript
tagged with: jspdf
answer count: 2
tagged with: http://stackoverflow.com/tag/pdf

http://stackoverflow.com/q/25388910
has title: How to create a new locale for dojo calendar?
score: 1
tagged with: ant
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: dojo
type: Question
has body: I am new to dojo.I am trying to add new language support to the dojo calendar widget. From their website i was able to understand that they only provide a subset of locales. In order to add locales for additional languages you have to do it yourself by running the ant on build.xml in the util folder. After doing an ant clean and building it,my build ran successfully but no new locales were added. Could anyone please tell me what I'm doing wrong here? How can I add additional language support to the dojo's calendar widget?

http://stackoverflow.com/q/25368223
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Polymer: How to access elements within the 'content' tag
tagged with: web-component
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25370002
has body: I have made a custom element, a list with a built-in filter: Template for 'filter-list': ... 1 2 3 4 5 6 The idea is that the list will show/hide items that match the class in filter. To this end, I wrote the following callback: Polymer('filter-list', { filter: '', ready: function() { }, filterChanged: function() { if(this.filter) { items = this.$.items.querySelectorAll("."+this.filter); console.log("Showing "+items.length+" items."); } }, }); But I can't get through to the item nodes. items.length is always 0. How can I get to the item-elements of the light DOM within the custom element API?
upvote count: 3
has answer: http://stackoverflow.com/a/25370002
type: Question
tagged with: polymer
type: AnsweredQuestion
score: 3

http://stackoverflow.com/a/48682602
score: 0
type: Answer
has body: I was facing the same problem today, and I have tried the following steps, Delete IE browser cache Delete the Temporary Asp.Net folder from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files(You may need to select the framework version folder you are using). Restarting IIS Refreshing the page after opening IE browser console. Any of the above steps may help you, but what worked for me is kind of different though it was my mistake. The IIS copy of the project was referencing to the old branch, the one I was working earlier. That's the reason why my changes was not being updated in IE. You can check and change the same by following the preceding steps. Got to IIS Select the site you are working on, under Sites -> Default Web Site Right click -> Manage Application -> Advanced Settings Select Physical Path and make sure it is pointed to the branch you are working on. This my be silly, but just sharing as it may help some people like me.
answers question: http://stackoverflow.com/q/25251070

http://stackoverflow.com/comment/39385031
has text: Without knowing what your DOM structure looks like, there's no way of telling.
score: 4
comment on: http://stackoverflow.com/q/25274745
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25345965
upvote count: 1
answers question: http://stackoverflow.com/q/25344376
type: Answer
has body: The advance width of characters in a monospace font is fixed for a specific font but may be different for different monospace fonts. If you limit yourself to using a particular monospace font (on web pages, this is meaningful only when using @font-face, since there is no monospace font that is available in all computers), you can find out its advance width (e.g. using a font inspector program, or with some testing) and then scale an element to that width. However, you cannot make font size depend on an element’s width, except with some JavaScript programming, so it is simplest to use an image, if your problem is just one character. Write the character in some font in large size, take a screenshot, and then scale the image using an img element for which you set the width only. Alternatively you could create the image in just the right size, but this would be less flexible if you later change the font (so that the width may change too).
downvote count: 0
has comment: http://stackoverflow.com/comment/39545793
score: 1

http://stackoverflow.com/a/25364352
accepted answer of: http://stackoverflow.com/q/25361378
type: AcceptedAnswer
has body: What you could do is also pass the button that was clicked, using this. That way you know the text of the button that was clicked. And since you are using a server side button, be sure to include return false; from your JavaScript call to prevent it from posting back and clearing your &lt;p&gt; tag. &lt;asp:Button ID="btnadd" runat="server" Text="Add" OnClientClick="func('txtn1', 'txtn2', this); return false;" /&gt; function func(a, b, btn) { var txtn1 = document.getElementById(a); var txtn2 = document.getElementById(b); var rslt = document.getElementById('rslt'); if(btn.value == 'Add') rslt.innerHTML = parseInt(txtn1.value) + parseInt(txtn2.value); }
answers question: http://stackoverflow.com/q/25361378
type: Answer
score: 0

http://stackoverflow.com/comment/39326566
has text: Probably? Have you tried?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25243555
score: 0

http://stackoverflow.com/comment/39528260
type: QuestionComment
comment on: http://stackoverflow.com/q/25352783
has text: Im sorry guys. The code is very messy here, but the syntax is correct in my document. The function is working, but the problem is that its deleting only one comment.
type: Comment
score: 1

http://stackoverflow.com/q/25370933
has comment: http://stackoverflow.com/comment/39562768
tagged with: node.js
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39562897
has answer: http://stackoverflow.com/a/25372090
has body: I'm very new to Node/Express, and trying to implement this block that updates a company's information. I have a number of console.log statements that are tracking the variables throughout the block, and everything seems to be working perfectly fine until the last saving line. What exactly could I be doing wrong? // Edit company metric information editMetrics: function(link, form, cb) { Companies.findOne({ permalink: link }, function (err, company) { if (err) return done(err); // Iterate through form fields for(var field in form) { console.log(field); // Looks great if(typeof(company.operational[field]) !== 'undefined') { company.operational[field].unshift({ timestamp: new Date(), value: form[field] }); } if(typeof(company.user_metrics[field]) !== 'undefined') { company.user_metrics[field].unshift({ timestamp: new Date(), value: form[field] }); } if(typeof(company.economics[field]) !== 'undefined') { company.economics[field].unshift({ timestamp: new Date(), value: form[field] }); } } console.log(company); // Looks great // Save &amp; redirect to updated profile company.save(cb()); // For some reason this isn't saving }); }, Callback: CompanyModel.editMetrics(link, req.body, cb = function(error, result) { res.redirect('/portfolio/' + link); });
answer count: 1
tagged with: database
has title: Node/Express not saving updated company information to DB
tagged with: javascript
tagged with: express
has comment: http://stackoverflow.com/comment/39563178
accepted answer: http://stackoverflow.com/a/25372090
score: 0
has comment: http://stackoverflow.com/comment/39563172

http://stackoverflow.com/q/25266579
tagged with: bing-maps
score: 0
has title: Detect Pushpins Inside a VE Shape on a Bing Map
answer count: 1
type: UnansweredQuestion
tagged with: virtual-earth
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/25267841
tagged with: javascript
has body: I have a map which populates pushpins from a database. And a circle. I want to be able to figure out what other pushpins are within the VE Shape circles radius and create a list of their addresses. function addPushPin(lat, long) { //var point = new Microsoft.Maps.Point(e.getX(), e.getY()); //var pushpinLocation = new(lat, long); var s = new VEShape(VEShapeType.Pushpin, new VELatLong(lat,long)); var customIcon = new VECustomIconSpecification(); //customIcon.TextContent = "yo bana4na4"; customIcon.Image = "http://universidadescancun.com/wp-content/themes/GeoUnis3/images/pinpoint-fiesta.png"; //customIcon.ImageOffset = new VEPixel(); s.SetTitle("First Pin Demo Title<>/span>"); s.SetDescription("This comes to the description of pushpin."); s.SetMoreInfoURL("http://dotnetricks.blogspot.com"); s.SetPhotoURL("http://upload.wikimedia.org/wikipedia/commons/8/8a/Banana-Single.jpg"); s.SetCustomIcon(customIcon); s.SetIconAnchor(new VELatLong(lat, long)); map.AddShape(s); } I also have my map populate a circle around one of these pushpins. It is populated like so. function getCircleNow(lat, long) { var latin = lat; var lonin = long; var latlong = new VELatLong(latin, lonin); centerPoint = (latlong); //var center = map.GetCenter().toString(); //alert(center); //Get initial circle points var circlePoints = buildCircle(centerPoint.Latitude, centerPoint.Longitude, 50.74); //Build circle circle = new VEShape(VEShapeType.Polygon, circlePoints); circle.HideIcon(); circle.SetLineWidth(2); map.AddShape(circle); //Build mask circleMask = new VEShape(VEShapeType.Polygon, circlePoints); circleMask.HideIcon(); circleMask.Hide(); circleMask.SetLineColor(new VEColor(0, 0, 0, 0.5)); circleMask.SetFillColor(new VEColor(0, 0, 0, 0.0)); circleMask.Primitives[0].symbol.stroke_dashstyle = "Dash"; map.AddShape(circleMask); } And here is the buildCircle() function it calls. function buildCircle(latin, lonin, radius) { var locs = new Array(); var lat1 = latin * Math.PI / 180.0; var lon1 = lonin * Math…

http://stackoverflow.com/comment/39535122
type: Comment
comment on: http://stackoverflow.com/a/25356547
type: AnswerComment
has text: it's strange, because the inspector says that $ sign is the issue. Literally "$ is not a function". Anyways, did you try https://github.com/twbs/bootstrap/pull/6342 ?
score: 0

http://stackoverflow.com/a/25400957
answers question: http://stackoverflow.com/q/25380964
downvote count: 0
has body: Unfortunately, I couldn't find a way to get this working with the update panel functioning through ASP. To sort out the tinymce issue I have disabled EnablePartialRendering within the ScriptManagerToolkit. Whilst this isn't the solution I wanted, it's the one that worked for this particular issue - due to time constraints this needed to work ASAP. If/when I/someone else finds a better solution I'll update this thread. The key to getting this to work does appear to rely on a form of postback so that tinymce reinitialises on partial page load.
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/39577883
type: Comment
type: QuestionComment
has text: How about jquery `parentsuntil()`?
comment on: http://stackoverflow.com/q/25379075
score: 0

http://stackoverflow.com/q/25341353
tagged with: url
has comment: http://stackoverflow.com/comment/39508952
favorite count: 0
type: UnansweredQuestion
tagged with: path
has comment: http://stackoverflow.com/comment/39509373
has title: Parent Directory Path in Javascript
score: 2
has comment: http://stackoverflow.com/comment/39509354
answer count: 0
upvote count: 2
type: Question
has body: I'm trying to getting an image from a javascript file inside a "js" folder. The image is inside the "img" folder. Root Folder: "img" folder (with "image.png" inside), "js" folder (with "javascript.js" inside), "index.html" file. this is my code: var image = '../img/image.png'; but it doesn't work! If I move the javascript file in the root folder and I use var image = 'img/image.png'; it works! So.. how can I write the path to keep the javascript file in the js folder? I don't want to use an http url! Thank you!
tagged with: javascript
tagged with: image
downvote count: 0

http://stackoverflow.com/q/25326076
possible better answer: http://stackoverflow.com/a/25326094
answer count: 2
has comment: http://stackoverflow.com/comment/39479947
has answer: http://stackoverflow.com/a/25326098
has body: &lt;li ng-show="auth==true and user[0].auth==1"&gt; What would be the proper way of writing the above? Both auth and user[0].auth are part of the $rootScope. I just want this list item to show when both $rootScope.auth = true and $rootScope.user[0].auth = 1
has title: AngularJS ng-show IF AND condition
tagged with: angularjs
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/25326098
type: Question
has answer: http://stackoverflow.com/a/25326094
tagged with: javascript

http://stackoverflow.com/comment/39408556
type: Comment
score: 0
has text: thanks, made the edit
comment on: http://stackoverflow.com/q/25284450
type: QuestionComment

http://stackoverflow.com/comment/39496470
comment on: http://stackoverflow.com/a/25334390
type: AnswerComment
score: 0
has text: How would i check that? I just know it don't work as i replaced the code and refreshed the webpage I'm work on,
type: Comment

http://stackoverflow.com/a/42281647
type: Answer
has body: Move the Script Block that calls your JavaScript File to the botton of your HTML page beneath the closing body tag (. We are getting the error unable to set property 'innerHTML' of undefined or null reference because, we are trying to execute our JavaScript file before our webpage is loaded. This means we are trying to write to a page that technically doesn't exist.
answers question: http://stackoverflow.com/q/25318638
score: 0

http://stackoverflow.com/a/25324425
has body: If you wanted it to be specifically the label that was positioned like the legend you could do: http://jsfiddle.net/ahallicks/kzf6257h/5/ #filterleft_border { padding: 10px; position: relative; } .category-label { background: #FFF; left: 5px; position: absolute; top: -10px; } Note, the relative positioning will keep the label within the confines of the border in cae you needed to use it more than once.
type: Answer
score: 2
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25324266

http://stackoverflow.com/comment/62628263
score: 2
comment on: http://stackoverflow.com/a/37553324
type: AnswerComment
type: Comment
has text: In this you're not generating a JavaScript Date object though.

http://stackoverflow.com/a/35882138
has comment: http://stackoverflow.com/comment/62191617
type: Answer
downvote count: 2
has comment: http://stackoverflow.com/comment/61838630
upvote count: 7
has comment: http://stackoverflow.com/comment/59442591
answers question: http://stackoverflow.com/q/25339803
score: 5
has body: You're mutating the original array in a loop. for (i = 10000; i &gt; 0; i--) { arr1 = arr1.concat(arr2); } Here the size of arr1 keeps growing and as the array gets bigger it will get slower because it has to allocate more memory. for (i = 10000; i &gt; 0; i--) { var arr3 = arr1.concat(arr2); } Here you are assigning to a new variable without mutating arr1 or arr2 so your testing the performance of concatenating two small arrays. In the arr1 case your testing the performance of concatenating one large array with a small one.

http://stackoverflow.com/comment/39306707
has text: fiddle shows break line fine
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25232983
score: 1

http://stackoverflow.com/q/25298675
has answer: http://stackoverflow.com/a/25298845
tagged with: javascript
score: 0
answer count: 3
has title: Why is the alert box returning "undefined undefined"?
has comment: http://stackoverflow.com/comment/39429381
has answer: http://stackoverflow.com/a/25298795
has comment: http://stackoverflow.com/comment/39429342
has answer: http://stackoverflow.com/a/25298767
tagged with: return
has comment: http://stackoverflow.com/comment/39429422
has comment: http://stackoverflow.com/comment/39429356
possible better answer: http://stackoverflow.com/a/25298767
type: AnsweredQuestion
has body: I am trying to alert the values in each conditional of a loop below (in the function returnFunction). I have a function myFunction that is structured as so: var myFunction = function () { window.myArray = { 1: returnFunction("a"), 2: returnFunction("b"), 3: returnFunction("c"), 4: returnFunction("d"), 5: returnFunction("e"), 6: returnFunction("f"), 7: returnFunction("g") } } returnFunction looks like this: var returnFunction = function (classID) { var myArray = [], tempcounter = 0; tempcounter = document.getElementsByClassName(classID).length; myArray = {classID : tempcounter}; return alert(myArray[0] + ' ' + myArray[1]); } The returned value that is alerted is undefined undefined It's my understanding the flow here is that when myFunction is called, it calls returnFunction 7 times, each time sending a different string ("a" through "g") that represent a specific class in the DOM. For a given class "a" through "g", the number of instances of the class (classID) is then counted and returns the classID and a number, which should be returned in the alert. Can anyone tell me where I am going wrong here?
accepted answer: http://stackoverflow.com/a/25298795
has comment: http://stackoverflow.com/comment/39429421
type: Question
has comment: http://stackoverflow.com/comment/39429432

http://stackoverflow.com/comment/39457726
comment on: http://stackoverflow.com/a/25313970
type: AnswerComment
type: Comment
has text: no that didn't work either and something weird was happening too with that code cause i tried console.log after it and it didn't execute, buy when i took it out it did
score: 0

http://stackoverflow.com/a/25278947
upvote count: 1
answers question: http://stackoverflow.com/q/25278898
has comment: http://stackoverflow.com/comment/39392741
downvote count: 0
score: 1
has body: I think you can get your goal with this: var tableRows = $('#table1 tr'); tableRows.eq(0).find('td:empty').each(function() { var index = $(this).index(); console.log(index); var rowIndex = $(this).parent().index(); var isEmpty = true; tableRows.not($(this).parent()).find('td').eq(index).each( function() { console.log($(this)); if(!$(this).is(':empty')) { isEmpty = false; } }); if(isEmpty) { tableRows.each(function() { $(this).find('td').eq(index).hide() }); } }); Working example: JSFiddle
type: Answer

http://stackoverflow.com/comment/39359097
comment on: http://stackoverflow.com/q/25261002
type: Comment
score: 1
has text: You can't do that. JavaScript objects don't have order. Use an array.
type: QuestionComment

http://stackoverflow.com/q/25239907
type: UnansweredQuestion
score: 2
downvote count: 0
tagged with: jsp
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25248202
favorite count: 0
tagged with: ajax
has body: I'm retrieving some data into a JSON array, then display it into an HTML table which contains some data enclosed within hyper links. i.e. a couple of the columns' data are clickable, once clicked it displays another JSP page (say page #2) with some more data which was kept on the JSON array itself. Now this page 2 has a 'Back' button functionality - the expected behavior is when user clicks the 'Back' button it should go back to page 1 where the HTML table data was displayed and user should be able to see the data which they first fetched too. i.e. there should be some way to remember the data fetched from my initial AJAX request and retrieve the same data which user fetched in page 1 when they go back to that page from the child page#2. Th AJAX call is triggered when user enters an account# and the type of account - I fetch data accordingly and get the result in the 'response' object and neatly display it on html table, but after user moves from that page and again hits the back button I see the page#1 without the table. Now again I cannot ask the user to re-enter the details to see the data that they retrieved earlier. It's pretty annoying. Please give me a solution to this problem. Thanks All. Appreciate for taking time to read this. Here's a part of the code: $(document).ready(function () { var flag = "1"; $('#accountType').bind('change', function (event) { var accountType = $('#accountTypeSelect').val(); var account = $('#accountText').val(); jQuery.ajax({ type: 'POST', url: '${pageContext.request.contextPath}' + "/Page1.spr", //request page cache: false, dataType: "json", data: { "accountType": accountType, "account": account, "flag": flag }, //data sent to request page success: function (response) { // code to display the data into the html table }, error: (function (message) { console.log("error message : " + message); }), statusCode: { 404: function () { alert("page not found"); } } }); });
has answer: http://stackoverflow.com/a/25240306
type: Question
has title: How to store/remember the data fetched from ajax call?
has comment: http://stackoverflow.com/comment/39320181
upvote count: 2
answer count: 3
has answer: http://stackoverflow.com/a/25239976
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/66354148
type: Comment
has text: I see how this splits up the routes, but how does it address nesting?
score: 15
type: AnswerComment
comment on: http://stackoverflow.com/a/30549313

http://stackoverflow.com/a/25331025
type: Answer
has comment: http://stackoverflow.com/comment/39520320
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25291876
has body: Since I could not change the remote response coming back I used replace to escape the character it was having trouble with, in this case it was the '\"' as shown in the error below: {"valid":false, "error":"XDMP-BADCHAR: (err:XPST0003) Unexpected character found '\"' (0x0022)"} Here's the updated Javascript showing how I did it: $(document).ready(function(){ $('#form-validate').validate(); $("[name^=customfields]").each(function(){ $(this).rules("add", { remote: { type: "GET", url: "/xpath-evaluator.xqy", dataType: "json", dataFilter: function(data) { var json = JSON.parse(data); if (json.valid != false) { return true; } else { var jerror = json.error.split(')')[1] return '\"' + jerror.replace('\"', '\\"') + '\"'} } } }); }); }); Thanks are in order to Sippy who commented and set me on the right track to fixing this. Hope it helps someone else in the future.
score: 1
answers question: http://stackoverflow.com/q/25291876
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25330966
has answer: http://stackoverflow.com/a/25331058
has comment: http://stackoverflow.com/comment/39489646
answer count: 5
has answer: http://stackoverflow.com/a/25331121
has comment: http://stackoverflow.com/comment/39490493
has title: How to make animation() endless
tagged with: css
has comment: http://stackoverflow.com/comment/39490134
downvote count: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25331121
upvote count: 3
has comment: http://stackoverflow.com/comment/39489826
has body: I have an element which should be animated all the time. The animated element has such CSS properties: #world { height: 100%; max-height: 100%; position: relative; display: flex; background :red; } I can only move the element to a particular way, like this: $('#world').animate({right: "2000px", easing: "linear"}, 2000); But this will just animated for 2000px my element has an endless width. UPDATE: ALL 7.5 Sec. #world become bigger. FIDDLE
has comment: http://stackoverflow.com/comment/39489745
type: Question
tagged with: jquery-animate
possible better answer: http://stackoverflow.com/a/25331052
has comment: http://stackoverflow.com/comment/39489792
has answer: http://stackoverflow.com/a/25331450
has answer: http://stackoverflow.com/a/25331052
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/25331159
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/39450816
score: 0
type: Comment
has text: Please, add some explanation to your answer. As it is now, it's been flagged as "low quality".
comment on: http://stackoverflow.com/a/25310022
type: AnswerComment

http://stackoverflow.com/q/25281095
accepted answer: http://stackoverflow.com/a/25282913
possible better answer: http://stackoverflow.com/a/25281264
score: 0
has answer: http://stackoverflow.com/a/25281264
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39397453
has answer: http://stackoverflow.com/a/25281278
has comment: http://stackoverflow.com/comment/39396019
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25282913
has title: jQuery- only listen to scroll if certain element is present
has comment: http://stackoverflow.com/comment/39395991
type: Question
has comment: http://stackoverflow.com/comment/39397582
tagged with: javascript
tagged with: jquery
has body: I only want to listen to the scroll event if the button with the class name "scroll_button" is displayed. I want to save resources. How can I achieve it? JS $(window).scroll(function(){ }); HTML click here

http://stackoverflow.com/comment/39511586
type: QuestionComment
comment on: http://stackoverflow.com/q/25342683
score: 0
has text: @ EatPeanutButter - yes i have edited out some code for sake of clarity....but cellzoom function does;nt open the bootstrap modal....cellModal () function does it!!!
type: Comment

http://stackoverflow.com/comment/39614309
has text: @user3700201 keep in mind to secure your data! If I change the ID i will be able to delete an other entity! Further escape your data! Never put a local directly to your queries without escaping them. Escaping avoids sql injection!
comment on: http://stackoverflow.com/a/25362412
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39520351
comment on: http://stackoverflow.com/q/25348394
has text: Try this: http://jsfiddle.net/KmXTy/1/
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25365054
type: UnansweredQuestion
upvote count: 1
score: 1
tagged with: java
type: Question
has comment: http://stackoverflow.com/comment/39562551
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39562494
has title: how to stop master ajax request if slave ajax request fails in extjs
has body: I am newbie to extjs 4.1, I developed a small app wherein I have a master and slave concept i.e basis on master's ajax success i have to fire slave's ajax request, if slave fails then master should also fail and vice versa. Please find the below snipnet of my code Controller.js Ext.define('Basel3.controller.Contacts', { extend: 'Ext.app.Controller', stores:['...My all store goes here...'], models:['...My all models goes here...'], views: ['...My all views goes here...'], refs:[{ My all references goes here }], init: function(){ this.control({ .... }) }, save: function() { this.getRulesStore().save(); this.getRuleDetailsStore().save(); } } As in the aforementioned code we can see that I have used the stores to save the data in my database, which fires seperate ajax request, which I don't want to do. Below are the store and model of the respective entities. Models Rule Detail: Ext.define('Basel3.model.RuleDetail', { extend: 'Ext.data.Model', fields: [{name: 'ruleDetailId', type: 'int'}, {name: 'ruleId',type: 'string'}, {name: 'attrName',type: 'string'}, {name: 'attrType',type: 'string'}, {name: 'attrOprtr',type: 'string'}, {name: 'attrValue',type: 'string'} ] }); Rule: Ext.define('Basel3.model.Rule', { extend: 'Ext.data.Model', fields: [{name: 'ruleName',type: 'string'}, {name: 'ruleGroup', type: 'string'}, {name: 'ruleReportName', type: 'string'}, {name: 'ruleCategory',type: 'string'}, {name: 'ruleTypeId',type: 'string'}, {name: 'ruleFactor',type: 'string'}, {name: 'effDate',type: 'date', dateFormat :'d-M-y'} ] }); Stores: Rule Details: Ext.define('Basel3.store.Contacts', { extend: 'Ext.data.Store', model: 'Basel3.model.Contact', autoLoad: true, pageSize: 35, storeId : 'Contacts', autoLoad: {start: 0, limit: 35}, sorters: ['attrType'], groupField: 'attrType', proxy: { type: 'ajax', api: { read : 'ruledetail/view.action', create : 'ruledetail/create.action', update: 'ruledetail/update.action', destroy: '' }, model : 'Basel3.model.Contact', reader: { //reads the data i…
tagged with: ajax
tagged with: extjs
has comment: http://stackoverflow.com/comment/39562608
favorite count: 0
answer count: 0

http://stackoverflow.com/q/25256927
has title: Preloader for loading images
has comment: http://stackoverflow.com/comment/39353476
has comment: http://stackoverflow.com/comment/39352175
has comment: http://stackoverflow.com/comment/39353414
tagged with: http://stackoverflow.com/tag/svg
answer count: 2
upvote count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25256960
has answer: http://stackoverflow.com/a/25257286
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
has body: I am currently working on SVG SMIL animation in which I am using some .png and .gif files for easing my animation in IE. For this animation I am trying to get Preloader before animation and its other contents get loaded. Problem is I am not getting that Preloader working properly. My .html page is getting loaded first and then preloader is starting... In Preloader also, I have used several preloaders available on the web. But they are not helpful for me. Script and .html files loading time can be counted by domContentLoaded but for images. I dont know how to do that. If someone can suggest me a way that would be great. here is code of preloader.js, I found on web: $(document).ready(function () { "use strict" //indexOf support for IE8 and below. if (!Array.prototype.indexOf){ Array.prototype.indexOf = function(elt /*, from*/){ var len = this.length >>> 0; var from = Number(arguments[1]) || 0; from = (from < 0) ? Math.ceil(from) : Math.floor(from); if (from < 0) from += len; for (; from < len; from++){ if (from in this && this[from] === elt) return from; } return -1; }; } //bgImg for holding background images in the page & img array for images present in the document( ). var bgImg = [], img = [], count=0, percentage = 0; //Creating loader holder. $(' 0% ').css({ position:"fixed", top:0, bottom:0, left:0, right:0, background:'#fff' }).appendTo('body'); //Using jQuery filter method we parse all elemnts in the page and adds background image url & images src into respective arrays. $('*').filter(function() { var val = $(this).css('background-image').replace(/url\(/g,'').replace(/\)/,'').replace(/"/g,''); var imgVal = $(this).not('image').attr('xlink:href'); //Getting urls of background images. if(val !== 'none' && !/linear-gradient/g.test(val) && bgImg.indexOf(val) === -1){ bgImg.push(val) } //Getting src of images in the document. if(imgVal !== undefined && img.indexOf(imgVal) === -1){ img.push(imgVal) } }); //Merging both bg image array & img src array var imgArray = bg…
favorite count: 0
type: Question
tagged with: animation

http://stackoverflow.com/q/25375586
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39571720
has comment: http://stackoverflow.com/comment/39572488
has comment: http://stackoverflow.com/comment/39571769
has comment: http://stackoverflow.com/comment/39571625
has comment: http://stackoverflow.com/comment/39571797
has comment: http://stackoverflow.com/comment/39572053
score: 0
type: UnansweredQuestion
has title: how to combine the error message from jquery validation
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25503253
has body: how to combine the error message from jquery validation. for example: messages: { first_name: { required: "Please enter your first name." }, email: { required: "Please enter a valid email address.", remote: "Email has been registered." }, username: { required: "Please enter username.", remote: "Username has been registered." } }, Desired message will be like this: Please enter your first name, a valid email address and username or Please enter your first name and username, email has been registered etc.
tagged with: jquery-validate
has comment: http://stackoverflow.com/comment/39572684
has comment: http://stackoverflow.com/comment/39571571
type: Question
has comment: http://stackoverflow.com/comment/39571668

http://stackoverflow.com/q/25383344
tagged with: sorting
linked to: http://stackoverflow.com/q/25382615
has comment: http://stackoverflow.com/comment/39585726
has comment: http://stackoverflow.com/comment/39585579
downvote count: 1
has title: Custom sorting in javascript
favorite count: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39585895
has body: (I have asked this question previously too here but has been marked duplicated ,but that answer doesnot meet my requirement) I have an array a=["Apple","Mango","apple","mango"] .If I use the a.sort() the result is ["Apple", "Mango", "apple", "mango"] But What i desire is Apple,apple,Mango,mango Remember It is not case inSensitive sort as whatever the order of given element in the array be ,the output should be as Apple apple Mango mango Means the capital letter should precedes the smaller one
score: 1
has answer: http://stackoverflow.com/a/25383389
accepted answer: http://stackoverflow.com/a/25383389
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/39585585
has comment: http://stackoverflow.com/comment/39585626
tagged with: arrays
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/25350236
answers question: http://stackoverflow.com/q/25350184
accepted answer of: http://stackoverflow.com/q/25350184
upvote count: 1
downvote count: 1
score: 0
type: AcceptedAnswer
has body: Another way is to use transparent border, and you can do it without javascript, just CSS: .myClass { border-left: 6px solid transparent; } .myClass:hover { border-left: 6px solid green; } UPD: here is an example
type: Answer

http://stackoverflow.com/comment/39460256
comment on: http://stackoverflow.com/a/25315484
has text: Note that this is still not going to work as expected if `ctg.Id` is non-numeric - it's being added as a property to the array, and if the id is `"foo"` it won't show up as an element in the array.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/39514263
has text: What? Have you missed the point of the question? He wants to validate that there are two words. I gave an example of one word that gives a false positive using your solution.
type: Comment
comment on: http://stackoverflow.com/a/25344662
score: 0
type: AnswerComment

http://stackoverflow.com/q/25332529
tagged with: animation
tagged with: css
answer count: 1
has comment: http://stackoverflow.com/comment/39492861
has body: I'm trying to create a spinner using SVG and javascript. The problem is that it doesn't work accurately. It has start and stop functions. When start is clicked, it delays before animating, and when i stop it stops well but fails to start if I click start again. Currently, It's not working in IE9 and IE11. If there're hacks that I don't know of. How would you animate this using RapahelJS? http://plnkr.co/edit/FC2qiZumzgjKSJOs6Zm5?p=preview var spinner = function() { var interval; var transition = function() { var path = document.querySelector('#spinner-wrapper .spinner #main-path'); path.style.transition = path.style.WebkitTransition = 'none'; path.style.strokeDasharray = '205.951, 205.951'; path.style.strokeDashoffset = 430; path.getBoundingClientRect(); path.style.strokeDashoffset = '0'; path.style.transition = path.style.WebkitTransition = 'stroke-dashoffset 3s linear'; }; var startInterval = function(time) { return interval = setInterval(function() { transition(); }, time); }; return { start : function() { startInterval(2700); }, stop : function() { startInterval(0); clearInterval(start()); } }; };
score: 2
has answer: http://stackoverflow.com/a/25333105
downvote count: 0
tagged with: javascript
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Creating a spinner using SVG and JavaScript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25333105
tagged with: http://stackoverflow.com/tag/svg
type: Question
upvote count: 2

http://stackoverflow.com/comment/39569732
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25374585
has text: You can run Node.JS as [a (simple) web server](http://stackoverflow.com/q/6084360/2970947).
score: 0

http://stackoverflow.com/comment/39459945
type: AnswerComment
score: 0
type: Comment
has text: because there are many recognizeType relating to area.I required `#planService tbody tr td select#recognizeType` that comes under planService :)
comment on: http://stackoverflow.com/a/25315285

http://stackoverflow.com/a/25385191
score: -1
upvote count: 0
has body: To avoid this issue altogether, you could drop inheritance, and go for composition. RealTimeChart = function(chartAttributes) { var chart = new FusionCharts(chartAttributes); this.appendData = function(data) { chart.feedData(data); }; }; RealTimeGauge = function (realTimeChart) { this.appendData = function (data) { console.log("doing custom stuff..."); realTimeChart.appendData(data); }; }; new RealTimeGauge(new RealTimeChart({})); Using composition results in simpler, more modular code. As you can see in the above code, RealTimeGauge only depends on the interface of RealTimeChart, not RealTimeChart itself, like in your original code. This means that you can substitute anything that has the same interface. The 2 'classes' are now decoupled. At what price? Less code that's more readable. You could go even further and decouple RealTimeChart from FusionCharts in the same way.
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/39589285
answers question: http://stackoverflow.com/q/25384213

http://stackoverflow.com/comment/39402594
comment on: http://stackoverflow.com/q/25284256
type: Comment
score: 0
has text: You could try calling `.nice()` on the scale after setting the domain and see if that works for you.
type: QuestionComment

http://stackoverflow.com/q/25345182
has title: Currency input with Twitter Bootstrap (using jQuery)
score: 3
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39515314
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/25345373
has comment: http://stackoverflow.com/comment/39515386
has comment: http://stackoverflow.com/comment/39515295
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25345373
upvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/39515183
tagged with: javascript
tagged with: jquery
has body: I'm using Twitter Bootstrap (v3) and I want to make a money input, where I can enter an amount of money with a fixed currency (currently €). The input type needs to be type="number" because of how I want the input to look on mobile devices (not a big QWERTY keyboard, just numbers), but I do want to allow multiple patterns. I think the way to go is with the .on("input", callback) method, but I'm not sure how to accomplish this. I have tried the following: $(document).ready(function() { $("#amount").on("input", function() { // allow numbers, a comma or a dot $(this).val($(this).val().replace(/[^0-9,\.]+/, '')); }); }); (for the HTML and CSS, see the jsfiddle link) But obviously that doesn't work, otherwise I wouldn't be posting here. Whenever you try to type something invalid, the whole string disappears. http://jsfiddle.net/bjcayhzb/1/ Explanation rather than (or alongside) a working example highly is appreciated.

imacros
tags question: http://stackoverflow.com/q/25271556
type: Tag
tags question: http://stackoverflow.com/q/25338659
tag name: imacros

http://stackoverflow.com/a/25369832
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25369753
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25369753
has body: While using capturing parens is certainly a valid approach, I'd recommend using lookahead split: var str = '-3-6-9-3+10-3-5-2'; str.split(/(?=[-+])/); // no need to check for digits here actually // ["-3", "-6", "-9", "-3", "+10", "-3", "-5", "-2"] In this case, each split point will be placed before the sign (i.e., + or -).

http://stackoverflow.com/a/25368976
answers question: http://stackoverflow.com/q/25367524
has body: If you want to filter by multiple values, you can pass in a filter-object. Each key corresponds to a field-name and each value filters the items based on the corresponding key. Book name: &lt;input type="search" ng-model="filterObj.bookname" /&gt; Year: &lt;input type="search" ng-model="filterObj.year" /&gt; &lt;div ng-repeat="book in books | filter:filterObj"&gt;...&lt;/div&gt; See, also, this short demo. If you want to let the user dymanically specify the field to filter by, you can do that too (although it is not very common practice): Filter by: &lt;input type="search" ng-model="dynamicField" placeholder="Field to filter by" /&gt; &lt;input type="search" ng-model="filterObj[dynamicField]" placeholder="Value to filter by" /&gt; &lt;div ng-repeat="book in books | filter:filterObj"&gt;...&lt;/div&gt;
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39578265
has comment: http://stackoverflow.com/comment/39560216
downvote count: 0
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39560403
has comment: http://stackoverflow.com/comment/39563134
score: 1
has comment: http://stackoverflow.com/comment/39578252
accepted answer of: http://stackoverflow.com/q/25367524

http://stackoverflow.com/q/25257979
has comment: http://stackoverflow.com/comment/39354121
has comment: http://stackoverflow.com/comment/39354669
has comment: http://stackoverflow.com/comment/39354445
tagged with: object
type: AnsweredQuestion
has title: Javascript weird object
has answer: http://stackoverflow.com/a/25258742
has comment: http://stackoverflow.com/comment/39354058
has body: I've got this code from a javascript file that looks like some object but Im not sure. How can I use this data? DataStore.prime('standings', { stageId: 36 }, [ [36,13,'Arsenal',1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,,,] ,[36,24,'Aston Villa',2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,,,] ,[36,184,'Burnley',3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,,,] ]);
has comment: http://stackoverflow.com/comment/39354008
type: Question
answer count: 2
tagged with: arrays
possible better answer: http://stackoverflow.com/a/25258742
tagged with: javascript
has comment: http://stackoverflow.com/comment/39354689
has answer: http://stackoverflow.com/a/25258904
accepted answer: http://stackoverflow.com/a/25258904
score: 0

http://stackoverflow.com/comment/39322143
comment on: http://stackoverflow.com/q/25239934
type: QuestionComment
score: 0
has text: @roel http://pastebin.com/B84fB443 here is a sample of what im doing, it work when i press the link, but not when i call it from the script.
type: Comment

http://stackoverflow.com/a/25237537
accepted answer of: http://stackoverflow.com/q/25237486
has comment: http://stackoverflow.com/comment/39316053
type: Answer
has comment: http://stackoverflow.com/comment/39315885
upvote count: 5
has comment: http://stackoverflow.com/comment/39315751
has comment: http://stackoverflow.com/comment/39315908
has comment: http://stackoverflow.com/comment/39315990
score: 5
has body: I would do it this way. See if active class exist and then increment/decrement counter based on it: $("#addMe").on('click',function(){ var counter = parseInt($("#hiddenVal").val()); if($(this).hasClass('active')) counter--; else counter++; $("#hiddenVal").val(counter); $("#theCount").text(counter); $("#addMe").toggleClass('active'); }); Working Demo
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25237486
has comment: http://stackoverflow.com/comment/39316080
has comment: http://stackoverflow.com/comment/39315842

http://stackoverflow.com/q/25334666
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: my php is : <?php $Obj = $_POST['OGGETTO']; $Descr = $_POST['DESCRIZIONE']; $doc = new DOMDocument; $doc->loadHtmlFile("index.html"); // Get the parent node where you want the insertion to occur $parent = $doc->getElementsByTagName('div'); $after = "$$$$"; // i know it's wrong // Append (insert) the child to the parent node $parent->appendChild($after); // Save the resulting HTML echo $doc->saveHTML(); ?> my HTML file (index.html) ...... ...... [**NEW DIV HERE**] What i want to accomplish is : my php script should add the following tag in the previous [NEW DIV HERE] and save "index.html" file. but also the "[OGGETTO]" value should be replaced with "$Obj" and "[DESCRIZIONE]" with "$Derc" DIV to put in he HTML file : [**OGGETTO**] [**DESCRIZIONE**] So if $Obj is = "MENU" and $Desrc is = "this is a website", the final index.html file will be MENU this is a website
has comment: http://stackoverflow.com/comment/39497079
has title: Using DOMDocument to add elements in an HTML file in a specific position
has comment: http://stackoverflow.com/comment/39496902
has comment: http://stackoverflow.com/comment/39497300
type: UnansweredQuestion
tagged with: php
answer count: 0
type: Question

http://stackoverflow.com/comment/39486643
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25329455
has text: Your fiddle is empty
score: 4

http://stackoverflow.com/q/25336876
has comment: http://stackoverflow.com/comment/39500984
score: 0
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25337065
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/25336891
tagged with: php
has title: PHP JSON Response Includes HTML Layout
type: UnansweredQuestion
type: Question
tagged with: http://stackoverflow.com/tag/json
has body: I'm struggling with an issue here: I'm trying to create a jQuery/AJAX/PHP live search bar. I am calling search.php fine, but whenever I output the response in the console, I get the contents of my master.php file (which is just site-wide layout) along with the JSON-encoded results. I can't figure out what is causing this to happen. Here is my jQuery: $(function() { $("#search-text").keyup(function() { var $res = $(".search-results"); $.ajax({ type: "POST", url: "search.php", data: { query: $(this).val() }, cache: false, success: function(html) { $res.show(); $res.append(html); console.log(html); }, error: function(xhr, status, error) { console.log("XHR: " + xhr); console.log("Status: " + status); console.log("Error: " + error); } }); return false; }); }); And search.php: $key = $_POST["query"]; $db = new Database(); $db-&gt;query("SELECT * FROM users WHERE firstname LIKE :key OR lastname LIKE :key OR firstname AND lastname LIKE :key"); $db-&gt;bind(":key", '%' . $key . '%'); $rows = $db-&gt;resultset(); echo json_encode($rows); Thanks!

javascript
tags question: http://stackoverflow.com/q/25341082
tags question: http://stackoverflow.com/q/25354288
tags question: http://stackoverflow.com/q/25352536
tags question: http://stackoverflow.com/q/25370555
tags question: http://stackoverflow.com/q/25297346
tags question: http://stackoverflow.com/q/25269414
tags question: http://stackoverflow.com/q/25252950
tags question: http://stackoverflow.com/q/25369145
tags question: http://stackoverflow.com/q/25285124
tags question: http://stackoverflow.com/q/25324829
tags question: http://stackoverflow.com/q/25353134
tags question: http://stackoverflow.com/q/25264293
tags question: http://stackoverflow.com/q/25377763
tags question: http://stackoverflow.com/q/25313299
tags question: http://stackoverflow.com/q/25305981
tags question: http://stackoverflow.com/q/25374378
tags question: http://stackoverflow.com/q/25273585
tags question: http://stackoverflow.com/q/25290599
tags question: http://stackoverflow.com/q/25273470
tags question: http://stackoverflow.com/q/25235471
tags question: http://stackoverflow.com/q/25243358
tags question: http://stackoverflow.com/q/25234604
tags question: http://stackoverflow.com/q/25300688
tags question: http://stackoverflow.com/q/25323596
tags question: http://stackoverflow.com/q/25335731
tags question: http://stackoverflow.com/q/25239608
tags question: http://stackoverflow.com/q/25388371
tags question: http://stackoverflow.com/q/25266818
tags question: http://stackoverflow.com/q/25307224
tags question: http://stackoverflow.com/q/25381521
tags question: http://stackoverflow.com/q/25334677
tags question: http://stackoverflow.com/q/25310901
tags question: http://stackoverflow.com/q/25341926
tags question: http://stackoverflow.com/q/25365730
tags question: http://stackoverflow.com/q/25268803
tags question: http://stackoverflow.com/q/25368234
tags question: http://stackoverflow.com/q/25381772
tags question: http://stackoverflow.com/q/25271938
tags question: http://stackoverflow.com/q/25288112
tags question: http://stackoverflow.com/q/25294063
tags question: http://stackoverflow.com/q/25282656
tags question: http://stackoverflow.com/q/25314352
tags question: http://stackoverflow.com/q/25356969
tags question: http://stackoverflow.com/q/25333543
tags question: http://stackoverflow.com/q/25316432
tags question: http://stackoverflow.com/q/25262554
tags question: http://stackoverflow.com/q/25242428
tags question: http://stackoverflow.com/q/25240220
tags question: http://stackoverflow.com/q/25361809
tags question: http://stackoverflow.com/q/25325879
tags question: http://stackoverflow.com/q/25369552
tags question: http://stackoverflow.com/q/25341690
tags question: http://stackoverflow.com/q/25303937
tags question: http://stackoverflow.com/q/25272856
tags question: http://stackoverflow.com/q/25280519
tags question: http://stackoverflow.com/q/25341776
tags question: http://stackoverflow.com/q/25272136
tags question: http://stackoverflow.com/q/25247892
tags question: http://stackoverflow.com/q/25263011
tags question: http://stackoverflow.com/q/25271257
tags question: http://stackoverflow.com/q/25239531
tags question: http://stackoverflow.com/q/25257880
tags question: http://stackoverflow.com/q/25247059
tags question: http://stackoverflow.com/q/25270917
tags question: http://stackoverflow.com/q/25389655
tags question: http://stackoverflow.com/q/25323697
tags question: http://stackoverflow.com/q/25334974
tags question: http://stackoverflow.com/q/25280911
tags question: http://stackoverflow.com/q/25243367
tags question: http://stackoverflow.com/q/25246431
tags question: http://stackoverflow.com/q/25338891
tags question: http://stackoverflow.com/q/25334343
tags question: http://stackoverflow.com/q/25294756
tags question: http://stackoverflow.com/q/25352375
tags question: http://stackoverflow.com/q/25233231
tags question: http://stackoverflow.com/q/25296058
tags question: http://stackoverflow.com/q/25333781
tags question: http://stackoverflow.com/q/25320734
tags question: http://stackoverflow.com/q/25348347
tags question: http://stackoverflow.com/q/25352245

http://stackoverflow.com/q/25334341
tagged with: jscrollpane
has answer: http://stackoverflow.com/a/25334342
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I'm trying to set a static height of a vertical scrollbar in the jscrollpane library. I have tried settings the track height via CSS and that did not work.
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/25334342
has title: Jscrollpane set vertical scrollbar track height
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/39584303
type: QuestionComment
has text: Thanks for the reply' I've already tried border:none and outline:none which didn't work. I've also tried using !important with no effect
score: 0
comment on: http://stackoverflow.com/q/25380553
type: Comment

http://stackoverflow.com/q/25371381
type: UnansweredQuestion
has title: Javascript error from numeral.js when minified
tagged with: numeral.js
type: Question
has comment: http://stackoverflow.com/comment/39563993
has body: I am getting this javascript error from numeral.js (1.5.3) when our js files are minified. Uncaught TypeError: Cannot read property 'length' of undefined. Since it's minified I am not exactly sure on what line the error is, but when I click on the error message in chrome, the cursor goes here, so I am guessing this is the 'length' thats failing. ..... A=A.split(".")[1].length?o[p].delimiters.decimal+A.split(".")[1]:""..... This is where the call to numeral.js is made. var percentage = '3.98385103884072E-03'; var formattedPct = numeral(Math.abs(percentage)).format('0.0000'); It works fine when the files are not minified. Any idea where should I look into? Thanks.
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39563642
has comment: http://stackoverflow.com/comment/39563557
has comment: http://stackoverflow.com/comment/39563521
answer count: 0

http://stackoverflow.com/a/25340945
type: Answer
answers question: http://stackoverflow.com/q/25340854
has comment: http://stackoverflow.com/comment/39518492
has comment: http://stackoverflow.com/comment/39508651
upvote count: 1
score: 1
has body: if i got you correct, u can call the second ajax request in the success callback of the first one like below example $.get('ur resource URL',function(data){ $.get('new resource URL',{param1: data.param1, param2: data.prama2}, function(data2){ console.log(data2); }); });
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39508307
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25340854

http://stackoverflow.com/comment/39570078
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25374510
has text: When do you care about the output of this command? When you are already using a newer package than is "Wanted" on your system? When "Current" is behind "Wanted"? (I would assume that would be some sort of error case that it already checks for.)

http://stackoverflow.com/comment/39547591
has text: @Srinivasan__ yes, but none of the libraries mentioned in that post allow using predefined JavaScript classes or ignoring specific nodes. They don't allow any kind of mapping configuration that I've seen. If they do, could you please help with explanation and examples.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25362973

http://stackoverflow.com/comment/39427599
has text: Consider using something like http://jsfiddle.net/yp97qz51/. There is no need of using those `p` and `br` elements, you can use `display: block`. And instead of using `for` attribute in `label`, you can place the `input` inside. And uppercase is like shouting (and isn't valid XHTML)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25297428
score: 1

http://stackoverflow.com/q/25354535
tagged with: javascript
has answer: http://stackoverflow.com/a/26455242
answer count: 3
has answer: http://stackoverflow.com/a/72738675
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/66977338
has title: Cordova hooks, Get projects name
has answer: http://stackoverflow.com/a/66977338
accepted answer: http://stackoverflow.com/a/26455242
tagged with: node.js
score: 2
type: AnsweredQuestion
tagged with: cordova
upvote count: 2
type: Question
has body: I'm writing a cordova hook and part of it requires getting the projects name. So far, working from other examples, I have this. var cordova_util = require('cordova/src/util'); var projectRoot = cordova_util.isCordova(process.cwd()); var projectXml = cordova_util.projectConfig(projectRoot); var projectConfig = new cordova_util.config_parser(projectXml); projectConfig.name(); // Just for example, to get things working first console.log(projName); But once I run cordvoa prepare, I get this error, module.js:340 throw err; ^ Error: Cannot find module 'cordova/src/util' 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; (/Users/mhartington/Desktop/splashscreens/hooks/after_prepare/assets.js:3:20) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) Hook failed with error code 8: /Users/mhartington/Desktop/splashscreens/hooks/after_prepare/assets.js Any idea on what I'm doing wrong? What the correct way to get a cordova projects name from the config.xmland store it in a variable? Any help or ideas are appreciated!

internet-explorer-9
tag name: internet-explorer-9
tags question: http://stackoverflow.com/q/25269557
tags question: http://stackoverflow.com/q/25304897
tags question: http://stackoverflow.com/q/25297832
tags question: http://stackoverflow.com/q/25253249
tags question: http://stackoverflow.com/q/25322971
tags question: http://stackoverflow.com/q/25268626
tags question: http://stackoverflow.com/q/25366916
type: Tag

http://stackoverflow.com/comment/39386386
has text: So you can use routes without the timeSensor? I was using a positionInterpolator along with routes and a timeSensor to modify the scale of my box but it was a little wacky and inconsistent. Could you give an example of how to use interpolators without the timeSenor?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25248862
score: 0

http://stackoverflow.com/q/25298518
accepted answer: http://stackoverflow.com/a/25298584
has answer: http://stackoverflow.com/a/25298593
type: Question
has comment: http://stackoverflow.com/comment/39429072
possible better answer: http://stackoverflow.com/a/25298555
has answer: http://stackoverflow.com/a/25298555
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25298588
tagged with: css
answer count: 4
has answer: http://stackoverflow.com/a/25298584
has comment: http://stackoverflow.com/comment/39429011
has title: I have a class that I am trying to toggle on but it is not working properly
type: AnsweredQuestion
tagged with: sass
has body: I am trying to toggle a class onto one of my divs when I click on a button and for some reason the class will be added to the div but the actual CSS properties do not happen. The function that I am trying to run is at the bottom. Here is my code: HTML On (fill date), this person had a really terrible day. Close CSS .mainPage { background-color: #043D5D; color: white; text-align: center; position: relative; top: 0px; left: 0px; right: 0px; h2 { font-size: 4em; } p { font-size: 2em; } form { padding-bottom: 20px; input { width: 350px; height: 50px; border-radius: 10px; font-size: .95em; border: 1px solid #EB5055; background-color: #EB5055; cursor: pointer; } } } .replace { background-color: red; } JS $(".homeButton").on("click", function(event){ event.preventDefault(); $(".textBox").toggleClass('.replace'); });
has comment: http://stackoverflow.com/comment/39428981

http://stackoverflow.com/comment/39397128
type: Comment
comment on: http://stackoverflow.com/q/25281421
type: QuestionComment
score: 0
has text: Look this question: [http://stackoverflow.com/questions/166221/how-can-i-upload-files-asynchronously-with-jquery][1] - may be it will be useful for you. [1]: http://stackoverflow.com/questions/166221/how-can-i-upload-files-asynchronously-with-jquery

http://stackoverflow.com/comment/39503199
has text: Why would you call this.control outside of controller.init ? All it does is setting up the controller. It would not make sense elsewhere. I think you are looking in the wrong direction.
comment on: http://stackoverflow.com/q/25329552
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39444299
comment on: http://stackoverflow.com/q/25306533
score: 0
type: Comment
type: QuestionComment
has text: Icke, I don't want to bind a click. I just want to disable the click event (button is unclickable) when mouse is over the button and then when specific element appears on the page (select.select_operator) I want to make the button clickable again.

http://stackoverflow.com/comment/39382721
comment on: http://stackoverflow.com/q/25273470
type: QuestionComment
has text: Your regexp already requires that the year length is 4. However, the parentheses are in the wrong place, so it only matches `M/D/199x` or `20xx`, not `M/D/20xx`.
type: Comment
score: 1

http://stackoverflow.com/comment/39476317
has text: why do you want that if condition??
score: 1
comment on: http://stackoverflow.com/q/25324071
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25372455
favorite count: 0
has body: I have a form, which allows the user to add multiple 'row' of the same input fields, basically, asking users to specify the number of children they have. The form is very simple, as follows (abbreviated for reading purposes): &lt;form name="guestform" method="post"&gt; .... &lt;div class="children-part"&gt; &lt;ul&gt; &lt;li&gt;&amp;nbsp;&lt;li&gt; &lt;li&gt; &lt;label&gt;Name:&lt;/label&gt; &lt;input type="text" name="childfirstname" /&gt; &lt;li&gt; &lt;li&gt; &lt;label&gt;&amp;nbsp;&lt;/label&gt; &lt;input type="text" name="childlastname" /&gt; &lt;li&gt; &lt;li&gt; &lt;label&gt;Gender:&lt;/label&gt; &lt;input type="radio" name="childgender" value="M" /&gt; &lt;label&gt;Male&lt;/label&gt; &lt;input type="radio" name="childgender" value="F" /&gt; &lt;label&gt;Female&lt;/label&gt; &lt;li&gt; &lt;/ul&gt; &lt;/div&gt; .... &lt;/form&gt; I have a [+] button on the page that, via JavaScript, clones the div.children-part block for an n-th amount of entries (usually up to 3). I take the form and serialize the data so I can pass this via an AJAX call to a web service to be inserted into the database. Now, for a single child it's easy to get the query string values, but it becomes more complicated for more than one... example of a complex query_string: &amp;childfirstname=1&amp;childlastname=1&amp;childfirstname=2&amp;childlastname=2&amp;childfirstname=3&amp;childlastname=3&amp;childfirstname=4&amp;childlastname=4 My question is, is there a way to get these values into an array without writing complex loop statements? I currently split them on the $-character, into an array and then determine how many of a single string literal this array contains, then iterate over each one individually to build up a multi-dimensional array of the data that I need (more than one child), but this feels like overkill for something so simple?
has comment: http://stackoverflow.com/comment/39565710
accepted answer: http://stackoverflow.com/a/25372518
tagged with: php
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39565751
upvote count: 1
type: Question
tagged with: arrays
linked to: http://stackoverflow.com/q/6152436
tagged with: javascript
has comment: http://stackoverflow.com/comment/39565700
has comment: http://stackoverflow.com/comment/39565967
has title: PHP multiple query string values to array
has comment: http://stackoverflow.com/comment/39565921
downvote count: 0
answer count: 1
tagged with: query-string
has answer: http://stackoverflow.com/a/25372518

http://stackoverflow.com/comment/39405574
has text: I think it would really help if you try to explain the broader story of what you're trying to do here. Where in the user's interaction is this code running? There's a big difference between PHP and jQuery/Javascript, in that jQuery is run in the browser and PHP runs on the server before the page is sent to the browser. They aren't used in exactly the same ways.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25285813

maps
tags question: http://stackoverflow.com/q/25245914
tag name: maps
tags question: http://stackoverflow.com/q/25242983
tags question: http://stackoverflow.com/q/25253086
tags question: http://stackoverflow.com/q/25333282
type: Tag
tags question: http://stackoverflow.com/q/25331909
tags question: http://stackoverflow.com/q/25387876

http://stackoverflow.com/a/25309546
has body: &lt;script type='text/javascript'&gt; $(document).ready(function () { var fenster = $(location).attr('href'); if (fenster == 'http://www.cyrill-kuhlmann.de/index.php/') { $('#intro-page').show(function () { $(this).click(function () { $(this).fadeOut(250); }); }); } }); &lt;/script&gt; try the following: &lt;script type='text/javascript'&gt; $(document).ready(function () { var fenster = $(location).attr('href'); if (fenster == 'http://www.cyrill-kuhlmann.de/index.php/') { $('#intro-page').show(); $('#intro-page').click(function(){ // seperate it from show function call so you can have more access to object // and do logic on it. $(this).fadeOut(250); }); } }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/39588115
score: 0
answers question: http://stackoverflow.com/q/25309214
type: Answer
has comment: http://stackoverflow.com/comment/39611927
has comment: http://stackoverflow.com/comment/39588471

http://stackoverflow.com/a/25278537
accepted answer of: http://stackoverflow.com/q/25278421
score: 1
has comment: http://stackoverflow.com/comment/39391443
has comment: http://stackoverflow.com/comment/39391502
has body: Problem is rather unclear, I can just guess. I think your page style is locally set to 'none'. From https://support.mozilla.org/en-US/kb/websites-look-wrong-or-appear-differently#w_reset-the-page-style You may have inadvertently set the page style to No Style. To ensure Firefox is set to use the page's default style: Press the Alt key to temporarily bring up the traditional Firefox menus, click on the View menu, then select Page Style, then click Basic Page Style. Now that the page is using its default style, it may be displayed correctly. (Similiar process for other browsers.)
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39391484
type: Answer
answers question: http://stackoverflow.com/q/25278421
upvote count: 1

http://stackoverflow.com/q/25305378
linked to: http://stackoverflow.com/q/364952
answer count: 0
type: Question
has body: I have the following iframe which is empty until the click of a submit button which then find a persons address and pupulates the input fields, I then have some javascript thats takes thes values out of the iframe to populate some input fields on my page - The issue I am getting is undefined for str1 so it cant find the value inside the iFrame... Form Submit iFrame Postcode Lookup Script run at bottom of page $("#findAddressPanel .btn").click(function() { console.log('button clicked'); String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ""); } var str1 = $("#iframe").contents().find("#line0").val(); console.log(str1); if (str1.trim() == "") { document.getElementById("unrecognisedPostcodeLookup2").className = "feedback-panel-error address-error-show"; document.getElementById("findAddressPanel").className = "address-container-false"; } else { document.getElementById("unrecognisedPostcodeLookup2").className = "feedback-panel-error address-error-hide"; document.getElementById("addressPostCode").value = $("#iframe").contents().find("#postcode").val(); document.getElementById("addressLine1").value = $("#iframe").contents().find("#line0").val(); document.getElementById("addressLine2").value = $("#iframe").contents().find("#line1").val(); document.getElementById("addressLine3").value = $("#iframe").contents().find("#line2").val(); document.getElementById("addressLine4").value = $("#iframe").contents().find("#line3").val(); address_finder_setter(); });
tagged with: javascript
tagged with: jquery
score: 0
has title: Get value from input fields with iFrame
has comment: http://stackoverflow.com/comment/39441940
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39441990
has comment: http://stackoverflow.com/comment/39441742
has comment: http://stackoverflow.com/comment/39444188
type: UnansweredQuestion

http://stackoverflow.com/q/25230779
has comment: http://stackoverflow.com/comment/39302142
type: Question
upvote count: 0
score: -2
possible better answer: http://stackoverflow.com/a/25230824
has title: Number of objects with distinct property in a list
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25230824
has answer: http://stackoverflow.com/a/25230831
answer count: 3
has answer: http://stackoverflow.com/a/25231054
has comment: http://stackoverflow.com/comment/39302115
favorite count: 0
downvote count: 2
has body: Here is a simple data set data = [ {'artist':'a','song':'a'}, {'artist':'a','song':'b'}, {'artist':'a','song':'c'}, {'artist':'b','song':'d'}, {'artist':'b','song':'e'}, {'artist':'c','song':'f'}, {'artist':'d','song':'g'}, {'artist':'d','song':'h'}, {'artist':'d','song':'i'} ]; Is there any native function in javascript or jQuery that would allow me to get the number of disctinct artist in a concise expression ?
accepted answer: http://stackoverflow.com/a/25230831
type: AnsweredQuestion

http://stackoverflow.com/comment/77806870
has text: I had to replace dvr.wait and dvr.isElementPresent with browser.wait and browser.isElementPresent to make it work
type: Comment
comment on: http://stackoverflow.com/a/25251326
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39321169
has text: this gave a good idea although i would like html binding to support as virtual element
comment on: http://stackoverflow.com/a/25240545
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25238121
has comment: http://stackoverflow.com/comment/39411498
type: Answer
has comment: http://stackoverflow.com/comment/39320075
has comment: http://stackoverflow.com/comment/39327953
has body: You simply need to change the way you put values to tableJsonDTO. Demo. document.getElementById('toJSON').addEventListener('click', function(){ var table = document.getElementById('mytable'), names = [].slice.call(table.rows[0].cells), values = [].slice.call(table.rows, 1), out = {}; values.forEach(function(row) { //iterate over values var cells = row.cells, caption = cells[0].innerHTML; //get property name [].forEach.call(cells, function(cell, idx) { //iterate over answers var value = {}, arr; if(!idx) return; //ignore first column value[caption] = cell.innerHTML; //prepare value //get or init array of values for each name arr = out[names[idx].innerHTML] || (out[names[idx].innerHTML] = []); arr.push(value); }); }); console.log(out); });
accepted answer of: http://stackoverflow.com/q/25236975
has comment: http://stackoverflow.com/comment/39325895
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25236975
has comment: http://stackoverflow.com/comment/39333471
has comment: http://stackoverflow.com/comment/39320582
has comment: http://stackoverflow.com/comment/39353891
has comment: http://stackoverflow.com/comment/39324484

http://stackoverflow.com/comment/39508443
comment on: http://stackoverflow.com/a/25250180
score: 0
type: AnswerComment
has text: It should be `ng-repeat="i in [1,2,3,4]"`, isn't it?
type: Comment

http://stackoverflow.com/q/25315817
has answer: http://stackoverflow.com/a/25316440
answer count: 3
tagged with: highcharts
tagged with: javascript
tagged with: jquery
score: 0
has body: Please refer to http://jsfiddle.net/epoch/bCU2E/1/ . Three HighChart graphs are displayed; one corresponding to each div line above. If you go into the HTML window and remove the div line for id="graph" and re-run, only one chart will be displayed. Why is it that removing one div removes two charts? Now please copy and paste this same id="graph" div line so that there are two "graph" div lines followed by the "sales" and the "addsales" div lines. Please re-run. Why is it that a blank graph area is inserted? Why will it not insert another copy of the "Traffic by source" chart? I am guessing that this has to do with the fact that the previous instance of the "graph" div directed the second copy to the first graph div area because the naming has already been established. If the names are all locked in, then why does it create the blank chart area in the first place? If this is due to the div naming, then without touching the javascript window, is there any way to cause two instances of the "Traffic by source" chart to become visible? What if altering the javascript was allowed but creating another var chart was not? Is it possible to produce two instances of the "Traffic by source" chart? I am asking these question because I see this as a necessary stepping stone in learning how to really manipulate multiple charts on a single page. I am trying to construct say 20 charts and leave it to a user to select which of the charts to display and also allow the user to control the layout order and position of the selected charts. Any suggestions would be most helpful. Thank you.
has answer: http://stackoverflow.com/a/25316414
tagged with: http://stackoverflow.com/tag/html
has title: Behavior of multiple HighCharts on single page when removing one div
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25316421
type: Question

http://stackoverflow.com/q/25275840
has comment: http://stackoverflow.com/comment/39387249
possible better answer: http://stackoverflow.com/a/25276554
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25276554
has title: Modified data in a factory that's bound to a controller's scope, it doesn't update
type: Question
accepted answer: http://stackoverflow.com/a/25275959
has body: I have a pretty simple example (also available on this fiddle: http://jsfiddle.net/depov5w6/) I have 2 factories, one which returns an object with the property 'data', (which is bound to the scope of a controller) and another factory that has 2 methods: populateData and pushData. populateData sets the value of dataSource.data to be a new value. pushData pushes a new value onto dataSource.data angular.module("app",[]) .factory('dataSource', function() { return { data: ["Init Data"] }; }) .factory('dataModifier', function(dataSource) { return { populateData: function() { dataSource.data = ["data from populateData"]; }, pushData: function() { dataSource.data.push("new data from push data"); } } }) .controller('dataCtrl', function($scope, dataSource, dataModifier) { $scope.data = dataSource.data; $scope.populateData = dataModifier.populateData; $scope.pushData = dataModifier.pushData; }) In my view, I have a button that calls pushData and another button that calls populateData. I also display $scope.data Data: {{data}} Push Data Set Data To New Value If you look at the fiddle, if you click the Push Data button, new values get pushed onto the array. However, if you click 'Set Data To New Value', nothing happens and subsequent click to push data do nothing. I think I understand that when you click populate data, you lose the reference to the array that $scope.data was bound to, but why doesn't $scope realize that there is a new value for dataSource.data? How would I fix this? I tried making data a private variable, and using getters and setters, but that did nothing. I appreciate any insight.
has answer: http://stackoverflow.com/a/25276269
tagged with: javascript
tagged with: angularjs-scope
has answer: http://stackoverflow.com/a/25275959
answer count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/39387031
favorite count: 0
tagged with: angularjs
tagged with: angularjs-factory
type: AnsweredQuestion

http://stackoverflow.com/q/25272956
score: 0
has title: Node JS - executing a string of code in a new process
answer count: 1
accepted answer: http://stackoverflow.com/a/26497405
has body: Let's say I have a string of NodeJS code I want to execute, but it's untrusted, and thus I must sandbox it, using vm.runInNewContext(stringOfCode). Two questions arise: If I do have some objects I want to use within the executed code, how may that bee achieved? Let's say I want to limit the execution time of the code to 5 seconds, how may I do that? How may I run this code on a new process? I now I can use child_process.fork(), but how exactly will I do that? Thank you!!
tagged with: node.js
type: AnsweredQuestion
tagged with: process
tagged with: sandbox
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/26497405

http://stackoverflow.com/comment/39461091
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25313267
has text: Thanks! Those sites you mentioned there have been a great help

http://stackoverflow.com/q/25320047
tagged with: command-line-interface
accepted answer: http://stackoverflow.com/a/25326005
downvote count: 0
answer count: 1
linked to: http://stackoverflow.com/q/14458508
tagged with: shell
has comment: http://stackoverflow.com/comment/39469398
favorite count: 0
has body: Synchronous child process calls are now available in the versions of Node.js that are under development (i.e. unstable). This is great news for writing shell scripts, as it will allow code like this: var history = child_process.execSync('git log', { encoding: 'utf8' }); process.stdout.write(history); However, for code aimed at the current stable version of Node.js (v0.10.30), synchronous child process calls are not available except via external libraries. The two most popular such libraries appear to be shelljs and exec-sync. For shell scripts intended for use with v0.10.x, and which must call binaries or other executables and process their output, what are the relative pros and cons of these two libraries or other comparable libraries? Please provide code samples for illustration, if appropriate.
tagged with: node.js
type: AnsweredQuestion
tagged with: popen
score: 7
upvote count: 7
has comment: http://stackoverflow.com/comment/39479020
type: Question
has title: Synchronous child process calls for shell scripting (including CLI) in Node.js 0.10.x
has comment: http://stackoverflow.com/comment/39478742
has answer: http://stackoverflow.com/a/25326005
has comment: http://stackoverflow.com/comment/39478082
tagged with: javascript

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/25306079
tags question: http://stackoverflow.com/q/25341376
tags question: http://stackoverflow.com/q/25306378
tags question: http://stackoverflow.com/q/25235442
tags question: http://stackoverflow.com/q/25338252
tags question: http://stackoverflow.com/q/25274410
tags question: http://stackoverflow.com/q/25248941
tags question: http://stackoverflow.com/q/25244597
tags question: http://stackoverflow.com/q/25360605
tags question: http://stackoverflow.com/q/25265813
tags question: http://stackoverflow.com/q/25303473
tags question: http://stackoverflow.com/q/25301844
tags question: http://stackoverflow.com/q/25339784
tags question: http://stackoverflow.com/q/25366152
tags question: http://stackoverflow.com/q/25309053
tags question: http://stackoverflow.com/q/25251757
tags question: http://stackoverflow.com/q/25367458
tags question: http://stackoverflow.com/q/25269511
tags question: http://stackoverflow.com/q/25357582
tags question: http://stackoverflow.com/q/25376752
tags question: http://stackoverflow.com/q/25243924
tags question: http://stackoverflow.com/q/25343618
tags question: http://stackoverflow.com/q/25276998
tags question: http://stackoverflow.com/q/25386811
tags question: http://stackoverflow.com/q/25334408
tags question: http://stackoverflow.com/q/25290017
tags question: http://stackoverflow.com/q/25385598
tags question: http://stackoverflow.com/q/25372878
tags question: http://stackoverflow.com/q/25283311
tags question: http://stackoverflow.com/q/25309242
tags question: http://stackoverflow.com/q/25334158
tags question: http://stackoverflow.com/q/25366474
tags question: http://stackoverflow.com/q/25268974
tags question: http://stackoverflow.com/q/25352783
tags question: http://stackoverflow.com/q/25303865
tags question: http://stackoverflow.com/q/25310363
tags question: http://stackoverflow.com/q/25230645
tags question: http://stackoverflow.com/q/25352061
tags question: http://stackoverflow.com/q/25321456
tags question: http://stackoverflow.com/q/25291963
tags question: http://stackoverflow.com/q/25348088
tags question: http://stackoverflow.com/q/25233616
tags question: http://stackoverflow.com/q/25333771
tags question: http://stackoverflow.com/q/25341686
tags question: http://stackoverflow.com/q/25253702
tags question: http://stackoverflow.com/q/25374782
tags question: http://stackoverflow.com/q/25274640
tags question: http://stackoverflow.com/q/25319155
tags question: http://stackoverflow.com/q/25312573
tags question: http://stackoverflow.com/q/25281175
tags question: http://stackoverflow.com/q/25272852
tags question: http://stackoverflow.com/q/25335368
tags question: http://stackoverflow.com/q/25338940
tags question: http://stackoverflow.com/q/25350865
tags question: http://stackoverflow.com/q/25314611
tags question: http://stackoverflow.com/q/25379634
tags question: http://stackoverflow.com/q/25338554
tags question: http://stackoverflow.com/q/25371813
tags question: http://stackoverflow.com/q/25266844
tags question: http://stackoverflow.com/q/25311205
tags question: http://stackoverflow.com/q/25238690
tags question: http://stackoverflow.com/q/25279791
tags question: http://stackoverflow.com/q/25379661
tags question: http://stackoverflow.com/q/25338960
tags question: http://stackoverflow.com/q/25276266
tags question: http://stackoverflow.com/q/25259884
tags question: http://stackoverflow.com/q/25320796
tags question: http://stackoverflow.com/q/25350908
tags question: http://stackoverflow.com/q/25238297
tags question: http://stackoverflow.com/q/25298094
tags question: http://stackoverflow.com/q/25247970
tags question: http://stackoverflow.com/q/25382581
tags question: http://stackoverflow.com/q/25246707
tags question: http://stackoverflow.com/q/25248762
tags question: http://stackoverflow.com/q/25315283
tags question: http://stackoverflow.com/q/25320444
tags question: http://stackoverflow.com/q/25282793
tags question: http://stackoverflow.com/q/25265220
tags question: http://stackoverflow.com/q/25386032
tags question: http://stackoverflow.com/q/25253879

http://stackoverflow.com/comment/39467375
score: 0
type: Comment
has text: Hm, I did purposely not mention [memoisation](https://stackoverflow.com/search?q=memoize+fibonacci+%5Bjavascript%5D), as I did consider this to be not pure (functional). Introducing the `cache` is creating an external/global value, even if it's not a variable but a property.
comment on: http://stackoverflow.com/a/25318240
type: AnswerComment

http://stackoverflow.com/q/25342846
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25342995
has title: Overwriting a key, if it exists, in a key/value array
type: AnsweredQuestion
score: 0
type: Question
has body: I'm allowing users to highlight rows in a table by clicking them. When they click them, HighToggle() is called. HighToggle() checks to to see if the bgcolor of the td matches the highlighter color and either highlights or un-highlights. function HighToggle(cObj,vid,vColor,hColor) { if ((vColor == hColor)) { $(cObj).css('background-color','#FFFFFF'); // un-highlight vx.push({'id' : vid, 'status' : 'off'}); } else { $(cObj).css('background-color','#' + Highlighter.Hex); // highlight vx.push({'id' : vid, 'status' : 'on'}); } } It is important that I store these in an array, because I have recordset navigation that deletes the rows (from view) and loads in new rows via JSON. Otherwise, when I wanted to submit the data to the server, I could just loop through table rows and build the array pre-submit. So, that works fine, except that it adds duplicate id's in the case of each time something is highlighted or un-highlighted, so it might look like: 1: on, 7: on, 7: off, 2: on, 4: on, 1: off, 3: on, 1: on, 2: off. Which is just a mess. Following the same click process that results in that array above, what I'd like to end up with is.. 1: on, 7: off, 2: off, 4: on, 3: on Rows never interacted with (5, 6, 8, 9, 10 if the result set only had 10 rows), need not have an entry in the array at all. I'm looking for a fast way to search my array and override rows if they exist. I have thought of one solution that I haven't tried to implement yet because I feel like there might be something better. I could make a separate array, let's say it's called vindexes. Vindexes could use the ID passed as the vid variable like so.. vindexes[vid] = vx.length; HighToggle could check to see if vindexes[vid] exists, and if so, use that id to override rather than vx.push. It would work (wouldn't it?) but is it reinventing the wheel? Is there a faster way? This function will be used a lot on each page. I've found the grep function, since I'm using jQuery, but I don't think grep is applicable to me h…
has answer: http://stackoverflow.com/a/25342995
tagged with: arrays
answer count: 1

http://stackoverflow.com/q/25361874
score: -2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25362236
has comment: http://stackoverflow.com/comment/39544732
has title: How to get validation to work properly on my input fields
has answer: http://stackoverflow.com/a/25362236
answer count: 2
has body: I have managed to get my fields to calculate properly but now I am trying to add some validation to them which is proving difficult. What I aim to do is make sure that the fields have to contain numbers only and have to be filled in. function audience_details() if(fields.length === 0) { var aud1, aud2, total; var aud1 = parseInt(document.getElementById("audience_1_field").value); var aud2 = parseInt(document.getElementById("audience_2_field").value); var reach = parseInt(document.getElementById("reach_field").value); var total = (aud1 + aud2 - reach ) / aud1 * 100 ; total_field.value = parseFloat(total).toFixed(2) + '%'; estimate.value = parseFloat(total).toFixed(2) + '%'; } else { //alert fields must be complete / contain numbers only! } any help would be lovely here is the form http://jsfiddle.net/pjf2v7b8/
tagged with: validation
upvote count: 0
duplicate of: http://stackoverflow.com/q/18082
favorite count: 0
has answer: http://stackoverflow.com/a/25363096
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39544851
type: AnsweredQuestion
downvote count: 2
type: Question
linked to: http://stackoverflow.com/q/18082
accepted answer: http://stackoverflow.com/a/25363096

http://stackoverflow.com/a/25275065
answers question: http://stackoverflow.com/q/25274982
type: Answer
score: 0
has body: You can get it using this code: var regex = /\bGMT\s+([-+][0-9]+)\b/; var res = data.match(regex); console.log(res[1]); See JSFiddle.

http://stackoverflow.com/a/25275098
answers question: http://stackoverflow.com/q/25274560
score: 0
type: AcceptedAnswer
type: Answer
has body: OK, nvm, I got it. call() wasn't calling the "d3.svg.axis()" bit, it was calling the method I had wrapped around it. So, if I store my method in a variable like so: xTicks = @xTicks(x, dayTickFormat) I can call it more simply like this: xTickGroup = chart.append("g").attr("class", "day-ticks") .call(xTicks) .attr("transform", "translate(#{chartOptions.offset.left}, #{chartOptions.height - 10})") Hope this helps someone, someday :\
accepted answer of: http://stackoverflow.com/q/25274560

http://stackoverflow.com/comment/39388673
score: 0
type: Comment
type: AnswerComment
has text: Now I just also tried to create new promise around the function detailed in the [documentation](https://github.com/petkaantonov/bluebird/blob/master/API.md#new-promisefunctionfunction-resolve-function-reject-resolver---promise), but this did not work either. @Bergi, thank you so much for your help.
comment on: http://stackoverflow.com/a/25253537

http://stackoverflow.com/q/25251674
type: Question
has body: I have many tabs with html class "panel". when users hover a tab, the opacity become 0.4. When they move their mouse out of a tab, then the opacity become normal. This is my code but it doesn't work. No error reported on dev tool. It may have something to do the hovering element that is passed to the function. What are "event" and "$(this)" in this case? index.html &lt;div class="panel"&gt; text text text &lt;/div&gt; &lt;div class="panel "&gt; text text text &lt;/div&gt; shared.js $(".panel").on("mouseover", hoverUnownedPT(event)) .on("mouseout", stopHoveringUnownedPT(event)); function hoverUnownedPT(e){ $(this).css({ "opacity": "0.4", "filter": "alpha(opacity:40)" }); } function stopHoveringUnownedPT(e){ $(this).css({ "opacity": "1", "filter": "alpha(opacity:100)" }); }
has answer: http://stackoverflow.com/a/25251698
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25252017
accepted answer: http://stackoverflow.com/a/25252017
has comment: http://stackoverflow.com/comment/39342320
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
has answer: http://stackoverflow.com/a/25254044
possible better answer: http://stackoverflow.com/a/25251698
upvote count: 1
has title: jquery pass a hovering element to a function
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/25382709
type: Question
tagged with: object
tagged with: javascript
has body: For example, This is my object creation var myObj = {}; If I want to add value in my object, i'm doing this way. myObj.name = 'User1'; myObj.role = 'CEO'; This is fine. For my node.js project scenario, I need to pass level.type string object into myObj. In clearly like this, myObj.level.type = 'Level 1'; How to I append level.type named object values into myObj? I don't think this is may confused you. I need my object values like this, { "name": "User1", "role": "CEO", "level.type": "Level 1" }
has answer: http://stackoverflow.com/a/25382795
answer count: 3
has answer: http://stackoverflow.com/a/25382764
upvote count: 1
accepted answer: http://stackoverflow.com/a/25382764
possible better answer: http://stackoverflow.com/a/25382747
favorite count: 0
has title: JS - how to append child into an object
tagged with: node.js
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25382747

http://stackoverflow.com/q/25299460
has comment: http://stackoverflow.com/comment/39430919
type: Question
has body: How to calculator googolplex (10^(10^100)) the leading N (Ex: 100) binary digits from the left ? I know how to calculate a binary from the right to left, but this may take hundreds of years (Reference) to run...
has comment: http://stackoverflow.com/comment/39430874
tagged with: http://stackoverflow.com/tag/c
has comment: http://stackoverflow.com/comment/39431039
score: 4
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/25299931
downvote count: 0
tagged with: javascript
has title: Calculate googolplex binary from left to right
has comment: http://stackoverflow.com/comment/39431007
favorite count: 0
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/25300029
tagged with: c++
tagged with: numbers

http://stackoverflow.com/q/25368802
has answer: http://stackoverflow.com/a/46654200
score: 7
has comment: http://stackoverflow.com/comment/39558653
upvote count: 7
type: Question
has title: How to change the bootstrap caret pointing direction on click event
has body: I'm using 2.3.2 bootstrap As I can change the position of the caret icon when I click the menu button. I need that when I click the icon caret pointing up and when you click on another item the caret back to the initial state. How is this possible? The nav code Lorem 3 opes Lorem Olosmpa Lorem 2 isum Lorem mas Lorem Olosmpa Lorem 2 isum Link to fiddle to try to resolve Image example of the problem
has answer: http://stackoverflow.com/a/25369514
tagged with: javascript
has answer: http://stackoverflow.com/a/25369013
downvote count: 0
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/20760047
accepted answer: http://stackoverflow.com/a/25369514
possible better answer: http://stackoverflow.com/a/37445558
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/37445558
tagged with: twitter-bootstrap-2
tagged with: css
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/comment/39440688
type: Comment
has text: Updated the simplified version of my code. Results are still the same. @Chris-Martin
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25301412

http://stackoverflow.com/comment/39541996
has text: can you show us the rendered html.
comment on: http://stackoverflow.com/q/25360277
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25315494
tagged with: validation
tagged with: hapi.js
tagged with: javascript
has body: I'm trying to write a Joi validation for a JSON object coming into a Hapi handler. So far the code looks like this: server.route({ method: 'POST', path: '/converge', handler: function (request, reply) { consociator.consociate(request.payload) .then (function (result) { reply (200, result); }); }, config: { validate: { payload: { value: Joi.object().required().keys({ knownid: Joi.object() }) } } } }); You can see the Joi object validation so far in the config: validate: code section above. The JSON coming in looks like this. "key": '06e5140d-fa4e-4758-8d9d-e707bd19880d-testA', "value": { "ids_lot_args": { "this_id": "stuff", "otherThign": "more data" }, "peripheral_data": 'Sample peripheral data of any sort' } In this JSON above the key and value at the root of the object are required, and the section called ids_lot_args is required. The section that starts with peripheral_data could be there or not, or could be any other JSON payload. It doesn't matter, only key and value at the root level and ids_lot_args inside the value are required. So far, I'm stumbling through trying to get the Joi validation to work. Any ideas on how this should be setup? The code repo for Joi is located at https://github.com/hapijs/joi if one wants to check it out. I've been trying the allow all functions on objects to no avail so far.
favorite count: 0
upvote count: 10
has answer: http://stackoverflow.com/a/25345848
accepted answer: http://stackoverflow.com/a/25345848
has answer: http://stackoverflow.com/a/30711723
downvote count: 0
has title: When using Joi with Hapi, how does one setup a require on one key but allow any and all other keys?
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
score: 10
has answer: http://stackoverflow.com/a/26023301
possible better answer: http://stackoverflow.com/a/30711723
answer count: 3

http://stackoverflow.com/comment/39482398
comment on: http://stackoverflow.com/a/25327061
type: AnswerComment
score: 0
type: Comment
has text: You should create some JavaScript object ```Voter``` that has an ```observable``` data member ```name```. Then, you can even expand your ```Voter``` class later-on to add functionality!

http://stackoverflow.com/comment/39400074
score: 0
type: AnswerComment
type: Comment
has text: I dont understand! What todo with that line? and how do i add data to "selectExtra"?
comment on: http://stackoverflow.com/a/25283242

http://stackoverflow.com/a/25334490
upvote count: 2
type: Answer
score: 2
downvote count: 0
has body: It helps because the HTML page isn't rendered only after the DOM is ready: the browser starts rendering the page as it parses the DOM. This means that you can achieve a faster "load" of the page (even though the DOM isn't ready) by making the browser load the scripts last. The user can see your page, and even interact with it, before those scripts at the end are loaded. Of course, if your page is all built with scripts, there won't be much for the user to see.
answers question: http://stackoverflow.com/q/25334408

http://stackoverflow.com/q/25387672
has comment: http://stackoverflow.com/comment/39595027
accepted answer: http://stackoverflow.com/a/25387992
has body: I was reading over some of the MDN pages on regex, and came across a reference to the backspace unicode character, which intrigued me, because I wouldn't have though that backspace would have a character. The code for it is \U+0008. I decided to run a test and see what it was/did, so I entered 'abcd\u0008efg', in a browser, which returned "abcdefg". I got the same for console.log. My question is, what is a backspace character, and does it do anything when rendered in html/javascript?
has comment: http://stackoverflow.com/comment/39594960
has comment: http://stackoverflow.com/comment/39597312
upvote count: 5
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39607236
has answer: http://stackoverflow.com/a/25387992
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: unicode
has title: What does the backspace character do?
favorite count: 0
has comment: http://stackoverflow.com/comment/39594242
type: Question
score: 5
answer count: 1

http://stackoverflow.com/a/25319742
answers question: http://stackoverflow.com/q/25319711
has body: try this recursive ngRepeat How can I make recursive templates in AngularJS when using nested objects? your browseCategories function could just load the child list when it is clicked.
score: 0
has comment: http://stackoverflow.com/comment/39470098
type: Answer

http://stackoverflow.com/q/25303739
has body: function stripTags(s, n) { return s.replace(/<\/?(?!br\s*\/?)[a-z][a-z0-9]*[^<>]*>/ig, "").split(/\s+/).slice(0, n - 1).join(' '); } function rm(a, b, c) { var p = document.getElementById(a); var summ = summary; var summ = summary; imgtag = ""; var i = 0; img = p.getElementsByTagName("img"); imgsrc = img[i].src; var q = document.getElementById(b); var r = document.getElementById(c); for (var i = 0; i < img.length; i++) { if (img.length >=12) imgtag = ' '; else if (img.length >=8) imgtag = ' '; else if (img.length >= 1) imgtag = ' '; else imgtag = ' '; } } This is the code I have been using to fetch images from inside the post in the form of a gallery which contains at least 12 images. But it's showing only one images in result But I want to get 12 images in a row like this and also want to simplify the "if" and "else if" part of code using "i array" else if (img.length >=8) imgtag = ' '; can anyone best in javascript can help me to solve this issue. I want this strictly in javascript only
downvote count: 0
has comment: http://stackoverflow.com/comment/39440242
score: 1
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/25304132
tagged with: javascript
has title: How to append 12 images in a row continuosly using javascript
tagged with: image
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/32445768
score: 2
has comment: http://stackoverflow.com/comment/124708447
answers question: http://stackoverflow.com/q/25373968
downvote count: 0
upvote count: 2
has body: Make sure that you are your script is correct and that you are correctly typing "wow.js" OR "wow.min.js" for the minimal version. If not you will have animations but no wow.js delaying or scrolling. &lt;script src='js/wow.min.js'&gt;&lt;/script&gt; &lt;script&gt; new WOW().init(); &lt;/script&gt;
type: Answer

http://stackoverflow.com/comment/39436773
has text: Hi I have a zoom handler function but as default the zooming with pinch is still very jittery thats why i was trying to normalise it to make it a bit more smooth
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25293867
type: Comment

http://stackoverflow.com/q/25344509
has title: Effeciency, hidden HTML or JavaScript DOM appending?
type: Question
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25345546
tagged with: dom
possible better answer: http://stackoverflow.com/a/31495390
has body: I am working on a simple Cordova app with about 4 page types and I am trying to think through which is the better way to handle the inner HTML templates. Hidden HTML hard coded into the HTML files that is hidden and populated/revealed by my JS. Using a JS template system and appending and removing from the DOM. I feel that appending all that to the DOM for a page is inefficient when I could just update the sections that change. But perhaps an append is lightweight enough where I shouldn't worry about it.
has answer: http://stackoverflow.com/a/31495390
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25345546
has answer: http://stackoverflow.com/a/25344541
tagged with: cordova
has comment: http://stackoverflow.com/comment/39513926
upvote count: 1

http://stackoverflow.com/comment/39418236
has text: What do you get for console.log(data);?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25292835
score: 0

http://stackoverflow.com/q/25233629
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
accepted answer: http://stackoverflow.com/a/25236978
has title: SVG textpath via javascript not drawing
has body: I want to generate a simple textPath. I thought this would take me 5 minutes but now it has been a few hours and I've poured over stack overflow and google to find that my implementation looks right. I'm not sure whats missing. I can get a TextNode to attach to a text container but as soon as I put the textPath on it will not render in the SVG element. Welcome
type: AnsweredQuestion
upvote count: 3
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25236978
score: 3
answer count: 1

http://stackoverflow.com/comment/39404616
has text: There are no namespaces in JavaScript.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25285717

http://stackoverflow.com/q/25239408
linked to: http://stackoverflow.com/q/35692719
upvote count: 15
tagged with: node.js
tagged with: mongodb-query
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/76333942
has comment: http://stackoverflow.com/comment/107094472
type: Question
has body: According to the mongodb node driver docs the aggregate function now returns a cursor (from 2.6). I hoped that I could use this to get a count of items pre limit &amp; skipping but there doesn't seem to be any count function on the created cursor. If I run the same queries in the mongo shell the cursor has an itcount function that I can call to get what I want. I saw that the created cursor has an on data event (does that mean it's a CursorStream?) which seemed to get triggered the expected number of times, but if I use it in combination with cursor.get no results get passed into the callback function. Can the new cursor feature be used to count an aggregation query? Edit for code: In mongo shell: &gt; db.SentMessages.find({Type : 'Foo'}) { "_id" : ObjectId("53ea19af9834184ad6d3675a"), "Name" : "123", "Type" : "Foo" } { "_id" : ObjectId("53ea19dd9834184ad6d3675c"), "Name" : "789", "Type" : "Foo" } { "_id" : ObjectId("53ea19d29834184ad6d3675b"), "Name" : "456", "Type" : "Foo" } &gt; db.SentMessages.find({Type : 'Foo'}).count() 3 &gt; db.SentMessages.find({Type : 'Foo'}).limit(1) { "_id" : ObjectId("53ea19af9834184ad6d3675a"), "Name" : "123", "Type" : "Foo" } &gt; db.SentMessages.find({Type : 'Foo'}).limit(1).count(); 3 &gt; db.SentMessages.aggregate([ { $match : { Type : 'Foo'}} ]) { "_id" : ObjectId("53ea19af9834184ad6d3675a"), "Name" : "123", "Type" : "Foo" } { "_id" : ObjectId("53ea19dd9834184ad6d3675c"), "Name" : "789", "Type" : "Foo" } { "_id" : ObjectId("53ea19d29834184ad6d3675b"), "Name" : "456", "Type" : "Foo" } &gt; db.SentMessages.aggregate([ { $match : { Type : 'Foo'}} ]).count() 2014-08-12T14:47:12.488+0100 TypeError: Object #&lt;Object&gt; has no method 'count' &gt; db.SentMessages.aggregate([ { $match : { Type : 'Foo'}} ]).itcount() 3 &gt; db.SentMessages.aggregate([ { $match : { Type : 'Foo'}}, {$limit : 1} ]) { "_id" : ObjectId("53ea19af9834184ad6d3675a"), "Name" : "123", "Type" : "Foo" } &gt; db.SentMessages.aggregate([ { $match : { Type : 'Foo'}}, {…
has comment: http://stackoverflow.com/comment/39334454
has comment: http://stackoverflow.com/comment/107094454
score: 15
has title: Mongo aggregation cursor & counting
tagged with: mongodb
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39368711
accepted answer: http://stackoverflow.com/a/25377117
favorite count: 0
has answer: http://stackoverflow.com/a/76333942
has answer: http://stackoverflow.com/a/25377117

http://stackoverflow.com/q/25376098
downvote count: 0
favorite count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/22423057
score: 5
answer count: 4
has comment: http://stackoverflow.com/comment/39717003
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25376890
type: Question
possible better answer: http://stackoverflow.com/a/25376125
has body: I want to set manual dummy image if particular image is not available on website. Also how to set if that image is deleted on server or not available, in that case also i need to display default image using JS.
has answer: http://stackoverflow.com/a/25376189
has title: How to set manual default image, if image is not available on my site using js?
upvote count: 5
has answer: http://stackoverflow.com/a/25376125
tagged with: javascript
tagged with: image
accepted answer: http://stackoverflow.com/a/25376890
has answer: http://stackoverflow.com/a/25376181

http://stackoverflow.com/comment/39599828
comment on: http://stackoverflow.com/a/25388861
type: AnswerComment
score: 0
has text: Yea I am also not sure if I shall implement it just yet, but this is very helpful regardless. Thank you!
type: Comment

http://stackoverflow.com/comment/39597808
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25389437
has text: Not quite the same problem, in that case the issue was that the special character was part of the route name rather than the parameter itself, but you are right, it is within the same area.
score: 0

css
tags question: http://stackoverflow.com/q/25359439
tags question: http://stackoverflow.com/q/25323674
tags question: http://stackoverflow.com/q/25321084
tags question: http://stackoverflow.com/q/25254625
tags question: http://stackoverflow.com/q/25240539
tags question: http://stackoverflow.com/q/25247092
tags question: http://stackoverflow.com/q/25339227
tags question: http://stackoverflow.com/q/25273519
tags question: http://stackoverflow.com/q/25254778
tags question: http://stackoverflow.com/q/25275923
tags question: http://stackoverflow.com/q/25288639
tags question: http://stackoverflow.com/q/25249388
tags question: http://stackoverflow.com/q/25282457
tags question: http://stackoverflow.com/q/25265034
tags question: http://stackoverflow.com/q/25321847
tags question: http://stackoverflow.com/q/25273216
tags question: http://stackoverflow.com/q/25364760
tags question: http://stackoverflow.com/q/25265519
tags question: http://stackoverflow.com/q/25244184
tags question: http://stackoverflow.com/q/25315040
tags question: http://stackoverflow.com/q/25364224
tags question: http://stackoverflow.com/q/25282715
tags question: http://stackoverflow.com/q/25320162
tags question: http://stackoverflow.com/q/25293348
tags question: http://stackoverflow.com/q/25272691
tags question: http://stackoverflow.com/q/25296325
tags question: http://stackoverflow.com/q/25309093
tags question: http://stackoverflow.com/q/25285032
tags question: http://stackoverflow.com/q/25316197
tags question: http://stackoverflow.com/q/25309687
tags question: http://stackoverflow.com/q/25361724
tags question: http://stackoverflow.com/q/25348160
tags question: http://stackoverflow.com/q/25380198
tags question: http://stackoverflow.com/q/25237006
tags question: http://stackoverflow.com/q/25368418
tags question: http://stackoverflow.com/q/25293429
tags question: http://stackoverflow.com/q/25308776
tags question: http://stackoverflow.com/q/25314215
tags question: http://stackoverflow.com/q/25324539
tags question: http://stackoverflow.com/q/25369200
tags question: http://stackoverflow.com/q/25248892
tags question: http://stackoverflow.com/q/25341741
tags question: http://stackoverflow.com/q/25330414
tags question: http://stackoverflow.com/q/25388711
tags question: http://stackoverflow.com/q/25274723
tags question: http://stackoverflow.com/q/25313267
tags question: http://stackoverflow.com/q/25253991
tags question: http://stackoverflow.com/q/25347551
tags question: http://stackoverflow.com/q/25345550
tags question: http://stackoverflow.com/q/25268480
tags question: http://stackoverflow.com/q/25255470
tags question: http://stackoverflow.com/q/25287631
tags question: http://stackoverflow.com/q/25347494
tags question: http://stackoverflow.com/q/25350184
tags question: http://stackoverflow.com/q/25318296
tags question: http://stackoverflow.com/q/25322375
tags question: http://stackoverflow.com/q/25286935
tags question: http://stackoverflow.com/q/25283932
tags question: http://stackoverflow.com/q/25339836
tags question: http://stackoverflow.com/q/25315258
tags question: http://stackoverflow.com/q/25297408
tags question: http://stackoverflow.com/q/25352468
tags question: http://stackoverflow.com/q/25235442
tags question: http://stackoverflow.com/q/25338252
tags question: http://stackoverflow.com/q/25274410
tags question: http://stackoverflow.com/q/25288228
tags question: http://stackoverflow.com/q/25262786
tags question: http://stackoverflow.com/q/25265813
tags question: http://stackoverflow.com/q/25309053
tags question: http://stackoverflow.com/q/25337161
tags question: http://stackoverflow.com/q/25251757
tags question: http://stackoverflow.com/q/25243054
tags question: http://stackoverflow.com/q/25269511
tags question: http://stackoverflow.com/q/25356261
tags question: http://stackoverflow.com/q/25372878
tags question: http://stackoverflow.com/q/25263402
tags question: http://stackoverflow.com/q/25354856
tags question: http://stackoverflow.com/q/25334158
tags question: http://stackoverflow.com/q/25251674
tags question: http://stackoverflow.com/q/25268974

http://stackoverflow.com/a/25230888
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39302861
type: Answer
score: 1
has body: It's easy and i think this is the fastest solution, because require less jquery than the others (= keep your code clean) Add the following class to every div which contain the description: class="slide-desc" to your HTML Add var slideDesc = $('.slide-desc'); to your JS, which is just to fit your way of write jQuery, and slideDesc.hide(); (or $('.slide-desc').hide;, to use a faster way instead). This statement (it's better to call the .hide() method in first line of your JS, to avoid the description flashing while page is loading. Put it just after your declaration of variables. Add somewhere in the JS these lines: $('#slidesContainer').hover(function(){ slideDesc.show(); }); You've done! :D
answers question: http://stackoverflow.com/q/25230507

http://stackoverflow.com/a/25281250
type: Answer
has body: I got the solution using mRender we can sort this out {"mData" : "organizationId", "mRender": function ( data, type, full ) { return 'Download'; }
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25280338
accepted answer of: http://stackoverflow.com/q/25280338

http://stackoverflow.com/q/25341597
type: Question
tagged with: khan-academy
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25341598
has answer: http://stackoverflow.com/a/55349879
has title: How can Khan Academy computer programs be run offline or on my own website?
has body: I have developed programs in Khan Academy's Computer Programming lessons that I would like to run outside of Khan Academy. How can that be done?
answer count: 4
favorite count: 0
accepted answer: http://stackoverflow.com/a/25341598
has answer: http://stackoverflow.com/a/33214555
score: 13
tagged with: processing.js
upvote count: 13
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/33214555
has answer: http://stackoverflow.com/a/73969569

http://stackoverflow.com/comment/39508130
comment on: http://stackoverflow.com/a/25296467
type: AnswerComment
score: 0
has text: Well, then try this: [http://jsfiddle.net/yq6ycyhr/1/](http://jsfiddle.net/yq6ycyhr/1/) You've about run me to the end of my knowledge. The trouble, in my opinion, is that a number like `0.05...` will round to 0%. Is that what you want?
type: Comment

http://stackoverflow.com/a/25302785
downvote count: 1
has comment: http://stackoverflow.com/comment/39437632
has comment: http://stackoverflow.com/comment/39438164
answers question: http://stackoverflow.com/q/25302676
score: -1
has body: the code $('#myselect').append(" Tes3 "); seems ok to me. But for instance check the two suggestion I am giving you 1) First try this change " Tes3 "; to ' Tes3 ' 2) Also try to use selected='selected' may be that can also cause problem I misunderstood that myselect and mydropdown are same dropdowns.. Sorry, anyways your code is allright. do one thing, try to remove the class of the #myselect(if any class is there) to see if your code works
has comment: http://stackoverflow.com/comment/39437838
has comment: http://stackoverflow.com/comment/39436884
has comment: http://stackoverflow.com/comment/39438319
upvote count: 0
has comment: http://stackoverflow.com/comment/39438212
has comment: http://stackoverflow.com/comment/39437008
type: Answer
has comment: http://stackoverflow.com/comment/39438691
has comment: http://stackoverflow.com/comment/39437689
has comment: http://stackoverflow.com/comment/39437994
has comment: http://stackoverflow.com/comment/39438382

http://stackoverflow.com/q/25348490
has answer: http://stackoverflow.com/a/25348690
tagged with: image
type: Question
accepted answer: http://stackoverflow.com/a/25348690
tagged with: url
tagged with: javascript
has answer: http://stackoverflow.com/a/25348540
has title: PHP: Detect url in text, check if url is image or website and then echo image
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has body: So I'm working on a project, and what I need to do is I have some text, and in that text it has lots of words and then a url which is an image. What I need to do it first, detect if that url is a website or an image, and then if it is an image I need to display the image with the &lt;img&gt; tags, and if it's a website echo the url with the &lt;a href&gt; tags. So far I have a script to detect if it's a url or image, but I still need to echo the image or url in the text. Here is the script: &lt;?php function detectImage($url) { $url_headers=get_headers($url, 1); if(isset($url_headers['Content-Type'])){ $type=strtolower($url_headers['Content-Type']); $valid_image_type=array(); $valid_image_type['image/png']=''; $valid_image_type['image/jpg']=''; $valid_image_type['image/jpeg']=''; $valid_image_type['image/jpe']=''; $valid_image_type['image/gif']=''; $valid_image_type['image/tif']=''; $valid_image_type['image/tiff']=''; $valid_image_type['image/svg']=''; $valid_image_type['image/ico']=''; $valid_image_type['image/icon']=''; $valid_image_type['image/x-icon']=''; if(isset($valid_image_type[$type])){ echo "url is image"; } else { echo "url is website"; } } } ?&gt;
tagged with: php
possible better answer: http://stackoverflow.com/a/25348521
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25348521

http://stackoverflow.com/q/25307744
type: Question
linked to: http://stackoverflow.com/q/5619102
has title: Submit form using javascript and receive it from other page
tagged with: javascript
tagged with: forms
score: 0
accepted answer: http://stackoverflow.com/a/25308663
answer count: 2
has comment: http://stackoverflow.com/comment/39448021
tagged with: jquery
has answer: http://stackoverflow.com/a/25307823
has body: I'm trying to submit a form to a PHP page, but the data is not accessible from this page, This is my code: Html code: &lt;form method="post" id="formid" action="test.php"&gt; &lt;input type="hidden" name="going" id="going" value="" /&gt; &lt;/form&gt; Javascript: $("#ongoing").change(function() { var ongoing = $(this).attr('checked'); var input = document.getElementById('going'); var form = document.getElementById('formid'); if (ongoing) input.value = "1"; else input.value = "0"; form.submit(); }); test.php if(isset($_POST['going'])) echo $_POST['going']; What am I doing wrong?
possible better answer: http://stackoverflow.com/a/25307823
tagged with: php
has comment: http://stackoverflow.com/comment/39446198
has comment: http://stackoverflow.com/comment/39445959
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25308663

http://stackoverflow.com/q/25252002
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39343237
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/39343381
has comment: http://stackoverflow.com/comment/39342954
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25252237
tagged with: jquery
has answer: http://stackoverflow.com/a/25252209
score: 0
has title: Is there a way to know if a div's contents are in a "clipped" state when overflow: hidden?
has body: I would like to style a div differently when its contents are clipped due to overflow: hidden or overflow: scroll. On some browser there is no indication that the contents can be scrolled through, and this is not great for usability. As far as I know there is no pseudo class of :clipped or anything like that. But that would be very useful. Is there any way to do this without writing my own algorithm? Javscript solutions also welcome...
upvote count: 1
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25254010
has title: Get value of slider while it's being moved?
answer count: 2
downvote count: 0
tagged with: jquery
has body: I'm messing around learning some basic front-end web technologies - Bootstrap, jQuery, HTML5 canvas - and I wanted to be able to update the dimensions of a sinusoid I'm drawing as the slider moves, not when it's released (how it currently works). &lt;input type="range" id="ampSlider" min="-200" max="200" step="5" onchange="refreshGraph()"&gt; &lt;input type="range" id="freqSlider" min="1" max="400" step="5" onchange="refreshGraph()"&gt; &lt;canvas id="graphCanvas" width="1000" height="600"&gt;&lt;/canvas&gt; &lt;script&gt; drawShape(); drawGraph(200, 150); $("#ampSlider").val(200); $("#freqSlider").val(150); function refreshGraph() { console.log($("#ampSlider").val()); drawGraph($("#ampSlider").val(), $("#freqSlider").val()); } function drawGraph(amp, freq) { console.log("Drawing: " + amp + " | " + freq); var canvas = document.getElementById('graphCanvas'); var context = canvas.getContext('2d'); context.clearRect(0, 0, canvas.width, canvas.height); var y = canvas.height/2; context.lineWidth = 10; context.beginPath(); context.moveTo(0, y); for(n = 0; n &lt; canvas.width; n += 5) { context.lineTo(n, amp * Math.sin(Math.PI * n / freq) + y); } context.stroke(); } &lt;/script&gt;
has answer: http://stackoverflow.com/a/25254127
favorite count: 0
possible better answer: http://stackoverflow.com/a/25254226
has answer: http://stackoverflow.com/a/25254226
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 7
has comment: http://stackoverflow.com/comment/39347144
accepted answer: http://stackoverflow.com/a/25254127
upvote count: 7
type: Question
tagged with: javascript

http://stackoverflow.com/q/25301636
tagged with: jquery
has answer: http://stackoverflow.com/a/25301774
score: -3
possible better answer: http://stackoverflow.com/a/25301749
has comment: http://stackoverflow.com/comment/39434954
has answer: http://stackoverflow.com/a/25301749
has answer: http://stackoverflow.com/a/25301899
has title: Change html text using jQuery
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39434935
answer count: 7
has comment: http://stackoverflow.com/comment/39434861
has answer: http://stackoverflow.com/a/25301968
favorite count: 0
has comment: http://stackoverflow.com/comment/39434680
has answer: http://stackoverflow.com/a/25302228
has comment: http://stackoverflow.com/comment/39434700
accepted answer: http://stackoverflow.com/a/25301774
has answer: http://stackoverflow.com/a/25301665
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39434684
downvote count: 3
has comment: http://stackoverflow.com/comment/39434692
has comment: http://stackoverflow.com/comment/39434762
type: Question
has answer: http://stackoverflow.com/a/25301687
has comment: http://stackoverflow.com/comment/39434816
upvote count: 0
has body: I'm trying to change the text of h2 , when the user clicks a button. Javascript : $("#GoButton").click(function() { $("#myDiv").html("Hello World"); }); and the html : GO I have tried to switch links so jQuery will load first (that solved another problem). Still can't find what im doing wrong. Also tried : $("#GoButton").click(function() { $("#myDiv").innerHtml("Hello World"); });
has comment: http://stackoverflow.com/comment/39434876
has comment: http://stackoverflow.com/comment/39434815
tagged with: javascript

http://stackoverflow.com/q/25309945
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25310510
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
has body: Problem: I have a table and a clickable . What I want to happen is when I clicked on any of the following It will become active but I can't do it right. DOM Directive $scope.selectPosition = function(position){ $scope.selectedPosition = position; } Text Render i1-[j1,j2,j3] i2-[j1,j2,j3] i3-[j1,j2,j3] Current Output: This is the current output when I'm clicking on any of the ff: [i1,j1],[i2,j1],[i3,j1] Expected Output: This is the expected output when I clicked on the center [i2,j2] I already tried to pass array and object on the selectPosition function but still not working. Not sure If I'm doing it right. Please let me know if something is not clear. Thank you in advance.
has title: making table cell active using ng-click with ng-repeat
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25310260
has answer: http://stackoverflow.com/a/25310260
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25310510

http://stackoverflow.com/a/25334500
upvote count: 11
accepted answer of: http://stackoverflow.com/q/25334408
score: 11
has comment: http://stackoverflow.com/comment/73171749
answers question: http://stackoverflow.com/q/25334408
has comment: http://stackoverflow.com/comment/73172826
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: JavaScript loading isn't part of the DOM, but it's blocking and it will interrupt the loading process until it's done. Even if it's a small script, it's still an extra request and will slow down the whole process. The truth is browsers only need the DOM structure to start rendering. They don't need the scripts nor do they count for layout purposes. They are just dead weight until they are executed. Even CSS could be considered unnecessary for the initial rendering process (more or less), but since CSS loading is non-blocking, this isn't an issue. The performance gain from putting scripts at the bottom can vary, and even if it's a recommended practice, it might not always be harmless. When dealing with CMSes, for example, you might design your theme to load the scripts at the bottom, but you have no control over plugins. This happens a lot with WordPress, for example, and people end up putting script in the head to avoid conflicts with plugins. Bonus Track When in comes to tracking scripts, such as mixpanel, inspectlet, even Google Analytics... you might want to detect when a user enters your page and leaves a few seconds later due to slow loading times, an adult advertising block... whatever. If you put the tracking script and the bottom it might not be able to boot in time to detect that visit, so you won't know you have such an extreme bounce rate. In this case I'd consider putting the script in the head. If you put resource hints at the beginning, say Or It would mitigate the drawback of loading said scripts in the head.

http://stackoverflow.com/comment/39609626
type: Comment
has text: @user3105700 how do you think i can re-write the above?
type: AnswerComment
comment on: http://stackoverflow.com/a/25395784
score: 0

http://stackoverflow.com/comment/39572207
score: 0
comment on: http://stackoverflow.com/q/25375877
type: Comment
type: QuestionComment
has text: It's totally normal for some selectors to select 0 elements on some pages. That's not an error state most of the time.

higher-order-functions
tags question: http://stackoverflow.com/q/25249913
tag name: higher-order-functions
type: Tag

http://stackoverflow.com/comment/39422734
has text: That's my concern, I was hoping that I just missed it in the source as SharePoint can do some "interesting" things. Maybe I can take off the hidden view in SharePoint to get it in the DOM then hide it.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25294265
score: 0

http://stackoverflow.com/q/25309050
tagged with: javascript
tagged with: jquery
score: 0
tagged with: slickgrid
has body: I have been looking for built in multi-row select. I see that I could override the selection method but I was really hoping that it was built in to the tool. I add row selection with the RowSelectionModel. grid.setSelectionModel(new Slick.RowSelectionModel()); Should I be using something else?
has answer: http://stackoverflow.com/a/25392082
accepted answer: http://stackoverflow.com/a/25392082
has title: SlickGrid multi row select
type: AnsweredQuestion
type: Question
answer count: 1

http://stackoverflow.com/comment/39583516
type: AnswerComment
type: Comment
has text: Now kindly tell me one thing. say on mouse out i want to check wether the dropdown is open or not , then how to do that ?
comment on: http://stackoverflow.com/a/25377701
score: 0

http://stackoverflow.com/q/25362917
type: UnansweredQuestion
upvote count: 1
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/39561139
has title: Isolating memory leaks with Chrome Dev Tools nowadays
tagged with: google-chrome-devtools
type: Question
has answer: http://stackoverflow.com/a/29849698
downvote count: 0
tagged with: javascript
has body: The other day I was trying to use the famous three-snapshot-technique as described by Addy Osmani in this post. Not that I suspect to have any but as a normal precaution I tend to look for them before launching a new application. I've used this multiple times without any issues. However, in latest versions of Chrome, it seems the comparison view between heap allocations is no longer possible so you can't see what's retained between them that's causing the leak. Attaching one screenshot from the quoted article and one screenshot from my machine. Allocation comparison No allocation comparison :( Chrome version is latest stable for Mac which is "36.0.1985.143" at the time of writing. I've also tried Canary and it doesn't work. Any ideas of what's the approach nowadays with the changed Chrome?
linked to: http://stackoverflow.com/q/11969062
tagged with: memory-leaks
answer count: 1
has comment: http://stackoverflow.com/comment/39754808
score: 1
has comment: http://stackoverflow.com/comment/39585185
favorite count: 0
has comment: http://stackoverflow.com/comment/40065618

http://stackoverflow.com/q/25362312
score: 0
tagged with: css
accepted answer: http://stackoverflow.com/a/25362434
type: Question
has title: Javascript css transition for vertical size does not work
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25362434
has body: I Have an element named 'frame'. I have a button with code linked with 'onlclik'. The idea is apply a height decrease transition to this 'frame'. This code results into a simple frame hide, without transition. frame.style.cssText+="transition: height 1500ms; -webkit-transition: height 1500ms;"; frame.style.height = "0px"; //frame.style.display = "block"; (The last line can be applied or not, getting the same result.) I can play with increasing or decreasing the height, but in both cases the height is applied instantly. There is not transition... Now the surprising behavioor.... The transition works fine !!! I write any height at the styles chrome debugger window and I see the transition works !! What is the reason becasue the transition does not work at code level ? I have another similar transition code for width increase and it works fine. Any idea? Thanks
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/779379

http://stackoverflow.com/q/25292912
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25293005
score: 0
upvote count: 1
downvote count: 1
type: Question
has body: I want to get value from highest while text field in the same class I have tried to make a script like this but it does not work. &lt;input class="resbobot" name="BobotY2" id="BobotY2" type="text"value="100"&gt; &lt;input class="resbobot" name="BobotY3" id="BobotY3" type="text"value="80"&gt; &lt;input class="resbobot" name="BobotY4" id="BobotY4" type="text"value="70"&gt; JS $(".resbobot").each(function() { if ($(this).val()===100) { alert($(this).val()); }
has answer: http://stackoverflow.com/a/25293143
has answer: http://stackoverflow.com/a/25292988
tagged with: javascript
has title: How to get highest value text while field in same class, id and name?
has answer: http://stackoverflow.com/a/25293005
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25293153
answer count: 5
has answer: http://stackoverflow.com/a/25293153
has answer: http://stackoverflow.com/a/25293471

http://stackoverflow.com/comment/39614151
type: Comment
has text: Is someone knows the right way to do this. Please Help me.
type: QuestionComment
comment on: http://stackoverflow.com/q/25364756
score: 0

http://stackoverflow.com/q/25310923
type: Question
has answer: http://stackoverflow.com/a/25310996
has comment: http://stackoverflow.com/comment/39451669
answer count: 1
has title: How to insert one character before another?
tagged with: javascript
tagged with: jquery
tagged with: string
has comment: http://stackoverflow.com/comment/39451665
tagged with: insert
accepted answer: http://stackoverflow.com/a/25310996
tagged with: character
score: 0
has body: I have a list with the following markup: September 4 @ 10:00 am - 5:00 pm Some Hotel, London But I'd like to insert a tag before the '@' character (I need to do this in jQuery due to it being a WP plugin with little customisation optons) Does anyone know how I can do it?
type: AnsweredQuestion

http://stackoverflow.com/a/25311981
has body: Answered my own question by looking at the code should use "content" as the property and not otherEpisodes. D'oh.
accepted answer of: http://stackoverflow.com/q/25311885
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25311885

http://stackoverflow.com/comment/39481042
comment on: http://stackoverflow.com/q/25326536
score: 0
type: Comment
type: QuestionComment
has text: are you sure? i can imagine it is more performant for the garbage collector

http://stackoverflow.com/comment/39335483
comment on: http://stackoverflow.com/a/25243379
score: 0
type: AnswerComment
has text: The solutions i have provided are just quick alternatives, a roled out production version could look on any device like it was instant, lots of tricks can be used to make your app, web page seem like it is on steroids. Try to use native code where you can, as the user experience is what makes you apps have the wow factor, glad to be of service.
type: Comment

http://stackoverflow.com/q/25336439
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/25340738
upvote count: 0
tagged with: http://stackoverflow.com/tag/pdf
answer count: 1
favorite count: 0
tagged with: pdf.js
tagged with: android
tagged with: http://stackoverflow.com/tag/html
has body: I am using PDF.js to download and display pdf files in the WebView of my Android app. I use this implementation: https://github.com/pauldmps/Android-pdf.js So far, everything was fine. The "next page" and "previous page" was handled by two buttons in the html file which is implemented like this: &lt;div&gt; &lt;button id="prev" onclick="goPrevious()" class="button"&gt;Previous&lt;/button&gt; &lt;button id="next" onclick="goNext()" class="button"&gt;Next&lt;/button&gt; &amp;nbsp; &amp;nbsp; &lt;span&gt;Page: &lt;span id="page_num"&gt;&lt;/span&gt; / &lt;span id="page_count"&gt;&lt;/span&gt;&lt;/span&gt; &lt;/div&gt; I wanted to remove these buttons from HTML and rather use two buttons on the actionbar to implement page navigation. I call these buttons like this: @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.action_next: WebView.clearCache(true); webView.loadUrl("javascript:goNext()"); case R.id.action_previous: webView.clearCache(true); webView.loadUrl("javascript:goPrevious()"); } This causes the page to change on clicking the next/previous buttons but instead of rendering a fresh page, the next page is overlapped with the previous one &amp; everything looks garbage. Why is this happening ? Both the implementations call the same javascript function, yet one works perfectly, other causes this problem ?
has answer: http://stackoverflow.com/a/25340738
type: AnsweredQuestion
downvote count: 1
type: Question
has title: PDF.js garbage rendering issue

http://stackoverflow.com/comment/39418739
type: Comment
comment on: http://stackoverflow.com/a/25292659
type: AnswerComment
has text: Well, in this case I think `form.elements` should fit your needs to, but I really don't know which is better in this case. What you can do is set a class for all your elements starting with `location` in name tag, then you select them with `.location-element`. In this case `querySelectorAll` will make more sense.
score: 0

http://stackoverflow.com/a/25995073
answers question: http://stackoverflow.com/q/25310304
downvote count: 0
has body: The client.js library that Google has for the API endpoints can be run only from browsers (Titanium.UI.WebView in this case), it can't be run directly from Titanium code since it contains objects not available in Titanium Appcelerator. Also, using a Google Cloud Endpoint into an Alloy Titanium application requires having the js code available into the project at compile time, as it is used by Titanium to generate the native code for the desired platforms. To anwser your questions: Is there a way, I can include this file ? No, if you plan to run the code as Titanium code, for the reasons mentioned above. Instead you could use the following code snippet to connect to a Google Cloud Endpoint: var url = "https://1-dot-projectid.appspot.com/_ah/api/rpc"; var methodName = "testendpoint.listGreetings"; var apiVersion = "v1"; callMethod(url, methodName, apiVersion, { success : function(responseText) { //work with the response }, error : function(e) { //onerror do something } }); function callMethod(url, methodName, apiVersion, callbacks) { var xhr = Titanium.Network.createHTTPClient(); xhr.onload = function(e) { Ti.API.info("received text: " + this.responseText); if (typeof callbacks.success === 'function') { callbacks.success(this.responseText); } }; xhr.onerror = function(e) { Ti.API.info(JSON.stringify(e)); //Ti.API.info(e.responseText); if (typeof callbacks.error === 'function') { callbacks.error(e); } }; xhr.timeout = 5000; /* in milliseconds */ xhr.open("POST", url, true); xhr.setRequestHeader('Content-Type', 'application/json-rpc'); //xhr.setRequestHeader('Authorization', 'Bearer ' + token); var d = [{ jsonrpc: '2.0', method: methodName, id: 1, apiVersion: apiVersion, }]; Ti.API.info(JSON.stringify(d)); // Send the request. xhr.send(JSON.stringify(d)); } Yes, if you use the embeded device's browser like this (as can be found in web client GAE samples) webview = Titanium.UI.createWebView({ width : '100%', height : '100%', url : url // put your link to the HTML page })…
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/q/25351184
upvote count: 1
type: AnsweredQuestion
has body: Whats the reliable way on getting the filename of a file by removing suffix in javascript? I have a file let's say : http://example.com/uploads/images/a51dd42_thumb.jpg and http://example.com/uploads/images/a51dd42_s.jpg Now i want to get the string http://example.com/uploads/images/a51dd42.jpg replace() function is not what i want since images filename could have many different types of suffixes Maybe regex is the best for this? If yes, whats the reliable code for it? Thanks in advance
tagged with: javascript
type: Question
answer count: 3
has title: How to reliably get the filename without the suffix in javascript?
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39525457
possible better answer: http://stackoverflow.com/a/25351241
tagged with: regex
has answer: http://stackoverflow.com/a/25351241
has answer: http://stackoverflow.com/a/25351224
has answer: http://stackoverflow.com/a/25351330
tagged with: filenames
score: 1
accepted answer: http://stackoverflow.com/a/25351224

http://stackoverflow.com/a/25295382
answers question: http://stackoverflow.com/q/25294352
score: 0
has body: Figured out Answer: submitHandler: function (form) { $('.money_mask').unmask(); $('.num_mask_thou').unmask(); $('.zipcode').unmask(); form.submit(); }
type: Answer

http://stackoverflow.com/comment/39453906
has text: Are you using JQueryMigrate?
type: QuestionComment
comment on: http://stackoverflow.com/q/25312042
score: 0
type: Comment

http://stackoverflow.com/comment/39573973
has text: or you can make it absolute
comment on: http://stackoverflow.com/a/25376932
score: 0
type: AnswerComment
type: Comment

angularjs
tags question: http://stackoverflow.com/q/25279626
tags question: http://stackoverflow.com/q/25292060
tags question: http://stackoverflow.com/q/25245164
tags question: http://stackoverflow.com/q/25271661
tags question: http://stackoverflow.com/q/25304804
tags question: http://stackoverflow.com/q/25276223
tags question: http://stackoverflow.com/q/25333089
tags question: http://stackoverflow.com/q/25309265
tags question: http://stackoverflow.com/q/25364568
tags question: http://stackoverflow.com/q/25253672
tags question: http://stackoverflow.com/q/25338035
tags question: http://stackoverflow.com/q/25316309
tags question: http://stackoverflow.com/q/25264942
tags question: http://stackoverflow.com/q/25366412
tags question: http://stackoverflow.com/q/25381559
tags question: http://stackoverflow.com/q/25366913
tags question: http://stackoverflow.com/q/25306933
tags question: http://stackoverflow.com/q/25316018
tags question: http://stackoverflow.com/q/25378765
tags question: http://stackoverflow.com/q/25369866
tags question: http://stackoverflow.com/q/25383022
tags question: http://stackoverflow.com/q/25388159
tags question: http://stackoverflow.com/q/25251874
tags question: http://stackoverflow.com/q/25252949
tags question: http://stackoverflow.com/q/25331316
tags question: http://stackoverflow.com/q/25263503
tags question: http://stackoverflow.com/q/25381100
tags question: http://stackoverflow.com/q/25280052
tags question: http://stackoverflow.com/q/25302450
tags question: http://stackoverflow.com/q/25373060
tags question: http://stackoverflow.com/q/25297344
tags question: http://stackoverflow.com/q/25365218
tags question: http://stackoverflow.com/q/25357996
tags question: http://stackoverflow.com/q/25236501
tags question: http://stackoverflow.com/q/25320346
tags question: http://stackoverflow.com/q/25333952
tags question: http://stackoverflow.com/q/25367805
tags question: http://stackoverflow.com/q/25261977
tags question: http://stackoverflow.com/q/25299333
tags question: http://stackoverflow.com/q/25235305
tags question: http://stackoverflow.com/q/25296960
tags question: http://stackoverflow.com/q/25343729
tags question: http://stackoverflow.com/q/25240069
tags question: http://stackoverflow.com/q/25368301
tags question: http://stackoverflow.com/q/25314019
tags question: http://stackoverflow.com/q/25283343
tags question: http://stackoverflow.com/q/25276106
tags question: http://stackoverflow.com/q/25307567
tags question: http://stackoverflow.com/q/25339278
tags question: http://stackoverflow.com/q/25322035
tags question: http://stackoverflow.com/q/25277597
tags question: http://stackoverflow.com/q/25314849
tags question: http://stackoverflow.com/q/25370594
tags question: http://stackoverflow.com/q/25253337
tags question: http://stackoverflow.com/q/25361023
tags question: http://stackoverflow.com/q/25376950
tags question: http://stackoverflow.com/q/25304851
tags question: http://stackoverflow.com/q/25256504
tags question: http://stackoverflow.com/q/25335289
tags question: http://stackoverflow.com/q/25353426
tags question: http://stackoverflow.com/q/25375553
tags question: http://stackoverflow.com/q/25278251
tags question: http://stackoverflow.com/q/25274449
tags question: http://stackoverflow.com/q/25233932
tags question: http://stackoverflow.com/q/25322977
tags question: http://stackoverflow.com/q/25315442
tags question: http://stackoverflow.com/q/25310265
tags question: http://stackoverflow.com/q/25275948
tags question: http://stackoverflow.com/q/25374317
tags question: http://stackoverflow.com/q/25230249
tags question: http://stackoverflow.com/q/25251840
tags question: http://stackoverflow.com/q/25246540
tags question: http://stackoverflow.com/q/25304228
tags question: http://stackoverflow.com/q/25382659
tags question: http://stackoverflow.com/q/25364188
tags question: http://stackoverflow.com/q/25301472
tags question: http://stackoverflow.com/q/25317329
tags question: http://stackoverflow.com/q/25266555
tags question: http://stackoverflow.com/q/25232448
tags question: http://stackoverflow.com/q/25298377

http://stackoverflow.com/q/25308319
has comment: http://stackoverflow.com/comment/39447552
has comment: http://stackoverflow.com/comment/39447050
has comment: http://stackoverflow.com/comment/39447104
has comment: http://stackoverflow.com/comment/39454207
has body: I am having trouble with the "Stratus 2" web-player on my website. I have downloaded and put "Jquery" into the public folder. It is named jquery.js I have then attached the following code right before the end body tag. I have also tried entering the code in the head tags too. The player doesn't show. Any thoughts? I'm getting this error on the console $.stratus is not a function But I see that the stratus.js file did load. FULL HEAD CODE: http://shrib.com/aA2V6JqX Please take a look and edit accordingly.
favorite count: 0
tagged with: muse
has comment: http://stackoverflow.com/comment/39447130
downvote count: 2
has answer: http://stackoverflow.com/a/25308652
tagged with: soundcloud-stratus
has title: Stratus 2, jQuery and Adobe Muse
possible better answer: http://stackoverflow.com/a/25308772
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25308772
has comment: http://stackoverflow.com/comment/39447232
upvote count: 3
score: 1
has comment: http://stackoverflow.com/comment/39447329
linked to: http://stackoverflow.com/q/21508936
type: Question
has comment: http://stackoverflow.com/comment/39446899
answer count: 2
accepted answer: http://stackoverflow.com/a/25308652
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25281675
answers question: http://stackoverflow.com/q/25281391
score: 0
type: Answer
has body: Assuming the &lt;table&gt; is inside a &lt;form&gt;, if you give the form elements a name attribute, you can get their value in servlet like request.getParameter("name-of-form-element"); as a string, for eg String name = request.getParameter("name"); which you can cast into different types.

http://stackoverflow.com/a/25347742
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25338940
answers question: http://stackoverflow.com/q/25338940
type: Answer
has body: Include bootstrap.js/ bootstrap.css, jquery.js and google map script Tab Load of Map Google Map Inside Tab Panel Location on Map Hospitals Schools

http://stackoverflow.com/comment/39539176
has text: Could you create a JSFiddle and simulate your problem? It's impossible to help you with this few provided details.
score: 0
comment on: http://stackoverflow.com/a/25350014
type: Comment
type: AnswerComment

http://stackoverflow.com/a/25304623
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25304314
type: AcceptedAnswer
has body: 2 possible issues. Your getter is initializing a new List&lt;Secim&gt;. Try initializing it in the constructor public class uEkranModel { public uEkranModel() { secim = new List&lt;Secim&gt;(); } public List&lt;Secim&gt; secim { get; set;} .... } Also I have seen other posts on SO indicating problems posting back GUID's (and one solution that was accepted was to use a view model with the GUID's converted to strings)
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/25304314

http://stackoverflow.com/comment/39450689
comment on: http://stackoverflow.com/q/25310454
type: Comment
has text: can you provide some CSS, and/or a fiddle?
score: 0
type: QuestionComment

http://stackoverflow.com/q/25278424
has title: How to call server side function from json?
tagged with: asp.net
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/39391346
has comment: http://stackoverflow.com/comment/39391192
has comment: http://stackoverflow.com/comment/39391236
has answer: http://stackoverflow.com/a/25278565
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25278573
has body: this is my code &lt;script type="text/JavaScript"&gt; var myarray = new array(); function getsvg1() { $.ajax({ alert("hello"); type: "post", url: "WebForm1.aspx/getsvg1", alert("abc"); contentType: "application/json; charset=utf-8", dataType: "json", success: function (response) { var cars = response.d; alert(cars); alert("hi"); }, failure: function (msg) { $('#output').text(msg); } }); } &lt;/SCRIPT&gt; webservices [System.Web.Services.WebMethod] public static ArrayList getsvg1() { XDocument doc = XDocument.Load(System.Web.HttpContext.Current.Server.MapPath("~/NewFolder1/10000.svg")); //XDocument doc = XDocument.Load(System.Web.HttpContext.Current.Server.MapPath("~/Uploads/Orders/100001_PRO/2/svg0.svg")); //XNamespace ns1 = "http://www.w3.org/2000/svg"; //Namespace of a root element can also be retrieved like this: //XNamespace ns1 = doc.Root.GetDefaultNamespace(); //var g = doc.Descendants(ns1 + "image").FirstOrDefault(); // XDocument doc = XDocument.Load(Server.MapPath("~/excelfiles/svg0.svg")); XNamespace ns1 = "http://www.w3.org/2000/svg"; //Namespace of a root element can also be retrieved like this: //XNamespace ns1 = doc.Root.GetDefaultNamespace(); var retrieveimage = doc.Descendants(ns1 + "image").FirstOrDefault(); var retrivetext = doc.Descendants(ns1 + "g").FirstOrDefault(); ArrayList arlelem = new ArrayList(); foreach (XElement element in doc.Descendants(ns1 + "g")) { //string[] parts = element.Split(','); Console.WriteLine(element); arlelem.Add(element); } // var retrivetext1 = doc.Descendants(ns1 + "text").SelectMany(i =&gt; i.ElementExtensions.Select(e =&gt; e.GetObject&lt;XElement&gt;().Attribute("url").Value)).ToArray(); //var retrivetext = doc.Descendants(ns1 + "text").All(); string v = arlelem[1].ToString(); string values = retrieveimage.ToString(); string values1 = retrivetext.ToString(); char[] delimiterChars1 = { ' ', ',', '"', '\\', '\t', '=' }; //string text = "one\ttwo three:four,five six seven"; //System.Console.WriteLine("Original text: '{…
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/21365181
answer count: 3
has comment: http://stackoverflow.com/comment/39391249
has answer: http://stackoverflow.com/a/25278515
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25373161
tagged with: image
has comment: http://stackoverflow.com/comment/39566984
has comment: http://stackoverflow.com/comment/39567085
answer count: 1
has comment: http://stackoverflow.com/comment/39566852
has answer: http://stackoverflow.com/a/25373285
favorite count: 0
has comment: http://stackoverflow.com/comment/39566909
score: -3
accepted answer: http://stackoverflow.com/a/25373285
has comment: http://stackoverflow.com/comment/39566920
tagged with: php
has comment: http://stackoverflow.com/comment/39566924
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39567206
has body: How can I do the following with Jquery? If you don't have any examples or code, please just outline the process for me! 1) Get a (x,y coordinate) square of an image from url. 2) Return that image as an image object. 3) Echo that image on my page as if its a direct url to the image? So, image is hosted on site A and i want to "echo" a portion of the image on site B as an image itself. The images i'm cropping all have the same size, i will need a 64 x 64 crop from the base coords (0,0). The goal of this is to get a distinct url of the cropped image.
has comment: http://stackoverflow.com/comment/39567042
has comment: http://stackoverflow.com/comment/39567114
has comment: http://stackoverflow.com/comment/39567174
downvote count: 3
has title: Return part of image as an image
type: Question
has comment: http://stackoverflow.com/comment/39567070
upvote count: 0
has comment: http://stackoverflow.com/comment/39567021
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39566967

http://stackoverflow.com/comment/128502740
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25279040
score: 0
has text: Is there any way to change width of line with this algorithm?

http://stackoverflow.com/a/25287810
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25287676
has body: Your code is only replacing the first occurence. You could convert it to a regex and use the global match g parameter: document.getElementById("thisForm").innerHTML = document.getElementById("thisForm").innerHTML.replace(/a Runner/g, " a Team Captain"); Updated fiddle If you would like a jQuery implementation, you could avoid munging the HTML of the whole table by changing the textNodes directly. Try this: $('#thisForm td').each(function() { var contents = $(this).contents().filter(function() { return this.nodeType == 3; }); contents[contents.length -1].nodeValue = " a Team Captain"; }); Example fiddle

http://stackoverflow.com/comment/39558189
score: 0
type: Comment
type: QuestionComment
has text: And what is the number of the first one?
comment on: http://stackoverflow.com/q/25368726

http://stackoverflow.com/q/25234154
tagged with: javascript
tagged with: sharepoint
has answer: http://stackoverflow.com/a/31957906
answer count: 3
has answer: http://stackoverflow.com/a/25237352
score: 3
downvote count: 0
favorite count: 0
tagged with: rest
type: UnansweredQuestion
has title: sharepoint rest lookup value
upvote count: 3
has answer: http://stackoverflow.com/a/29168923
tagged with: sharepoint-2013
type: Question
has body: i'm having a minor issue. I'm using REST/JS to populate a dropdown box, which requires first getting the lookup of a column in a list. //Product Model Cascade document.getElementById("productDD").onchange = function() { var prod = this.options[document.getElementById("productDD").selectedIndex].text; var select = document.getElementById("productModelDD"); $(select).empty(); var call2 = $.ajax({ url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists(guid'bb392616-24ee-47e2-9365-f17400348373')/Items", //the list type: "GET", dataType: "json", headers: { Accept: "application/json;odata=verbose" } }); call2.done(function(data, textStatus, jqXHR) { var select = document.getElementById("productModellDD"); for (index in data.d.results) { var parent = data.d.results[index].AT_ARMATECproducts; //Lookup column console.log("parent var: " + parent); if (parent == prod) { var op = document.createElement("option"); op.text = data.d.results[index].Title; op.value = data.d.results[index].Title; select.appendChild(op); } } }); } but the parent value is coming back as "undefined" and i've triple checked that this is the correct list. I've also tried .get_LookupValue() but it comes back as can't get it from an undefined field. So how do you get the value of a lookup field via rest? EDIT: I have done select/expand in the REST Query but have come up with a 400 bad request error: url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists(guid'bb392616-24ee-47e2-9365-f17400348373')/items?$select=Title,AT_ARMATECproducts/Title&amp;$expand=AT_ARMATECproducts/Title", Where AT_ARMATECproducts is the lookup field in the ARMATEC Product Models List. AT_ARMATECproducts is a lookup to the ARMATEC Products list which grabs the titles. So, it turns out the lookup list was under a different name for some reason, it the list it shows up as AT_ARMATECproducts but seems to actually be AT_Products1. url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists(guid'bb392616-24ee-47e2-9365-f17400348373')/i…

http://stackoverflow.com/q/25238841
has body: I am just getting into Javascript, so this is almost certainly a newbie question. I'm trying to create an object in the following way: var canvas = { element: function(){ return document.getElementById("bounceCanvas"); }, centerX: element().width / 2, centerY: element().height / 2, }; However, I get "SCRIPT5009: 'element' is undefined " using the IE debugger. The object declaration is close to the top of the module. I know that it can take a while for the HTML elements to load, so instead of just saying: element: document.getElementById("bounceCanvas"); I have tried to use a function that will return the element so that each call to canvas.element() will make a new attempt to retrieve it from the page. Why is element() always un-defined?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Undefined error: create object with function that returns HTML element
accepted answer: http://stackoverflow.com/a/25238865
type: Question
tagged with: javascript
tagged with: scope
score: 0
answer count: 1
tagged with: undefined
has answer: http://stackoverflow.com/a/25238865

http://stackoverflow.com/q/25335666
has body: I am trying to eventually have my json data displayed in a label. However, when I console.log the json data, only the last two objects are displayed. When I pass the data to a label, only the last object is displayed. Thanks in advance for any help! Here is my code: var json = { "Question:": " What is my name? ", "Answer:": " James ", "Question:": " What is my age? ", "Answer:": " 31 " }; for (var key in json) { if (json.hasOwnProperty(key)) { console.log(key + " = " + json[key]); } } var label = Ti.UI.createLabel({ text: key + json[key] }); win3.add(label);
tagged with: javascript
favorite count: 0
has title: Why is only part of my json data being logged?
has answer: http://stackoverflow.com/a/25341035
has answer: http://stackoverflow.com/a/25340849
downvote count: 0
tagged with: titanium
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25341035
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 2
upvote count: 1
accepted answer: http://stackoverflow.com/a/25340849

http://stackoverflow.com/q/25288298
answer count: 1
tagged with: javascript
score: 0
tagged with: angularjs
tagged with: typeahead
has answer: http://stackoverflow.com/a/25288592
type: UnansweredQuestion
type: Question
has body: In my view I have: &lt;input class="form-control" ng-model="cities" ng-options="item.id as item.name + ', ' + item.region_name for item in cityList" ng-change="cityChanged()" bs-typeahead type="text" matcher="name" placeholder="Начните вводить..." required&gt; cityList is like object: 0: id: 152 name: "Dnepropetrovsk" phone_code: "5322" region_id: 16 region_name: "Dnepropetrovsk region" 1: id: 152 name: "Adamovka" phone_code: "5322" region_id: 16 region_name: "Dnepropetrovsk region" It's nearly 10000 objects. In input it looks like "Dnepropetrovsk, Dnepropetrovsk region" But when I type "Dnepropetrovsk", I see all cities in that region in asc, excluding Dnepropetrovsk, because the list of items is too large. So, how can I filter only by property "name". Now it filters by all item properties.
has title: How to choose item property to filter with typeahead

http://stackoverflow.com/q/25366006
has comment: http://stackoverflow.com/comment/39553461
downvote count: 5
has answer: http://stackoverflow.com/a/25366042
answer count: 3
has comment: http://stackoverflow.com/comment/39633013
upvote count: 0
has comment: http://stackoverflow.com/comment/39608369
has title: Using counter index to set .hover() and .mouseout() events
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25366035
has comment: http://stackoverflow.com/comment/39626358
has answer: http://stackoverflow.com/a/25366345
type: AnsweredQuestion
score: -5
has body: I'm trying to make simple five star rating system using Twitter Bootstrap 3 i jQuery. For now, I'm trying to set .hover() and .mouseout() events using counter by writing this code that doesn't work: var i; for (i = 1; i &lt;= 5; i++) { $('#overall_rating_' + i).hover(function(){ $('#overall_rating_' + i).removeClass("glyphicon-star-empty").addClass("glyphicon-star"); }); $('#overall_rating_' + i).mouseout(function(){ $('#overall_rating_' + i).removeClass("glyphicon-star").addClass("glyphicon-star-empty"); }); } Trying to highlight current and previous stars on mouseover. The code is not complete, it would be accompanied by additional sub-counters, but this part doesn't work for now. Any better methods are welcome. What's broken here?
type: Question
accepted answer: http://stackoverflow.com/a/25366345
possible better answer: http://stackoverflow.com/a/25366042
tagged with: javascript

http://stackoverflow.com/comment/39435941
type: Comment
comment on: http://stackoverflow.com/q/25296331
score: 0
type: QuestionComment
has text: @jeff - i agree, but MySQL double has rounding issues.

http://stackoverflow.com/q/25334431
tagged with: jquery
has body: This is my first code with jQuery, so be indulgent please. The code below is part of a table in which each row displays: a reload button (Reload.gif), and two comboboxes (cmb1 and cmb2). Here is the edited code for just one row: One Two A1 A2 Variables MyQuestion, cmb1 and cmb2 (user-selected) are passed to Handler.php (as all are in the same form), that search data in databases and reload the page with the new data. This is working OK. But now I want to change the logic, cause I dont want to reload the whole page, but only the row that was clicked. I tried with jQuery something like this (OnClick added to Reload.gif!): One Two A1 A2 And in the header I added this code (I took it from here) function recp(id) { $('#myStyle').load('data.php?id=' + id); } I got some results for the id, but here is my question: In the load('data.php?id=' + id) , can I send multiple variables (id, cmb1 and cmb2)?
favorite count: 0
accepted answer: http://stackoverflow.com/a/25334493
has comment: http://stackoverflow.com/comment/39496562
possible better answer: http://stackoverflow.com/a/25335016
has answer: http://stackoverflow.com/a/25335016
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/39496532
type: AnsweredQuestion
score: 1
linked to: http://stackoverflow.com/q/3644585
has answer: http://stackoverflow.com/a/25334493
type: Question
answer count: 2
has title: send multiple variables with jQuery
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39367655
type: Comment
comment on: http://stackoverflow.com/a/25245809
score: 0
type: AnswerComment
has text: Thanks, this is what I was looking for. When I saw the video about Controllers I didn't realize what could be done with them. Now I get it. Anyway I followed the "Hello World" tutorial, but it doesn't work, I have read the full description but I don't know why it doesn't work. Maybe I will post the code and ask for help.

http://stackoverflow.com/comment/39414601
comment on: http://stackoverflow.com/a/25278382
type: AnswerComment
type: Comment
has text: https://github.com/ajcrites/angular.js/blob/master/src/Angular.js#L687 -- this is not a public method though :(
score: 0

http://stackoverflow.com/comment/56465901
comment on: http://stackoverflow.com/q/25329193
score: 0
has text: did you ever get this fixed, we have exactly the same problem.. http://stackoverflow.com/questions/34343828/oauth2-implicit-flow-token-removed-from-location-hash
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25370880
score: 1
answers question: http://stackoverflow.com/q/25363012
has body: You can override the styles used by the grid .jqx-checkbox-default &gt; div, .jqx-checkbox-default &gt; div &gt; span { width: 19px !important; height: 19px !important; } .jqx-checkbox-check-checked { background-size: 19px 19px; } The first block is to size the checkbox container, the second block is to size the image used for the check state. I tested this out on the grid checkbox selection demo (http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/checkboxselection.htm?arctic) and just injected those styles into the page styles used with Chrome.
accepted answer of: http://stackoverflow.com/q/25363012
downvote count: 0
type: AcceptedAnswer
type: Answer
upvote count: 1

http://stackoverflow.com/comment/39531982
has text: Seems to work OK for me on Firefox but not on Chrome :/
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25354730

http://stackoverflow.com/comment/39463302
has text: @Brennan .extend does not copy values it copies the properties with its values. This is not what I asked.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25296285

http://stackoverflow.com/comment/39652568
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25394601
has text: Thanks for the response. Just to confirm- even if the link is a direct file link (clicking it would download the file), the file needs to be downloaded on client machine before POSTing ?
type: AnswerComment

http://stackoverflow.com/a/25269165
type: AcceptedAnswer
downvote count: 0
has body: When you execute this code inside the console, you execute it in the page's context. When you execute this as a content script, it's executed in the isolated context and cannot reach page-defined handlers. There is no error, as it's a valid call and triggers (non-existing) handlers registered by you. Look into injecting your code into the page's context, as described here.
has comment: http://stackoverflow.com/comment/39374607
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/39376140
has comment: http://stackoverflow.com/comment/39374440
accepted answer of: http://stackoverflow.com/q/25268936
answers question: http://stackoverflow.com/q/25268936

http://stackoverflow.com/comment/39369980
has text: Hi Mumen. Thanks for this.. Probably a bit more information: I need to only find the code if it is inside the DIV. There will be other text boxes on the page, and 2.. I need to then change the line so that its standard text.. (which can be clicked on with the event..) I run the jsFiddle.. (first time Ive seen or used this and its pretty neat..) but nothing happens...
type: Comment
comment on: http://stackoverflow.com/a/25265747
type: AnswerComment
score: 0

http://stackoverflow.com/a/25248819
score: 1
accepted answer of: http://stackoverflow.com/q/25248762
has body: In Javascript, use the .checked property: if (element.checked) { ... } Changing input elements from the UI doesn't change them in the DOM.
answers question: http://stackoverflow.com/q/25248762
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0

http://stackoverflow.com/q/25261446
accepted answer: http://stackoverflow.com/a/25262800
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39360039
has body: I have a textarea that I want to resize on certain events using Angular directives. What I have so far works for the event 'keydown' but I can't seem to figure out how to get the functionality working for other events. I also tried figuring out how I could possibly achieve this functionality without using jquery's events. What I would like is to trigger the update function once the data has been loaded into the textarea and when the entire browser window is resized. Directive: var app = angular.module('directives', []); app.directive('autoGrow', function() { return function(scope, element, attr){ var update = function(event) { element.css('height', element[0].scrollHeight + 'px'); } element.bind('keydown', update); // Works element.bind('load', update); // Doesn't quite have desired effect. element.bind('resize', update); // Doesn't quite have desired effect. update(); } }); HTML: &lt;textarea auto-grow type="text" ng-model="model.foo"&gt; Edit: Just to make sure I got my point across, all the bind elements above trigger as they are supposed to. I am just looking for a way that I can trigger my update function when: window is resized and when the ng-model changes or data is updated in the element.
has comment: http://stackoverflow.com/comment/39360449
type: Question
tagged with: angularjs-directive
tagged with: javascript
tagged with: jquery
score: 0
has title: using angular directve to resize textarea on triggers using element.bind(event, function)
tagged with: http://stackoverflow.com/tag/html
answer count: 1
linked to: http://stackoverflow.com/q/14693052
tagged with: angularjs
has answer: http://stackoverflow.com/a/25262800

http://stackoverflow.com/q/25344881
tagged with: javascript
has body: in the Sequelize documentation I've read that you can use callbacks or return promises inside your hooks. However, the following code fails to work for me – for both the latest 1.x and 2.x versions of Sequelize. I setup the user model: var User = function(sequelize, DataTypes) { var User = sequelize.define('User', { firstName: DataTypes.STRING, lastName: DataTypes.STRING, email: DataTypes.STRING, password: DataTypes.STRING }, { hooks: { beforeUpdate: _hashPassword, beforeCreate: _hashPassword } }); return User; }; This is my function that hashes the user's password, using promises (doesn't work): function _hashPassword(user) { if (!user.getDataValue('password')) { return Promise.reject(); } return bcryptGenSalt(10) .then(function(salt) { return bcryptHash(user.getDataValue('password'), salt); }) .then(function(hash) { user.setDataValue('password', hash); return user; }); } I can't create users with the hooks setup like this. I don't get an error, but nothing happens – no users are created / saved to the database. If I change my _hashPassword(user) method to call a callback function on success instead of returning the promise, the user is created and the password is successfully hashed: This is my hash function that uses the callback (works): function _hashPassword(user, cb) { if (!user.getDataValue('password')) { return Promise.reject(); } bcryptGenSalt(10) .then(function(salt) { return bcryptHash(user.getDataValue('password'), salt); }) .then(function(hash) { user.setDataValue('password', hash); cb(null, user); }); } I would really like to use promises for this to keep things consistent. Am I missing something? Is this a bug or is there an error in the documentation? This behaviour is the same in the latest 1.x and 2.x versions of Sequelize for me. Thank you very much for your help! :)
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/26336000
tagged with: sequelize.js
type: UnansweredQuestion
tagged with: node.js
score: 2
has comment: http://stackoverflow.com/comment/40545692
upvote count: 2
tagged with: orm
tagged with: mysql
has title: Using Promises in Sequelize Hooks
type: Question
has comment: http://stackoverflow.com/comment/39518130

http://stackoverflow.com/comment/39471259
has text: hey I apply your concept please look tho question http://stackoverflow.com/questions/25321306/why-form-is-not-generated-while-using-plugin
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25320465

http://stackoverflow.com/q/25319971
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39469660
tagged with: extjs
accepted answer: http://stackoverflow.com/a/25338610
answer count: 1
has body: I've got this class: Ext.define('Customer_Portal_UI.FormParameters', { constructor: function (c) { Ext.each(this.ParticipantFormParameters, function (field) { if (field.toFieldSet != null) { var fieldSetName = c.targetFieldSetPrefix + field.toFieldSet; field.toFieldSet = fieldSetName; } }); }, ParticipantFormParameters: [ { name: 'service_executive_account_Number', visible: false }, { name: 'firstname', visible: true, displayText: 'Firstname', toFieldSet: 'GeneralInfoFS', allowBlank: false }, { name: 'lastname', visible: true, displayText: 'Lastname', toFieldSet: 'GeneralInfoFS', allowBlank: false }, { name: 'gendercode', visible: true, hasCheckbox: true, displayText: 'Gender', toFieldSet: 'GeneralInfoFS', xtype: 'combo', allowBlank: false }, ] }); If I do this once: var formParams = Ext.create(Customer_Portal_UI.FormParameters, { targetFieldSetPrefix: 'add' }); console.log(formParams.ParticipantFormParameters[0].toFieldSet); I will get addGeneralInfoFS. But if I create this object many times, I'll get addGeneralInfoFS, addaddGeneralInfoFS, addaddaddGeneralInfoFS What is going on here ? I tried delete formParams but when I initialize an object if the same type again, same problem. Is it ExtJS or a javascript problem ? I find it weird I need to put effort into simply destroying objects... EDIT: Ah! I found this in the documentation: When placing items in the prototype of the prototype, they will be shared across all instances of the class. Unless you specifically want to do this, you should only put "primitive" types inside the prototype definition. The question now is how to I declare members without them being "in the prototype" ? That's nice, but where does ParticipantFormParameters go exactly then ? I don't want it in the config cause it's dirty, I'll have to drag this huge (the real code has much more items in the array) block of javascript markup everytime I initialize the object ? I've refactored things in my application with this approach and I'm completely p…
tagged with: extjs4
has title: How to initialize object properly and start from clean slate?
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/25338610
has comment: http://stackoverflow.com/comment/39469130

http://stackoverflow.com/comment/39455621
score: 0
type: QuestionComment
type: Comment
has text: – briosheje it's work , but not real time even completely.
comment on: http://stackoverflow.com/q/25312907

joomla3.0
tags question: http://stackoverflow.com/q/25379233
type: Tag
tags question: http://stackoverflow.com/q/25281318
tag name: joomla3.0
tags question: http://stackoverflow.com/q/25243523

http://stackoverflow.com/a/25304145
accepted answer of: http://stackoverflow.com/q/25303340
has comment: http://stackoverflow.com/comment/39439830
upvote count: 1
type: AcceptedAnswer
has body: You don't have to use your click code inside the for loop. That make no sense.. It will be inserted no. of times inside your document (DOM). Use pseudo query selectors. That will definitely make your work easier. $("[class*='endo']").click(function () { //do something here. $(this).next().toggle(); }); next() selector selects the next sibling from the DOM. I have made a wrapper class to improve your css. Take a look at the fiddle for better understanding. if you remove the wrapper class you may find some problems displaying your "contenthover". Here's is your updated fiddle. http://jsfiddle.net/xK0nB1n/2jaLg60o/11/
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25303340

http://stackoverflow.com/q/25287838
tagged with: javascript
has comment: http://stackoverflow.com/comment/39409406
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39409503
has answer: http://stackoverflow.com/a/25289421
downvote count: 2
tagged with: php
tagged with: regex
has body: I am posting here because I've been searching for an answer for few hours already and lost many others more on trial and error on this website http://www.regexr.com/ for the best Regex possible. I couldn't find anything to remove all commas but the first function ones. #Quick Edit: I will always have the content of the function as a String on my php script, because I copy it from the file that originated the function call. Here is an example: MyClass::myFunction( array_merge($params, ['a', 'b', 'c', 'd']), array_merge(["p01"], ["s01", "s02", "s03"]), oi("s04", "p02", "p03"), [["p05", "p06", "p07"],], [ oi(), "p04", ["p05", "p06", "p07"], oi("p08", "p09", "p10", ["s05", "s06", "s07"]), ], [ "p04", ["p05", "p06", "p07"], oi("p08", "p09", "p10", ["s05", "s06", "s07"]), ] ) All I want is to replace all the commas but the myFunction ones ( The ones that separates it's params ). I am already able to get all the content inside the myFunction brackets, so you don't have to deal with that. #Edit: The reason I need this is because I developed a debug function for my project that shows exactly what variable/function/thing generated that code. The oi() function is just a random function that is there for example purpose. On this case, it'll return an array with the parameters it received. Here is how I do it: Example: $variable = 'This is a test variable. For the purpose os testing, 2 + 2 is ' . ( 2 + 2 ); MyClass::myFunction($variable); After the function is executed, I get the function call params with debug_backtrace(). I copy the entire content of the called function from the file that executed it, so I get it as string. I get only the content inside the function, removing the MyClass::myFunction( and the last ). I explode the result by commas to get all the params of the function, but in that way, I explode the commas that I can't explode. I need a way to find which comma I need to explode. Here is the final result of the example above ( As I can't post images, I'll type i…
has title: Replace all commas BUT the main function ones?
has comment: http://stackoverflow.com/comment/39408803
has comment: http://stackoverflow.com/comment/39408941
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39410128
type: Question
accepted answer: http://stackoverflow.com/a/25289421
upvote count: 0
score: -2

http://stackoverflow.com/q/25263863
has comment: http://stackoverflow.com/comment/39364446
linked to: http://stackoverflow.com/q/9240436
has title: How to apply lazy load for fancybox images?
downvote count: 0
has comment: http://stackoverflow.com/comment/39367467
tagged with: lazy-loading
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39366636
score: 1
has comment: http://stackoverflow.com/comment/39365021
has answer: http://stackoverflow.com/a/54445455
has comment: http://stackoverflow.com/comment/39366095
type: Question
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/25271455
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39365584
has comment: http://stackoverflow.com/comment/39377596
has body: I am running a gallery using fancybox on page load. I am trying to apply lazyload using jquery lazyload for the images in the fancybox. But somehow its not working. I changed the jquery.fancybox.js from. image : '&lt;img class="fancybox-image" src="{href}" alt="" /&gt;', to image : '&lt;img class="fancybox-image lazy" data-src="{href}" src="" alt="" /&gt;', So the resulted html will be like the following. &lt;img class="fancy-image lazy" data-src="file.jpg" src alt/&gt; I am applying the lazy load like below. &lt;script&gt; $(document).ready(function(){ $("img").lazy(); }); &lt;/script&gt; and also i tried delay. &lt;script&gt; $(document).ready(function(){ $("img").lazy({ delay: 5000 }); }); &lt;/script&gt; I have also searched through google but i cant able to find anything related to this. Please help me.
tagged with: fancybox

http://stackoverflow.com/q/25385561
has comment: http://stackoverflow.com/comment/39590191
has comment: http://stackoverflow.com/comment/39591490
has comment: http://stackoverflow.com/comment/39599344
tagged with: javascript
has title: Javascript Canvas fillRect transparent black
score: 0
tagged with: canvas
answer count: 1
has body: I'm developing a resource monitor with JavaScript, and I pretend to complete it with an cool background animation. I'm having trouble with fillRect and transparent colors in fillStyle, eg.: function draw() { ctx.fillStyle = "rgba(0, 0, 0, 0.1)"; ctx.fillRect(0, 0, c.width, c.height); ctx.fillStyle = "#00FF00"; ctx.strokeStyle = "#00FF00"; ctx.beginPath(); ctx.arc(getRandom(0, c.width),getRandom(0,c.height),25,0,2*Math.PI); ctx.arc(getRandom(0, c.width),getRandom(0,c.height),25,0,2*Math.PI); ctx.stroke(); } It works fine, but it doesn't fill completely, leaving some "ghosts" where circles already passed before. There is anyway to fix this and make background pure black again? Notes: I can't draw pure black, because I want the drawed lines smoothly disappear Image of the problem: https://i.sstatic.net/GrPxX.png Note that yellow dots are most recent lines, orange are transitional lines, which give the smooth effect, and red dot are the "ghosts"
has answer: http://stackoverflow.com/a/25385705
type: UnansweredQuestion
tagged with: animation
has comment: http://stackoverflow.com/comment/39591252
has comment: http://stackoverflow.com/comment/39592352
has comment: http://stackoverflow.com/comment/39595059
type: Question

http://stackoverflow.com/comment/39367677
type: Comment
type: QuestionComment
has text: `input` is invalid child of `button`
comment on: http://stackoverflow.com/q/25265593
score: 0

http://stackoverflow.com/q/25302789
has body: If I create a container with an identifying variable, I know, how to remove it: var item1 = Ext.create("Ext.container.Container",{...}); item1.remove(); What if the element has been created this way: Ext.onReady (function () { Ext.create ("Ext.container.Container",{ html: "Raw Component", renderTo: Ext.getBody() }); } How can I remove this element?
has title: Destroying components
type: Question
accepted answer: http://stackoverflow.com/a/25305397
tagged with: javascript
tagged with: extjs
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25305397
type: AnsweredQuestion

http://stackoverflow.com/comment/39379700
has text: an if() test has essentially ZERO overhead compared to having to instantiate/parse/execute a regex.
type: Comment
comment on: http://stackoverflow.com/a/25271889
type: AnswerComment
score: 2

http://stackoverflow.com/comment/39447839
has text: `first-child(2)` is not a function
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25308818
score: 0

http://stackoverflow.com/q/25286579
answer count: 1
tagged with: jquery
has title: How to add multiple email ids into a text field (like facebook privacy setting) and convert the email id list into comma separated list?
tagged with: php
has answer: http://stackoverflow.com/a/25286701
type: AnsweredQuestion
tagged with: twitter-bootstrap
has body: I'm using PHP, jQuery(jquery-1.9.1.min.js and jquery-ui-1.10.0.custom.min.js), Bootstap framework(Bootstrap v3.0.0), AJAX, etc. for my website. Now at one place I want user to be able to enter multiple email ids into a HTML textfield. It should happen like facebook privacy setting. Following is the screenshot of what I expect to achieve. From the above image I want the text field to behave like from the "Don't share this with" section. The only difference is here names are getting displayed and I want to add email ids. No auto populate functionality is needed like Facebook. When user will submit the form then the comma separated list of entered email ids should be sent to the respective method.
type: Question
accepted answer: http://stackoverflow.com/a/25286701
tagged with: javascript
score: 0

http://stackoverflow.com/q/25344705
has title: module.exports wont work in node.js (no errors present)
score: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25344728
type: Question
tagged with: export
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25344728
has body: I remember module.exports working perfectly fine once before but today It would'nt res.send. I simply receive a blank page with no errors. Could you explain why? I am quite confused. Here is an image of my directory structure if for some reason you need it: HERE! Code(Important parts) As you can see, I am attempting to get the test variable in with the index.js file. I required the file and put it out as an export. App.js var express = require('express'); var http = require('http'); var path = require('path'); var app = module.exports = express(); // all environments go here... require('./routes/index.js'); //create server here routes/index.js var app = require('../app.js'); app.get('/testing', function(req,res) { var logic = require('./logic.js'); res.send(logic.test); }); //other routes below routes/logic.js var test = module.exports = "Hello World";
tagged with: node.js

http://stackoverflow.com/comment/39515641
type: Comment
comment on: http://stackoverflow.com/q/25345523
score: 1
has text: Define "valid". Should it just match the pattern or should it actually resolve to an existing URL?
type: QuestionComment

http://stackoverflow.com/q/25304610
tagged with: asp.net-mvc
tagged with: javascript
has answer: http://stackoverflow.com/a/25304724
accepted answer: http://stackoverflow.com/a/25304724
upvote count: 14
has answer: http://stackoverflow.com/a/49429282
linked to: http://stackoverflow.com/q/8464677
possible better answer: http://stackoverflow.com/a/25304774
has answer: http://stackoverflow.com/a/25304674
has body: I need to get a list from mvc controller to view using jquery ajax. how can i do that. this is my code. Its alerting error message. In Controller public class FoodController : Controller { [System.Web.Mvc.HttpPost] public IList&lt;Food&gt; getFoodDetails(int userId) { IList&lt;Food&gt; FoodList = new List&lt;Food&gt;(); FoodList = FoodService.getFoodDetails(userId); return (FoodList); } } In view function GetFoodDetails() { debugger; $.ajax({ type: "POST", url: "Food/getFoodDetails", data: '{userId:"' + Id + '"}', contentType: "application/json;charset=utf-8", dataType: "json", success: function (result) { debugger; alert(result) }, error: function (response) { debugger; alert('eror'); } }); }
tagged with: jquery
has answer: http://stackoverflow.com/a/25304774
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39440128
has title: How to get a list from mvc controller to view using jquery ajax
tagged with: jquery-ajaxq
answer count: 5
type: AnsweredQuestion
downvote count: 0
type: Question
score: 14
has answer: http://stackoverflow.com/a/25348262

http://stackoverflow.com/a/25391029
has comment: http://stackoverflow.com/comment/39629378
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39628072
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25386791
has comment: http://stackoverflow.com/comment/39613810
has comment: http://stackoverflow.com/comment/39617049
upvote count: 1
has comment: http://stackoverflow.com/comment/39613968
score: 1
has body: You're creating an instance of myFunction and call toString on it before you set the prototype. The reason you can create an instance of myFunction even before you declare it is because it was hoisted. toString is not hoisted however and it would show [Object object]. Solution is to create instances after you fully declare the object. Note: A constructor function should start with a capital so it should be MyFunction instead of myFunction and maybe give it a name that actually means something like Person or Animal since nobody would have a clue to what a MyFunction is. function myFunction(name) { this.name = name; //console.log is so much better than alert console.log('this is:',this,'this.toString:' , this.toString() ); }; myFunction.prototype.toString = function() { return 'My name is ' + this.name; }; var x = new myFunction('Hello World!'); More on prototype here: Prototypical inheritance - writing up
accepted answer of: http://stackoverflow.com/q/25386791
has comment: http://stackoverflow.com/comment/39621048

http://stackoverflow.com/a/25360511
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39543034
type: Answer
has comment: http://stackoverflow.com/comment/39542907
has comment: http://stackoverflow.com/comment/39543009
has comment: http://stackoverflow.com/comment/61158025
answers question: http://stackoverflow.com/q/25360455
score: 5
has body: You could wrap the text of the label in a span to make it easier to select: $("#email").keyup(function() { $('label[for="sendCopy"] span').text('Send copy to my mail: ' + $(this).val()); }); Send copy to my mail Alternatively, you can keep the HTML as it is and amend the textNode directly. $("#email").keyup(function() { var textNodes = $('label[for="sendCopy"]').contents().filter(function() { return this.nodeType == 3; }); textNodes[textNodes.length - 1].nodeValue = 'Send copy to my mail: ' + $(this).val(); }); Send copy to my mail
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25360455

http://stackoverflow.com/a/25374002
has comment: http://stackoverflow.com/comment/39569263
has comment: http://stackoverflow.com/comment/39568570
has comment: http://stackoverflow.com/comment/39569564
has comment: http://stackoverflow.com/comment/39569364
has comment: http://stackoverflow.com/comment/39570667
type: Answer
answers question: http://stackoverflow.com/q/25373968
has body: The Wow.js api uses seconds units for animations as well. For example, data-wow-delay="2s" will work just fine. I'm not sure for about "1.2." Try it out and let me know if that works for you.
score: 0

http://stackoverflow.com/q/25379268
has comment: http://stackoverflow.com/comment/39578085
tagged with: node.js
answer count: 0
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39578229
score: 1
has title: How much is JavaScript with Node.js asynchronous?
type: Question
tagged with: javascript
upvote count: 1
has comment: http://stackoverflow.com/comment/39578282
tagged with: asynchronous
favorite count: 0
linked to: http://stackoverflow.com/q/25173808
has comment: http://stackoverflow.com/comment/39578097
has body: I know that node.js is asynchronous, but what I don't really understand is how much. Example: If a need to do 3 things in sequence, and I need every thing is done before the other begins, Do i must need to use Callback? var myContainer; for(var i=0;i&lt;10000;i++) myContainer.push(i.toString()); for(var j=0;j&lt;myContainer.length;j++) console.log(myContainer[j]); for(var x=0;x&lt;myContainer.length;x++) myModuleForEmails.sendEmailsTo(myContainer[x]); Ok, suppose for one moment I have a module like Imap ready and calling myModuleForEmails.sendEmailsTo(myContainer[x]) I really send the email. I know also that this program is absolutely useless, but it's just to understand. Suppose I must push all 10000 string in myContainer, only THEN log all the string that are in myContainer in the console, and only AFTER BOTH I need to send the emails. Is this version reliable or do I need 2 callback? And Does the number of iteration I do matter? i.e, if i had used 10 instead of 10000, could I have used this syntax because it takes so few to do 10 operation that finishes the first for cycle before starting the second?
has comment: http://stackoverflow.com/comment/39578105

http://stackoverflow.com/a/25233731
upvote count: 1
type: Answer
has body: You're not really returning JSON. When you do echo 'var arrayFromPhp = ' . $json . ';';, it's no longer valid JSON, just echo the JSON without the other crap and convert it on the clientside to an object. In PHP do $json = json_encode($data2DArray); echo $json; and in javascript you'd do if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { document.getElementById("arrayresult").innerHTML = xmlhttp.responseText; } to parse the JSON to a javascript object, you'd use if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { var obj = JSON.parse( xmlhttp.responseText ); document.getElementById("arrayresult").innerHTML = obj.someKey; } but note that innerHTML expects a string, not an object.
answers question: http://stackoverflow.com/q/25233703
has comment: http://stackoverflow.com/comment/39325803
downvote count: 0
score: 1

http://stackoverflow.com/comment/39618124
comment on: http://stackoverflow.com/a/25277840
type: Comment
has text: it is so great and what i want to know(the push concept.)... i will try it later and i think i should bee work for me... thank so much...!
score: 1
type: AnswerComment

http://stackoverflow.com/q/25316939
tagged with: javascript
score: 0
answer count: 1
tagged with: soap
tagged with: http://stackoverflow.com/tag/xml
has body: I have an msxml document that I'm trying to parse. This is the xml - xmlDoc.responseDocument: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> test </soap:Body> </soap:Envelope> xmlDoc.selectSingleNode("soap:Body") returns "Reference to undeclared namespace prefix: 'soap'." Thanks for any help provided.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25320404
tagged with: msxml
has title: Reference to undeclared namespace prefix: 'soap' when parsing MSXML soap response using selectSingleNode
type: Question

http://stackoverflow.com/a/25332060
type: Answer
score: 0
type: AcceptedAnswer
has body: The problem was that in this case (weird) Cakephp didn't recognize the file by calling it with echo $this->HTML->script(validate); so I had to use validate.js .....
accepted answer of: http://stackoverflow.com/q/25293009
answers question: http://stackoverflow.com/q/25293009

http://stackoverflow.com/a/25290893
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39608264
has comment: http://stackoverflow.com/comment/39458370
has comment: http://stackoverflow.com/comment/39463416
has comment: http://stackoverflow.com/comment/39734122
has body: Note: throughout the comments this answer has changed drastically. Please view the earlier revisions if you would like to see the evolution of this answer. After getting a hold of your JsFiddle example I was able to get it working in a way I think you wanted. Working Demo HTML: JavaScript: $(document).ready(function() { /* get your template string See: http://api.jquery.com/id-selector/ http://api.jquery.com/html/ */ var source = $('#player-template').html(); // compile the template into a handlebars function var template = Handlebars.compile(source); // initialize sound cloud api SC.initialize({ client_id: '90fb9e15c1e26f39b63f57015ab8da0d' }); /* This function will be called once the HTTP transaction started by SC.get(...) completes. Note, there's nothing wrong with doing this as an anonymous function, I'm simply assigning it to a variable to show that this is a distinct function that's called later */ var callback = function(tracksResponse){ /* once a response has been received, we'll use the response to generate a new context to pass to the template function. Note, you can use the template function in here because its within a closure. See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Closures */ var context = { tracks: tracksResponse }; var html = template(context); /* assign the rendered html to your placeholder on the page see: http://api.jquery.com/html/ */ $('#player-placeholder').html(html); /* Now that the html is rendered and on the page, its time to setup the sound cloud players. Note the css classes I assigned to the track/player. This line selects all of the player's and runs the function over each. See: http://api.jquery.com/class-selector/ http://api.jquery.com/each/ */ $('.track .player').each(function(index, e){ var $this = $(this); // jQuery reference to the current object in 'each loop' /* I assigned the permalink_url of each track to an attribute called 'data-uri' This line gets the value of that attribute. See: http://api.jque…
answers question: http://stackoverflow.com/q/25271420
has comment: http://stackoverflow.com/comment/39459562
downvote count: 0
has comment: http://stackoverflow.com/comment/39608323
has comment: http://stackoverflow.com/comment/39457153
has comment: http://stackoverflow.com/comment/39590030
has comment: http://stackoverflow.com/comment/39583609
has comment: http://stackoverflow.com/comment/39526302
has comment: http://stackoverflow.com/comment/39664481
has comment: http://stackoverflow.com/comment/39664125

http://stackoverflow.com/q/25234551
upvote count: 1
has title: jQuery event priority
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39310379
has body: I have an element which I bind more than one event handlers: Delete $("#info").on("click", ".action-delete", function() { $.event.trigger({ type: "application", message: { name: "item-delete", item: $("#info").data("item") } }); }); Then I want the user to make sure before the delete operation is done, since there are so many elements with action-delete working for different models, so I tried to inject the following scripts to the page(from another js file): $(document).on("click", ".action-delete", function(e) { return confirm("Sure to delete?"); }) However I found that event the confirm window displayed, the delete operation is still completed before the user choose. Any idea to fix it?
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39311377
has answer: http://stackoverflow.com/a/25235295
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25320359
tagged with: polyfills
favorite count: 0
type: UnansweredQuestion
score: -3
upvote count: 0
has title: What does comma operator do in this polyfill from MDN?
has comment: http://stackoverflow.com/comment/39469465
downvote count: 3
type: Question
answer count: 2
has body: MDN's polyfill for Function.prototype.bind (pasted below), uses the comma operator. Since the comma operator returns the last operand, and the first operand (oThis) doesn't do anything (like call a function, or make an assignment), it looks to be pointless. But I'm going to assume MDN knows what it's doing, so: What useful trick is the comma operator doing in this case? if (!Function.prototype.bind) { Function.prototype.bind = function (oThis) { if (typeof this !== "function") { // closest thing possible to the ECMAScript 5 // internal IsCallable function throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); } var aArgs = Array.prototype.slice.call(arguments, 1), fToBind = this, fNOP = function () {}, fBound = function () { return fToBind.apply(this instanceof fNOP &amp;&amp; oThis ? this : oThis, // &lt;-- what's going on here? aArgs.concat(Array.prototype.slice.call(arguments))); }; fNOP.prototype = this.prototype; fBound.prototype = new fNOP(); return fBound; }; } To be clear, I'm suggesting that you could write fBound like this, and have it do the same thing: fBound = function () { return fToBind.apply(this instanceof fNOP &amp;&amp; oThis ? this : aArgs.concat(Array.prototype.slice.call(arguments))); };
tagged with: javascript
has answer: http://stackoverflow.com/a/25320389
has answer: http://stackoverflow.com/a/25320433

http://stackoverflow.com/comment/39580358
type: QuestionComment
comment on: http://stackoverflow.com/q/25380297
score: 0
has text: I encountered this situation before. And, the only sane way that I could find was storing the objects in a collection or an array passing the 'id' of that particular object to the `onClickFunction` and retrieving it back from the array.
type: Comment

http://stackoverflow.com/comment/39532428
score: 1
type: Comment
type: QuestionComment
has text: You haven't explained your question very well and that's probably why you've not got anyone else giving you an answer. With the issue you're having, format it as _code_ then _example data_ with _expected result_ and _actual result_ (one example at a time). I tried out `regXSearch = "\\b"+"ørn";` with `regX.test("asbjørn")` and got `true` as expected? Are you sure that you've saved everything in _UTF-8_ and that the page is being rendered using that charset, too?
comment on: http://stackoverflow.com/q/25354462

http://stackoverflow.com/comment/39323895
type: Comment
comment on: http://stackoverflow.com/a/25242060
score: 0
has text: +1 , didn't realize someone posted the same while I was writing mine. No need for my answer then.
type: AnswerComment

http://stackoverflow.com/q/25354156
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25549371
tagged with: oauth-2.0
type: Question
has body: First I would like to describe how our system looks like. We have two servers. The first one is on Google App Engine and has some logic that provides access to database for Android application and also has some servlets written for external communication (more about that later). The second one is on Google Cloud Engine. Application is written in Meteor (to simplify, it's just Node.js). We would like to communicate between those servers (GCE -> GAE). We have rest API on this servlet endpoint under address e.g. https://appname.appspot.com/admin/upload. When I'm making request without authentication, everything work fine: HTTP.get(getURL, {}, getCallback); However, I have no idea how to do it using oAuth2 authentication. When I go to the address https://appname.appspot.com/admin/upload from the browser, it redirects me to Google authentication and everything works fine (I have my account added in the Google Console). But how to send http request from the Node.js server using oAuth2 authentication? To give you more details, here is servlet configuration: SecurityConstraint <web-resource-collection> WRCollection /admin/* </web-resource-collection> admin CONFIDENTIAL and UploadRequestServlet /admin/upload I know that I have to set server to server communication but how to accomplish this using Node.js? Could anyone help? I don't know where to start...
tagged with: javascript
tagged with: servlets
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25549371
has title: How to communicate between servers (Google Cloud Engine -> Google App Engine) using oAuth2
tagged with: google-app-engine
tagged with: node.js

http://stackoverflow.com/q/25324845
has comment: http://stackoverflow.com/comment/39479513
has comment: http://stackoverflow.com/comment/39479055
tagged with: meteor
has comment: http://stackoverflow.com/comment/39483586
favorite count: 0
has comment: http://stackoverflow.com/comment/39481621
upvote count: 2
has comment: http://stackoverflow.com/comment/39497359
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/25409217
accepted answer: http://stackoverflow.com/a/25409217
tagged with: fabricjs
type: Question
has comment: http://stackoverflow.com/comment/39479437
tagged with: canvas
has comment: http://stackoverflow.com/comment/39487200
tagged with: javascript
has comment: http://stackoverflow.com/comment/39488278
has title: Meteor reactive computation not triggered on collection.update()
answer count: 1
has body: I've defined a Meteor Collection which stores paths to allow for a shared drawing canvas: CanvasPaths = new Meteor.Collection("canvasPaths"); I redraw the canvas in an autorun block: Deps.autorun(function() { var paths = CanvasPaths.find().fetch(); //some stuff happens } Adding paths to the collection with collection.insert() triggers this autorun block to run again as the computation is invalidated: CanvasPaths.insert({ path: collectionPath }); However when I update a path already in the collection the computation is not invalidated and the autorun function does not rerun: CanvasPaths.update(id, { $set: { path: getPathObjectForCollection(this) } }); Surely updating the collection invalidates any computations in reactive blocks that use that collection? How can I make the function in the autorun block rerun on all clients? EDIT In response to Junle Li's comment: I added console.log(CanvasPaths.findOne(id).path); //exisiting record console.log(getPathObjectForCollection(this)); //what we are updating to just before the CanvasPaths.update call, this gives the result: So as you can see, positionLeft and positionTop's values have changed so surely the Autorun block should be called.
downvote count: 0

http://stackoverflow.com/a/25253122
type: Answer
has body: Please see here http://jsfiddle.net/jg42xsop/ some people saying that we should use ng-init instead using $parent {{key}} Please choose a size myColor: {{myColor}} mySize: {{mySize}}
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39347265
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25252881
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25252881

http://stackoverflow.com/comment/39583542
type: Comment
has text: can you be more specific please
comment on: http://stackoverflow.com/a/25382356
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39430226
comment on: http://stackoverflow.com/q/25298984
has text: @Siddharth ehh not really. Firslty the lowercase `x` is violating the convention he stresses, and secondly this is just not knowing what you are doing, which nobody approves of. If you use a keyword you should maybe google how to use it (hence my downvote).
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25333467
downvote count: 1
accepted answer: http://stackoverflow.com/a/25333495
type: Question
tagged with: arrays
possible better answer: http://stackoverflow.com/a/25333512
tagged with: javascript
has answer: http://stackoverflow.com/a/25333512
answer count: 3
has title: How to remove multiple sequential items of an array - JavaScript
favorite count: 0
has answer: http://stackoverflow.com/a/25333495
has answer: http://stackoverflow.com/a/25333712
has comment: http://stackoverflow.com/comment/39494775
type: AnsweredQuestion
upvote count: 2
score: 1
has body: I am curious to know how I can quickly and most efficiently remove a number of items from an array in JavaScript without creating a loop. EXAMPLE: var array = [1,2,3,4,5,6,7,8,9]; array.remove[0..4]; //pseudo code console.log(array);//result would then be [6,7,8,9] Is there a function for this, or is a custom loop required? Rudimentary question I suppose, but just wondering out of curiosity.
tagged with: loops
tagged with: methods

http://stackoverflow.com/a/25257497
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25257308
has body: I'm addressing what I understood &amp; what I know I don't know if there are any inbuilt functions are there, you can iterate over array and get your answers. Ques:- wheather array has another array? You can use Array.some for this like bellow. var arr = [1,2,3,[1,2,3],5] arr.some(function(element){ return Array.isArray(element) })// returns true it will return true if any element will be array. Ques:- how to get data from array of array ? You can use forEach and check that if it is an array access the element var arr = [1,2,3,[1,2,3],5]; arr.forEach(function(element){ if(Array.isArray(element)){ console.log(element[0]) } }); //prints 1 If it gives a way to start with it's fine. NOTE:- Some &amp; ForEach are not supported by IE8. There for loop will work.

http://stackoverflow.com/a/25395286
answers question: http://stackoverflow.com/q/25272020
has comment: http://stackoverflow.com/comment/39609067
downvote count: 2
type: Answer
score: 2
has body: You can do something like this if you jquery is loaded $(document).ready(function() { if (navigator.userAgent.match(/Android/i)) { window.scrollTo(0,0); // reset in case prev not scrolled var nPageH = $(document).height(); var nViewH = window.outerHeight; if (nViewH &gt; nPageH) { nViewH -= 250; $('BODY').css('height',nViewH + 'px'); } window.scrollTo(0,1); } }); For Iphone you have to do something like mentioned in below link http://matt.might.net/articles/how-to-native-iphone-ipad-apps-in-javascript/ and for safari https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html Hope it helps you somehow!!
has comment: http://stackoverflow.com/comment/39634154
upvote count: 4

http://stackoverflow.com/comment/39319642
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25238873
has text: doesn't work, but I think it has something to do because i'm doing something wrong with targetting the buttons. I am completely lost on this right now lol.

http://stackoverflow.com/q/25246925
tagged with: safari
has title: Jquery code working on windows but not on Mac or Safari
has answer: http://stackoverflow.com/a/25250257
accepted answer: http://stackoverflow.com/a/25250257
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39333691
tagged with: javascript
tagged with: jquery
type: Question
has body: The following function remove the selected option from all the other select menus , it works well on windows chrome and firefox but not on Safari or Mac . Do you have any idea of what could cause the problem please ? HTML code : slelect Volvo Saab Opel Audi slelect Volvo Saab Opel Audi slelect Volvo Saab Opel Audi slelect Volvo Saab Opel Audi jQuery code : (function () { var previous; $("select").on('focus', function () { previous = this.value; }).change(function(){ $elm = $(this).children('option:selected'); $a = $elm.val(); $('option[value=' + $a + ']').not($elm).hide(); $('option[value=' + previous + ']').not($elm).show(); }); })();
tagged with: macos
score: 0
answer count: 1

http://stackoverflow.com/q/25276169
favorite count: 0
has comment: http://stackoverflow.com/comment/39387633
type: UnansweredQuestion
tagged with: three.js
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43152766
upvote count: 5
has title: Self-transparent object only looks correct from one side
tagged with: javascript
tagged with: webgl
has comment: http://stackoverflow.com/comment/39428267
score: 4
has answer: http://stackoverflow.com/a/27349119
tagged with: 3d
has body: I am using THREE.js with the WebGL renderer and I have a self-transparent object. It's a mesh of a single geometry with a basic material having a texture and transparent: true. It looks right from one side, where transparent parts of itself layer correctly, but not from the other: The trees on the left look wrong (the map behind them is ignored) while the trees on the right are fine (the map behind them can be seen through). The entire thing you see is a single geometry. Any ideas how to fix this? I am currently using a kludge solution of making each transparent face its own object, but this is not ideal.
answer count: 1
tagged with: opengl-es

http://stackoverflow.com/q/25280809
has answer: http://stackoverflow.com/a/25280898
type: Question
has body: I am using ASP.NET MVC ( Razor ) and Jquery my page looks like below ( simplyfied ). When i first load my page everything works fine every script is working i can open datepicker etc. But after i choose from dropdown my scripts stop working. Returned result is ok( there is no problems on server side ), what it is going here is basically i send whole form to server side fills some data from database and send back content for div. Can i somehow reinitialize scripts or something, cause for me it looks like js/jquery "didnt notice" new content? @Html.DropDownListFor(m => m.OfferId, new SelectList(Model.Offers, "Id", "DocumentNo"), "-- Wybierz --", new { id = "selectedOffer" }) @Html.LabelFor(m => m.RealizationDate) @Html.TextBoxFor(m => m.RealizationDate, new { id = "CommissionRealizationDate" }) @section JavaScript { $(function () { $('#CommissionRealizationDate').datepicker({ format: "dd/MM/yyyy", autoclose: true }); offerType.init(); }); var offerType = { init: function () { //this.selectedKind(); this.selectedOffer(); }, selectedOffer: function () { $('form').on('change', '#selectedOffer', function () { **$.post("ChoosenCommission", $('form').serialize(), function (data) { $("#commissionContent").html(data);** }); } }; } I just noticed the same thing ed-X said, it didnt work before. Propably the problem was that i was returning from server whole page ( not just div content ) and it maybe screwd something ( anyone knows? ). P.S. U guys are fast i just went to make a tea and was going to answer myself :P
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/25280898
answer count: 1
has comment: http://stackoverflow.com/comment/39395439
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39395503
has title: JavaScript/Jquery - scripts dont work after calling html()

http://stackoverflow.com/q/25348745
has answer: http://stackoverflow.com/a/25350689
tagged with: timeout
has body: I've been trying to create a jQuery request loop, that reloads content every X seconds based on the result. I have this JS: $(document).ready(function(){ function init(){ $.ajax({ url: 'screen.php', data: { 'screen' : &lt;?php echo $screen_id; ?&gt; }, async: true, success: function(r){ JSON.parse(r, function(k, v){ if(k == 'screen_content'){ var content = v;/* $('.content').html(v); */ } if(k == 'visible_seconds'){ setTimeout($('.content').html(content),v); /* (function(){}).delay(timer); */ /* $().delay(function(msg) { console.log(msg); }, v, 'Hello'); */ } }); /* init(); */ } }); } init(); }); The result is a JSON string with X number of "screen_content" and "visible_seconds" paired. I need to show the "screen_content" in "visible_seconds" seconds, then change the content with the next in the JSON - and when all have been shown, it all starts over (so we can get new content in) It's seems simple in my head, but I can't create the jQuery for it :/
type: Question
tagged with: javascript
tagged with: jquery
has title: jQuery request loop with sleep/timeout
score: 0
accepted answer: http://stackoverflow.com/a/25350689
answer count: 1
type: AnsweredQuestion
tagged with: settimeout

http://stackoverflow.com/comment/39568907
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25374181
has text: can you explain, what does "running in Node" means and how can I do it?

jquery
tags question: http://stackoverflow.com/q/25277693
tags question: http://stackoverflow.com/q/25282821
tags question: http://stackoverflow.com/q/25368420
tags question: http://stackoverflow.com/q/25288925
tags question: http://stackoverflow.com/q/25355255
tags question: http://stackoverflow.com/q/25232066
tags question: http://stackoverflow.com/q/25382616
tags question: http://stackoverflow.com/q/25315744
tags question: http://stackoverflow.com/q/25384843
tags question: http://stackoverflow.com/q/25331741
tags question: http://stackoverflow.com/q/25287709
tags question: http://stackoverflow.com/q/25272142
tags question: http://stackoverflow.com/q/25379728
tags question: http://stackoverflow.com/q/25310370
tags question: http://stackoverflow.com/q/25332550
tags question: http://stackoverflow.com/q/25278728
tags question: http://stackoverflow.com/q/25309196
tags question: http://stackoverflow.com/q/25332262
tags question: http://stackoverflow.com/q/25300450
tags question: http://stackoverflow.com/q/25296395
tags question: http://stackoverflow.com/q/25365479
tags question: http://stackoverflow.com/q/25334056
tags question: http://stackoverflow.com/q/25238210
tags question: http://stackoverflow.com/q/25319038
tags question: http://stackoverflow.com/q/25248042
tags question: http://stackoverflow.com/q/25347857
tags question: http://stackoverflow.com/q/25361448
tags question: http://stackoverflow.com/q/25344955
tags question: http://stackoverflow.com/q/25366709
tags question: http://stackoverflow.com/q/25244277
tags question: http://stackoverflow.com/q/25371468
tags question: http://stackoverflow.com/q/25363643
tags question: http://stackoverflow.com/q/25362890
tags question: http://stackoverflow.com/q/25335487
tags question: http://stackoverflow.com/q/25288223
tags question: http://stackoverflow.com/q/25315575
tags question: http://stackoverflow.com/q/25256430
tags question: http://stackoverflow.com/q/25308998
tags question: http://stackoverflow.com/q/25267113
tags question: http://stackoverflow.com/q/25366916
tags question: http://stackoverflow.com/q/25388240
tags question: http://stackoverflow.com/q/25338294
tags question: http://stackoverflow.com/q/25303040
tags question: http://stackoverflow.com/q/25271367
tags question: http://stackoverflow.com/q/25330127
tags question: http://stackoverflow.com/q/25244731
tags question: http://stackoverflow.com/q/25304206
tags question: http://stackoverflow.com/q/25379301
tags question: http://stackoverflow.com/q/25336080
tags question: http://stackoverflow.com/q/25301937
tags question: http://stackoverflow.com/q/25266621
tags question: http://stackoverflow.com/q/25285506
tags question: http://stackoverflow.com/q/25355882
tags question: http://stackoverflow.com/q/25381208
tags question: http://stackoverflow.com/q/25273764
tags question: http://stackoverflow.com/q/25354277
tags question: http://stackoverflow.com/q/25330520
tags question: http://stackoverflow.com/q/25316335
tags question: http://stackoverflow.com/q/25261592
tags question: http://stackoverflow.com/q/25358877
tags question: http://stackoverflow.com/q/25338058
tags question: http://stackoverflow.com/q/25343149
tags question: http://stackoverflow.com/q/25258576
tags question: http://stackoverflow.com/q/25279253
tags question: http://stackoverflow.com/q/25348622
tags question: http://stackoverflow.com/q/25249648
tags question: http://stackoverflow.com/q/25316840
tags question: http://stackoverflow.com/q/25355181
tags question: http://stackoverflow.com/q/25264878
tags question: http://stackoverflow.com/q/25316784
tags question: http://stackoverflow.com/q/25239554
tags question: http://stackoverflow.com/q/25328361
tags question: http://stackoverflow.com/q/25313911
tags question: http://stackoverflow.com/q/25290562
tags question: http://stackoverflow.com/q/25265425
tags question: http://stackoverflow.com/q/25319739
tags question: http://stackoverflow.com/q/25301636
tags question: http://stackoverflow.com/q/25310454
tags question: http://stackoverflow.com/q/25234811
tags question: http://stackoverflow.com/q/25347339

http://stackoverflow.com/q/25251874
tagged with: javascript
has body: I am using ng-grid in an ASP.NET web application to display data from a WCF Service. In this Plunker example the data is stored in a JSON file and then converted by the Angular module. var app = angular.module('myApp', ['ngGrid']); app.controller('MyCtrl', function($scope, $http) { $scope.setPagingData = function(data, page, pageSize){ var pagedData = data.slice((page - 1) * pageSize, page * pageSize); $scope.myData = pagedData; $scope.totalServerItems = data.length; if (!$scope.$$phase) { $scope.$apply(); } }; $scope.getPagedDataAsync = function (pageSize, page, searchText) { setTimeout(function () { var data; if (searchText) { var ft = searchText.toLowerCase(); $http.get('largeLoad.json').success(function (largeLoad) { data = largeLoad.filter(function(item) { return JSON.stringify(item).toLowerCase().indexOf(ft) != -1; }); $scope.setPagingData(data,page,pageSize); }); } else { $http.get('largeLoad.json').success(function (largeLoad) { $scope.setPagingData(largeLoad,page,pageSize); }); } }, 100); }; $scope.getPagedDataAsync($scope.pagingOptions.pageSize, $scope.pagingOptions.currentPage); $scope.gridOptions = { data: 'myData', enablePaging: true, showFooter: true, enableCellSelection: true, enableCellEdit: true, enableRowSelection: false, totalServerItems:'totalServerItems', pagingOptions: $scope.pagingOptions, filterOptions: $scope.filterOptions }; }); Plunker This piece of code was interesting because it read dicrectly from a JSON file and dynamically bound it to the ng-grid. I was hoping that I would be able to use the ASP.NET (C#) codebehind to pass a JSON file to the AngularJS code and let it do all of the work to parse it. It seems like you cannot do this, so what is the best way to pass data to AngularJS from ASP.NET? Thanks in advance.
accepted answer: http://stackoverflow.com/a/25252539
has answer: http://stackoverflow.com/a/25252282
answer count: 2
has comment: http://stackoverflow.com/comment/39343126
has title: What is the best way to pass data from ASP.NET to AngularJS?
upvote count: 1
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/25252539
tagged with: angularjs
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25252282
downvote count: 0
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: c#

http://stackoverflow.com/q/25236391
score: 0
tagged with: d3.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25236653
tagged with: parallel-coordinates
has title: Drawing parallel coordinates for random selection of data
type: Question
has body: I have 500 samples (rows) in my data which is stored as a csv file. You can see 5 rows of it as follow: path,Ktype,label,CGX,CGY,C_1,C_2,C_3,C_4,total1,total2,totalI3,total4,feature1,feature2,feature3,feature4,feature5,feature6,feature7,feature8,feature9,feature10,feature11,feature12,A,B,C,D,feature13,feature14,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, .\Mydata\Case1,k1,1,42,33,0,57.44534,0,52597,71,16,10,276,4038,3789.631,0.6173469,0.6499337,2.103316,0.6661285,1.065539,248.3694,0.630161,0.000192848,0.9999996,0.000642777,1,0,0,1,9.60E-05,3136.698,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, .\Mydata\Case2,k1,2,163,29,0,43.28862,0,49050,71,16,10,248,2944,2587.956,0.5726808,0.5681185,2.130387,0.601512,1.137578,356.0444,0.6335613,0.000327267,1.000029,0.001271235,1,0,0,1,0.00010854,2676.418,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, .\Mydata\Case3,k1,3,774,19,0,45.26291,0,53455,71,16,10,212,2366,1982.547,0.408179,0.4579566,1.994296,0.6615351,1.193415,383.4534,0.7153812,0.000264522,1.000031,0.001210507,1,1,0,0,9.54E-05,3221.289,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, .\Mydata\Case4,k1,4,1116,25,0,80.76469,0,57542,71,16,10,284,3908,3453.988,0.3549117,0.4811547,1.982244,0.6088744,1.131446,454.0122,0.6166388,0.000314288,0.9999836,0.00129846,0,1,1,0,0.000140592,2143.42,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, .\Mydata\Case5,k1,5,1364,59,1,52.96776,0,49670,71,16,10,228,2725,2642.675,0.4328255,0.475517,1.859871,0.6587288,1.031152,82.32471,0.5775694,0.000466264,0.9999803,0.001765345,0,1,1,0,0.00012014,2439.636,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, I am drawing parallel coordinates for my data. This is the part of code which reads in the csv file and filters it: d3.csv("Mydata.csv", function(raw_data) { // Convert quantitative scales to floats data = raw_data.map(function(d) { for (var k in d) { if (!_.isNaN(raw_data[0][k] - 0) &amp;&amp; k != 'id' &amp;&amp; k != 'cgX' &amp;&amp; k != 'cgY') { d[k]…
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/47651648
has text: Where is the documentation for postAsync?
type: AnswerComment
comment on: http://stackoverflow.com/a/25317222
type: Comment
score: 1

http://stackoverflow.com/comment/39498212
has text: Don't use a `while` loop. Just have the callback invoke the `getStateAsync` until the `state` should disallow it. There's no call stack size issue at all.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25335203
type: QuestionComment

http://stackoverflow.com/q/25369250
upvote count: 37
tagged with: javascript
has body: I'd like to know how to do to make the False ng-class. page.isSelected(1) is TRUE if the page if the page is selected, else FALSE &lt;div id="homePage" ng-class="{ center: page.isSelected(1) }"&gt; I therefore want you if: isSelected is TRUE: center isSelected is FALSE: left I tried: &lt;div id="homePage" ng-class="{ page.isSelected(1) 'center : 'left' }"&gt; but it doesnt work. I do not know what I'm doing wrong. Can you help me please?
has answer: http://stackoverflow.com/a/25369287
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
possible better answer: http://stackoverflow.com/a/25369317
accepted answer: http://stackoverflow.com/a/25369287
favorite count: 0
has answer: http://stackoverflow.com/a/25369317
tagged with: angularjs
has comment: http://stackoverflow.com/comment/64928445
score: 37
has answer: http://stackoverflow.com/a/25369454
type: AnsweredQuestion
has title: Angular ng-class if else
linked to: http://stackoverflow.com/q/18172573
tagged with: ng-class
type: Question

http://stackoverflow.com/comment/40771270
type: Comment
comment on: http://stackoverflow.com/a/25374381
type: AnswerComment
has text: another thing to mention.. use in your html. That way if the variable translated is set before getText has loaded your translations mapping, it can still be updated and swapped out later using the filter.
score: 0

http://stackoverflow.com/comment/39513508
type: Comment
has text: @PatrickEvans so what's the purpose of Object.prototype and Object itself when everything already inherits from Function?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25344225

recursion
type: Tag
tags question: http://stackoverflow.com/q/25317027
tags question: http://stackoverflow.com/q/25334831
tags question: http://stackoverflow.com/q/25241864
tag name: recursion
tags question: http://stackoverflow.com/q/25367672
tags question: http://stackoverflow.com/q/25296376
tags question: http://stackoverflow.com/q/25231634

http://stackoverflow.com/comment/39403478
comment on: http://stackoverflow.com/q/25283883
score: 0
type: Comment
type: QuestionComment
has text: does the answer work?

http://stackoverflow.com/comment/39590497
type: Comment
comment on: http://stackoverflow.com/a/25368659
type: AnswerComment
score: 0
has text: You're welcome. When submitting a form it's always recommended to use the `submit` event **on the form** rather than the `click` event **on some button or submit button**. I would use `$('form-selector').submit( .. );`.

http://stackoverflow.com/comment/39423520
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25294639
type: AnswerComment
has text: Looks like Safari isn't applying the margins at all. http://stackoverflow.com/questions/11133069/clientwidth-and-clientheight-returns-0

http://stackoverflow.com/q/25322420
score: 0
has answer: http://stackoverflow.com/a/25322528
has comment: http://stackoverflow.com/comment/39473277
answer count: 1
has body: I've looked (almost) everywhere - to no avail. The issue I am having is this: I am developing an iOS App using PhoneGap and jQuery. I have been compiling my code and running it on an emulator and an iPhone 5. Everything was going smoothly till today. Today, after modifying the HTML/JS code, I went to run it again and it keeps overwriting my HTML/JS files with old code (code from before today). I have no idea why this is happening :\ I haven't changed anything other than the HTML/JS code, no settings or config data have been changed. Have any of you ever experienced this before with PhoneGap? Please don't hesitate to ask for more info if it helps in diagnosis - I can provide the build log if required but I'm not sure how much help that would be.
has comment: http://stackoverflow.com/comment/39473363
tagged with: ios
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
type: Question
has title: PhoneGap keeps overwriting my code
tagged with: xcode
has comment: http://stackoverflow.com/comment/39473305
has comment: http://stackoverflow.com/comment/39473322
tagged with: cordova

http://stackoverflow.com/comment/39509647
score: 0
type: Comment
type: QuestionComment
has text: After getting answers here, you'll still have no proof. If you want to know the reason for what you seem to already know, then I would imagine it's simply that user interactions with the page cause non-atomic operations that could provide the JavaScript with data in some partial state.
comment on: http://stackoverflow.com/q/25341690

http://stackoverflow.com/a/25368727
answers question: http://stackoverflow.com/q/25368418
type: Answer
score: 0
has body: The following jquery code allows you to hide show the div's irrespective of the number of div's and also do not require additional id's to be created. $("#container").on('click','h2',function(){//click on any h2 in container //hide all div's having section id starting with section_ $("div[id^='section_']").hide(); //show the div which has index position equal to the clicked h2 $($("div[id^='section_']")[$(this).index()]).show(); }); See fiddle http://jsfiddle.net/3pmakwh4/

http://stackoverflow.com/q/25237560
has body: I define a variable in the jsp file,then in the including *.js file's ajax function I change the variable,but It's not work. In the Ajax I had set async: false. My jsp code is: &lt;script type='text/javascript' &gt; window.leave=1; &lt;/script&gt; &lt;script src="${ctxPath}/js/registerchange/registerchange.js" type="text/javascript"&gt; &lt;/script&gt; .... &lt;!--then I call the function change() in registerchange.js --&gt; the change() function in registerchange.js is $.ajax({ type: "POST", async: false, url:projectpath+"/registerChange.do?cmd=update", data:{"str":str,"changeBefore":changeBefore,"fk_ChangeProject":fk_ChangeProject,"sbdNum":sbdNum,"ifShow3":ifShow3}, contentType:"application/x-www-form-urlencoded; charset=UTF-8", success:function(data){ window.leave = 2; } }); After call the ajax function,in the jsp file I use window.leave variable,it is still 1. Any suggestions will be help,thx.
has comment: http://stackoverflow.com/comment/39315913
type: Question
has title: ajax change the global javascript variable do not work
tagged with: javascript
has comment: http://stackoverflow.com/comment/39315774
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/39315832
has comment: http://stackoverflow.com/comment/39317393
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/39315995

http://stackoverflow.com/a/25374718
has comment: http://stackoverflow.com/comment/39569937
has body: You are trying to use .append on attributes,which i don't think is the right way. Try this- $.ajax({ url: 'currentvalue.php', data: { id: productID, value: value }, type: 'POST', success: function(){setCurrentValue(data);} }); function setCurrentValue(data) { $('#randomtest').attr( 'data-rateit-value',data); //Or $('#randomtest').data( 'rateit-value',data); }
answers question: http://stackoverflow.com/q/25374623
score: 0
has comment: http://stackoverflow.com/comment/39569997
type: Answer
has comment: http://stackoverflow.com/comment/39570679

http://stackoverflow.com/a/25337904
has comment: http://stackoverflow.com/comment/39502757
answers question: http://stackoverflow.com/q/25337509
type: Answer
has comment: http://stackoverflow.com/comment/39503327
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/39503051
downvote count: 2
has body: Please See this Example May Be helpful to you http://rniemeyer.github.io/knockout-kendo/web/DatePicker.html

http://stackoverflow.com/comment/39504792
score: 0
type: AnswerComment
has text: could you tell me how you know to do this? I read the iron router documentation and there doesn't seem to be any mention of this.
type: Comment
comment on: http://stackoverflow.com/a/25339004

http://stackoverflow.com/comment/39464348
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25317207
score: 0
has text: There is definitely no issue with the getY() function.

http://stackoverflow.com/a/25415407
answers question: http://stackoverflow.com/q/25371676
type: Answer
accepted answer of: http://stackoverflow.com/q/25371676
score: 0
type: AcceptedAnswer
has body: I've managed to work this out after a little trial and error. It appears that I was pulling in the incorrect scope in to my controller which was preventing me from only emitting/broadcasting on this scope. Since change the scope (this is the only change that was made) the data is correctly bound to each element using this directive and the graphs are displaying correctly. For those who are interested I was originally using $scope.getData($scope.$parent.alert); After changing this to be the below the issue is resolved. $scope.getData($scope.$parent);

http://stackoverflow.com/comment/39368340
comment on: http://stackoverflow.com/q/25263779
has text: @MarcoCI is right on -- websockets is the best way to solve. PubNub and similar third party services work really well. I'm not sure what in Rails4 would solve your problem.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25387448
has comment: http://stackoverflow.com/comment/39593868
linked to: http://stackoverflow.com/q/8772791
score: 0
has title: Run jquery function every 15 seconds
has answer: http://stackoverflow.com/a/25387459
tagged with: setinterval
has body: I want to run a function every 15 seconds but my setInterval don't work and I don't know why... The function is called just once... $(document).ready(function(){ param = new Object(); param['menu_hover_time'] = 5000; function hoverMenuAnimate(){ if(param['menu_hover_flag']) { $('.menu-item-423').delay(param['menu_hover_time']).queue(function() { $(this).trigger('click'); $('.menu-item-3704').delay(param['menu_hover_time']).queue(function() { $(this).trigger('click'); $('.menu-item-424').delay(param['menu_hover_time']).queue(function() { $(this).trigger('click'); $('.menu-item-422').delay(param['menu_hover_time']).queue(function() { $(this).trigger('click'); }); }); }); }); } } setInterval(hoverMenuAnimate(),15000) }); Thanks you for you help. Best regards, EDIT The problem was the .queue() : /* Animated menu */ function hoverMenuAnimate(){ if(param['menu_hover_flag']) { setTimeout(function(){ if(!param['menu_hover_flag'])return; $('#menu-1 nav#site-navigation .menu-item-422').css('background', '#f0f2f5').children('a').css('color', '#204056'); $('.menu-item-423').css('background', '#e5251e').children('a').css('color', '#fff'); $('#submenu-container-1').html(($('.menu-item-423').children('ul.sub-menu').html())); $('#submenu-container-1').css('float', 'right').css('marginRight', '110px'); setTimeout(function(){ if(!param['menu_hover_flag'])return; $('#menu-1 nav#site-navigation .menu-item-423').css('background', '#f0f2f5').children('a').css('color', '#204056'); $('.menu-item-3704').css('background', '#e5251e').children('a').css('color', '#fff'); $('#submenu-container-1').html(($('.menu-item-3704').children('ul.sub-menu').html())); $('#submenu-container-1').css('float', 'right').css('marginRight', '110px'); setTimeout(function(){ if(!param['menu_hover_flag'])return; $('#menu-1 nav#site-navigation .menu-item-3704').css('background', '#f0f2f5').children('a').css('color', '#204056'); $('.menu-item-424').css('background', '#e5251e').children('a').css('color', '#fff'); $('#s…
has comment: http://stackoverflow.com/comment/39593874
has comment: http://stackoverflow.com/comment/39594519
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25387459
has comment: http://stackoverflow.com/comment/39594301
has comment: http://stackoverflow.com/comment/39594436
type: Question
duplicate of: http://stackoverflow.com/q/8772791
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25311285
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39469494
has comment: http://stackoverflow.com/comment/39453589
has body: I am using the jQuery Validate plugin and I have this code to catch a error and apply a class (myerror) to the field that caused the validations to fail. I would like to extend this to capture which type of error that was captured. Example1: if you did not fill in the field. Class1 applied (css background-color:lightRed) Example2: format of data in field wrong. Class2 applied (css background-color:lightBlue) jQuery(function ($) { var validator = $('#form').validate({ rules: { ip: { required: true, ipv4: true } }, messages: {}, errorPlacement: function (error, element) {}, highlight: function (element, errorClass, validClass) { $(element).addClass('myerror') }, unhighlight: function (element, errorClass, validClass) { $(element).removeClass('myerror') } }); });
type: AnsweredQuestion
downvote count: 0
has title: How to capture the type of validation error?
score: 1
has answer: http://stackoverflow.com/a/25325120
accepted answer: http://stackoverflow.com/a/25325120
has comment: http://stackoverflow.com/comment/39481939
has comment: http://stackoverflow.com/comment/39452937
has comment: http://stackoverflow.com/comment/39453509
type: Question
has comment: http://stackoverflow.com/comment/39468796
tagged with: javascript
has comment: http://stackoverflow.com/comment/39469558
has comment: http://stackoverflow.com/comment/39472295
tagged with: jquery-validate
has comment: http://stackoverflow.com/comment/39452965
has comment: http://stackoverflow.com/comment/39452345
upvote count: 1
answer count: 1

http://stackoverflow.com/comment/39598882
type: AnswerComment
has text: After saying that I would tend to define data structures in Java - and I would only "script them" in JavaScript. ;)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25381827

http://stackoverflow.com/comment/39381684
type: Comment
score: 0
type: QuestionComment
has text: What version of Marionette are you using?
comment on: http://stackoverflow.com/q/25263684

http://stackoverflow.com/a/25309272
answers question: http://stackoverflow.com/q/25309091
type: Answer
score: 1
upvote count: 1
has body: Be careful with the "document.getElementsByName". It returns an array and arrays don't have the "value" attribute. I'd rather try with: var rcf = document.getElementsByName('recaptcha_challenge_field')[0].value; var rrf = document.getElementsByName('recaptcha_response_field')[0].value; if you're just looking for the first element with the specified tag.
downvote count: 0

http://stackoverflow.com/q/25373217
tagged with: http://stackoverflow.com/tag/json
has title: ng-select AngularJS
type: Question
has comment: http://stackoverflow.com/comment/39567087
has answer: http://stackoverflow.com/a/25373375
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25373375
upvote count: 1
has body: I'm trying to put together an ng select to select these quantities: "splits":[ 1, 2, 3, 4, 5, 6, 8 ], <select ng-options="?" ng-model="ticket_group.quantity" Then I want to show the price multiplied by the quantity they have chose ${{ticket_group.retail_price * ticket_quantity}} USD So would I just reference the ng-model for this? Please help me figure out ng-select and have it display the final price
type: AnsweredQuestion

http://stackoverflow.com/comment/39333996
has text: Just a note: `$('.comments')` should be `document.getElementsByClassName("comment")` since you're going for pure JS here.
type: AnswerComment
comment on: http://stackoverflow.com/a/25247290
type: Comment
score: 1

http://stackoverflow.com/q/25351232
has comment: http://stackoverflow.com/comment/39525750
tagged with: chart.js
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39525499
has comment: http://stackoverflow.com/comment/39527687
type: Question
tagged with: javascript
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/39526951
linked to: http://stackoverflow.com/q/14220321
answer count: 0
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/14220321
has body: I've been trying to populate my chart with data I get from an ajax request but I can not seem to figure it out. Could anyone help? var simple_forms; $.ajax({ type: "GET", url: url, data: "user_id="+user_id, success: function(data){ simple_forms = data; }, error: function(data) { } }); This is the output from the data = [1,2,3,4,5,6,7] var weekly_line_data = { labels : ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], datasets : [ { label: "Simple Forms",fillColor : "transparent",strokeColor : "#53A3EB",pointColor : "#53A3EB",pointStrokeColor : "#fff",pointHighlightFill : "#2980b9",pointHighlightStroke : "#2980b9", data : simple_forms }] } var ctx = document.getElementById("weekly_line_data").getContext("2d"); window.myLine = new Chart(ctx).Line(weekly_line_data, {responsive: true,scaleShowGridLines : true,scaleGridLineWidth : 1,datasetStrokeWidth : 1,pointDotRadius : 5});
has title: Adding JSON data to Chart.js
has comment: http://stackoverflow.com/comment/39526597

http://stackoverflow.com/comment/39346046
type: Comment
comment on: http://stackoverflow.com/a/25253322
type: AnswerComment
has text: OK. Can you explain what you are trying do do: Do you want 1.00 or 1. Do you want only int vals; 1,2,3 or 1.2, 2, 3.5 if the user enters less than 1 say .99 what do you want to happen?
score: 0

http://stackoverflow.com/q/25267916
tagged with: cordova
has comment: http://stackoverflow.com/comment/39375344
answer count: 0
has comment: http://stackoverflow.com/comment/39538008
score: 1
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/39377866
has comment: http://stackoverflow.com/comment/39443016
tagged with: javascript
linked to: http://stackoverflow.com/q/16859651
has body: RequireJS has many benefits. Some being: To avoid a huge clutter of script tags in html file To be able to organize code in a modular fashion, i.e. helps or makes it a mandate to organize code in modules, giving it nice structure Prevents DOM to be loaded with unnecessary JavaScript, i.e. load only what is required, saving on memory and performance Load dependencies asynchronously, saving time and network bandwidth Now considering RequireJS for phoneGap apps and trying to realize the above benefits I have the following thoughts if I do not use RequireJS: In phonegap apps we usually do a SPA (single page application), and all resources are available locally on the device. In a sound JavaScript architecture (implemented for the phonegap app) everything is already modular and well thought out. We can include small modules (which are not more than 3 to 4 per page) required for a page on the page itself in script tags. With garbage collection all non-referred JS objects/memory allocations are wiped out. Usually in a SPA no JavaScript (given a sound JS architecture) is too long to create a loading problem. Are there specific scenarios where RequireJS really makes a difference especially in the context of phoneGap apps? I do not wish to use requireJS just for the sake of using it.
upvote count: 4
has comment: http://stackoverflow.com/comment/39378690
favorite count: 0
type: UnansweredQuestion
tagged with: single-page-application
has title: Are there any real benefits of using Require JS in a phonegap app?
tagged with: requirejs
has comment: http://stackoverflow.com/comment/39380997
has comment: http://stackoverflow.com/comment/39378565

http://stackoverflow.com/comment/39619958
has text: @Barmar, so how do i do that? The website is not mine.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25388626
type: Comment

http://stackoverflow.com/a/25242065
upvote count: 1
type: Answer
downvote count: 0
has body: That element uses a background-attachment CSS property to fix the image relative to the screen: If a background-image is specified, the background-attachment CSS property determines whether that image's position is fixed within the viewport, or scrolls along with its containing block. elem { background-attachment: fixed; } JSFiddle demo.
score: 1
answers question: http://stackoverflow.com/q/25242001

odata
tag name: odata
tags question: http://stackoverflow.com/q/25267788
type: Tag
tags question: http://stackoverflow.com/q/25378988
tags question: http://stackoverflow.com/q/25232701

http://stackoverflow.com/comment/39352841
has text: can you please paste your code here? see if you can provide link with close button to your desired path so that when user clicks on close you provide route .../appName/search/basic.
score: 1
comment on: http://stackoverflow.com/q/25255092
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25240960
tagged with: nodes
type: Question
score: 5
linked to: http://stackoverflow.com/q/13713273
tagged with: sails.js
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/39322674
accepted answer: http://stackoverflow.com/a/25255564
has body: I'm quite new to sails and doesnt know much of using the gruntjs file. I've an application that loads quite a number of js and css files. I would like to minified all these js files into 1-2 minified js files, and all css files to 1 minified css file... As of now, I dont know what to do, I've tried to implement this - How to concatenate and minify multiple CSS and JavaScript files with Grunt.js (0.3.x) in my sailsjs application but didnt print the minified css file when viewed in sourcecodes. Thanks in advance. Here's the default gruntfile for sails v0.9.16 module.exports = function (grunt) { var cssFilesToInject = [ 'linker/**/*.css' ]; var jsFilesToInject = [ 'linker/**/*.js' ]; var templateFilesToInject = [ 'linker/**/*.html' ]; cssFilesToInject = cssFilesToInject.map(function (path) { return '.tmp/public/' + path; }); jsFilesToInject = jsFilesToInject.map(function (path) { return '.tmp/public/' + path; }); templateFilesToInject = templateFilesToInject.map(function (path) { return 'assets/' + path; }); var depsPath = grunt.option('gdsrc') || 'node_modules/sails/node_modules'; grunt.loadTasks(depsPath + '/grunt-contrib-clean/tasks'); grunt.loadTasks(depsPath + '/grunt-contrib-copy/tasks'); grunt.loadTasks(depsPath + '/grunt-contrib-concat/tasks'); grunt.loadTasks(depsPath + '/grunt-sails-linker/tasks'); grunt.loadTasks(depsPath + '/grunt-contrib-jst/tasks'); grunt.loadTasks(depsPath + '/grunt-contrib-watch/tasks'); grunt.loadTasks(depsPath + '/grunt-contrib-uglify/tasks'); grunt.loadTasks(depsPath + '/grunt-contrib-cssmin/tasks'); grunt.loadTasks(depsPath + '/grunt-contrib-less/tasks'); grunt.loadTasks(depsPath + '/grunt-contrib-coffee/tasks'); grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), copy: { dev: { files: [ { expand: true, cwd: './assets', src: ['**/*.!(coffee)'], dest: '.tmp/public' } ] }, build: { files: [ { expand: true, cwd: '.tmp/public', src: ['**/*'], dest: 'www' } ] } }, clean: { dev: ['.tmp/public/**'], build: ['www'] }, jst: { dev: {…
tagged with: gruntjs
has title: How to minified all js and css files using gruntfile.js in sails.js
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39348697
has comment: http://stackoverflow.com/comment/39348688
favorite count: 0
tagged with: css
has answer: http://stackoverflow.com/a/25255564
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39329224

http://stackoverflow.com/comment/39520869
comment on: http://stackoverflow.com/a/25348540
type: AnswerComment
score: 0
type: Comment
has text: So first you have to find the http:// in the string and from there to the first " " space are the urls that are you looking for, Then you use your function

http://stackoverflow.com/comment/39328024
comment on: http://stackoverflow.com/q/25244249
has text: possible duplicate of [Remove Duplicates from JavaScript Array](http://stackoverflow.com/questions/9229645/remove-duplicates-from-javascript-array)
score: 3
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39558517
has text: @ajp15243: Because Q is much better :-) Of course, it depends on how much functionality is required
type: Comment
comment on: http://stackoverflow.com/a/25368633
score: 0
type: AnswerComment

http://stackoverflow.com/q/25276749
type: UnansweredQuestion
score: 1
has body: I have nested tabs set up but the contents inside the second set of tabs (#tab-2-1, #tab-2-2, #tab-2-3) aren't stretching to their full 100% width. Is there something I missed? HTML Bonus Episodes Videos Foreally Stream Ross Jude [videogallery id="video-stream"] [videogallery id="ross"] [videogallery id="jude"] CSS .tab_content { background:#000; color:#fff; max-width:500px; padding:10px } .tabs li { display:inline; list-style:none } .tabs a { background:#7c7c7c; border-radius:5px 5px 0 0; color:#dadada; display:inline-block; font-size:2em; padding:10px 15px 8px; text-decoration:none } .tabs a.active { background:#e32d2d; color:#fff } #tab2 ul.tabs a { background:transparent; color:#999; padding:10px 10px 0 10px } #tab2 ul.tabs a.active { color:#fff } JS jQuery('ul.tabs').each(function(){ // For each set of tabs, we want to keep track of // which tab is active and it's associated content var $active, $content, $links = jQuery(this).find('a'); // If the location.hash matches one of the links, use that as the active tab. // If no match is found, use the first link as the initial active tab. $active = jQuery($links.filter('[href="'+location.hash+'"]')[0] || $links[0]); $active.addClass('active'); $content = $($active[0].hash); // Hide the remaining content $links.not($active).each(function () { jQuery(this.hash).hide(); }); // Bind the click event handler jQuery(this).on('click', 'a', function(e){ // Make the old tab inactive. $active.removeClass('active'); $content.hide(); // Update the variables with the new link and content $active = jQuery(this); $content = jQuery(this.hash); // Make the tab active. $active.addClass('active'); $content.show(); // Prevent the anchor's default click action e.preventDefault(); }); });
has comment: http://stackoverflow.com/comment/39388495
upvote count: 1
type: Question
tagged with: jquery-ui
tagged with: jquery-tabs
tagged with: javascript
has comment: http://stackoverflow.com/comment/39389266
has comment: http://stackoverflow.com/comment/39388510
has title: Content in nested tabs not displaying full 100% width
has answer: http://stackoverflow.com/a/25277431
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39388908
has comment: http://stackoverflow.com/comment/39388452

http://stackoverflow.com/q/25231984
tagged with: three.js
has comment: http://stackoverflow.com/comment/39309225
upvote count: 1
has comment: http://stackoverflow.com/comment/39305605
has comment: http://stackoverflow.com/comment/39306114
score: 1
has comment: http://stackoverflow.com/comment/39322713
tagged with: coffeescript
has comment: http://stackoverflow.com/comment/39321916
type: Question
has body: I'm trying to find out the error for some hours and nothing comes to my mind... I get this error: Cannot read property 'add' of undefined Here's my coffeescript file: (hope it's readable)(main function at the end) (I've pointed where error occurs) class _3D_Engine_ constructor: () -&gt; # define all neccessary constants @STATS_ENABLED = true @divBackgroundColor = '#D7F0F7' @cameraInitPos = new THREE.Vector3(10, 10, 10) @cameraLookAtObject = null @cameraFov = 45 @cameraNear = 1 @cameraFar = 4800 @rendererSize = new THREE.Vector2(Math.min(window.innerWidth, 1440), (5 / 8 * window.innerHeight)) @controlsMovementSpeed = 100 @controlsLookSpeed = 0.1 @skyBoxSize = new THREE.Vector3(4500, 2000, 4500) @floorSize = new THREE.Vector2(4500, 4500) @floorColor = 0x9FB98A @lightColor = 0xFFFFFF @lightIntensity = 0.8 @lightInitPos = new THREE.Vector3(-2500, 2000, 2500) @fogColor = 0xFFFFFF @fogMinDist = 200 @fogMaxDist = 6000 @shadowCameraVisible = false @shadowDarkness = 0.3 @shadowMap = new THREE.Vector2(4000, 4000) @shadowCameraFar = 5500 @shadowCameraLRTB = new THREE.Vector4(-3000, 3000, 3000, -3000) # the most important variables @scene = null @camera = null @renderer = null @light = null @clock = null @constrols = null # models loaded @streetsLoaded = false @buildingsLoaded = false setUpWorld: () -&gt; if @sceneLoaded() is false @setUpScene() # create scene, download all 3D models if @sceneLoaded() is true @setUpCamera() # set up all cameras @setUpRenderer() # set up renderer @setUpClock() # activating clock @setUpControls() # set up FirstPersonControls @setUpStats() # set up statistics @setUpLights() # set up light @setUpShadows() # set up shadows @setUpFog() # set up fog $("#loading").hide() document.body.appendChild(@renderer.domElement) document.body.appendChild(@stats.domElement) @animate() setUpScene: () -&gt; if @streetsLoaded is false and @buildingsLoaded is false @scene = new THREE.Scene() @cameraLookAtObject = @scene.position @setUpSkyBox() # set up sky @setUpFloor…
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39306324
has comment: http://stackoverflow.com/comment/39304896
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39305162
has answer: http://stackoverflow.com/a/25241984
has title: Coffeescript + three.js: scene undefined
type: UnansweredQuestion

http://stackoverflow.com/a/25253988
has comment: http://stackoverflow.com/comment/39346842
type: Answer
has comment: http://stackoverflow.com/comment/130808109
downvote count: 2
score: 92
has comment: http://stackoverflow.com/comment/64363820
has comment: http://stackoverflow.com/comment/39347236
has comment: http://stackoverflow.com/comment/39361730
has comment: http://stackoverflow.com/comment/62198123
has body: You can wait until the body is ready: function onReady(callback) { var intervalId = window.setInterval(function() { if (document.getElementsByTagName('body')[0] !== undefined) { window.clearInterval(intervalId); callback.call(this); } }, 1000); } function setVisible(selector, visible) { document.querySelector(selector).style.display = visible ? 'block' : 'none'; } onReady(function() { setVisible('.page', true); setVisible('#loading', false); }); body { background: #FFF url("https://i.imgur.com/KheAuef.png") top left repeat-x; font-family: 'Alex Brush', cursive !important; } .page { display: none; padding: 0 0.5em; } .page h1 { font-size: 2em; line-height: 1em; margin-top: 1.1em; font-weight: bold; } .page p { font-size: 1.5em; line-height: 1.275em; margin-top: 0.15em; } #loading { display: block; position: absolute; top: 0; left: 0; z-index: 100; width: 100vw; height: 100vh; background-color: rgba(192, 192, 192, 0.5); background-image: url("https://i.sstatic.net/MnyxU.gif"); background-repeat: no-repeat; background-position: center; } The standard Lorem Ipsum passage Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Here is a JSFiddle that demonstrates this technique. Update Here is a modern version using promises. The promise is completely optional now, as it is only used for a delay. The DOMContentLoaded event will fire once the page is loaded. const wait = (delay = 0) => new Promise(resolve => setTimeout(resolve, delay)); const setVisible = (elementOrSelector, visible) => (typeof elementOrSelector === 'string' ? document.querySelector(elementOrSelector) : elementOrSelector …
has comment: http://stackoverflow.com/comment/39347060
accepted answer of: http://stackoverflow.com/q/25253391
type: AcceptedAnswer
upvote count: 94
answers question: http://stackoverflow.com/q/25253391
has comment: http://stackoverflow.com/comment/97361261
has comment: http://stackoverflow.com/comment/64484971
has comment: http://stackoverflow.com/comment/82531856

http://stackoverflow.com/a/25296106
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25295792
has body: Try this: var result = _.chain($scope.incidents).groupBy('Type').map(function(value, key) { return { Count: value.length, Type: key, Locations: _.chain(value).groupBy('Location').map(function(value, key) { return { Location: key, Count: value.length }; }).value() }; }).value();
type: Answer
accepted answer of: http://stackoverflow.com/q/25295792

http://stackoverflow.com/q/25311570
has body: I am having a hard time figuring out this problem. I have two different pages where I do the following query. Page 1 -> if (typeof(window.ActiveXObject) != "undefined") //returns true Page 2 -> if (typeof(window.ActiveXObject) != "undefined") //returns false Pages are running on same browser IE11 and same IIS server. Any suggestions?
has comment: http://stackoverflow.com/comment/39453514
has comment: http://stackoverflow.com/comment/39454319
score: 2
tagged with: activexobject
downvote count: 0
tagged with: javascript
favorite count: 0
has title: ActiveXObject in IE11
answer count: 0
upvote count: 2
type: UnansweredQuestion
type: Question
tagged with: internet-explorer-11

http://stackoverflow.com/a/25314225
has comment: http://stackoverflow.com/comment/39457944
score: 0
has comment: http://stackoverflow.com/comment/39458036
answers question: http://stackoverflow.com/q/25313934
has body: You can accomplish this by moving your submit button outside your form as shown below Submit $scope.submit = function($event) { if (!$scope.myForm.$valid) { return; } alert('submit form'); }; $scope.submitTag = function(event){ alert('submit tag'); }; Here is a working plunker http://plnkr.co/edit/7G22wcR9UsbIsH9LtT11?p=preview
type: Answer

http://stackoverflow.com/comment/39514426
type: Comment
has text: My instructions were for the buttons to be available at all times, so stop listening for the click won't work. Basically it has to have a queue, so that everytime someone clicks, it is added to the queue, and then continues on. Thanks for your help oozic.
comment on: http://stackoverflow.com/a/25344748
type: AnswerComment
score: 0

virtual-earth
type: Tag
tags question: http://stackoverflow.com/q/25266579
tag name: virtual-earth

http://stackoverflow.com/a/25348201
score: 1
upvote count: 1
type: AcceptedAnswer
has body: First of all, you forget to put ; on your height property. Another important thing is that you need to change your class position like this: .button { background: #45A1F1; height: 40px; width: 620px; /*Width of regular button */ } .wide { background: #45A1F1; height: 40px; width: 300px; !important; /* Width of wide button */ } You can simplify your code by using this jQuery: $(document).ready(function(){ $('.chatbox').hide(); $('#btn-chat').click(function() { $("#blk-collaboration .chatbox").slideToggle("slow",function(){ $("#blk-collaboration #toggle").css("background","#45A1F1"); }); $(this)//this is a button DOM element. wrapping in jQuery object. .toggleClass('wide'); // removing wide class so button became smaller. }); }); Check out this Fiddle..
accepted answer of: http://stackoverflow.com/q/25348149
type: Answer
answers question: http://stackoverflow.com/q/25348149
downvote count: 0

http://stackoverflow.com/q/25245195
has body: Say I have an array like this: [ { id: 1, parent: null }, { id: 2, parent: null }, { id: 3, parent: 2 }, ... ] This hierarchy can nest deeply. How can I create a multidimensional array/object out of this one dimensional array with functional programming in JavaScript? (Say with LoDash.) EDIT: Sorry, if anyone thinks this question lacks specification like an output format. I tried to stay generic with this question on purpose!
favorite count: 0
has comment: http://stackoverflow.com/comment/39351684
has comment: http://stackoverflow.com/comment/39329911
downvote count: 2
upvote count: 1
type: AnsweredQuestion
has title: Creating a hierarchy with functional programming in JavaScript
score: -1
type: Question
has answer: http://stackoverflow.com/a/25246470
accepted answer: http://stackoverflow.com/a/25246470
tagged with: functional-programming
answer count: 1
tagged with: arrays
has comment: http://stackoverflow.com/comment/39329954
tagged with: javascript
has comment: http://stackoverflow.com/comment/39329970

http://stackoverflow.com/q/25332482
accepted answer: http://stackoverflow.com/a/26456522
has comment: http://stackoverflow.com/comment/41546806
has comment: http://stackoverflow.com/comment/39493479
type: AnsweredQuestion
upvote count: 5
tagged with: gruntjs
type: Question
answer count: 2
score: 5
tagged with: environment-variables
has comment: http://stackoverflow.com/comment/41535346
downvote count: 0
tagged with: javascript
has title: Grunt Environment Variables Don't Get Set Until All Tasks Loaded
tagged with: express
has answer: http://stackoverflow.com/a/26456522
has body: I am using the npm modules grunt env and load-grunt-config in my project. grunt env handles environment variables for you, while load-grunt-config handles, well, loads the grunt configuration for you. You can put your tasks into other files, then load-grunt-config will bundle them up and have grunt load &amp; consume them for you. You can also make an aliases.js file, with tasks you want to combine together into one task, running one after another. It's similar to the grunt.registerTask task in the original Gruntfile.js. I put all my grunt tasks inside a separate grunt/ folder under the root folder with the main Gruntfile, with no extra subfolders, as suggested by the load-grunt-config README.md on Github. Here is my slimmed-down Gruntfile: module.exports = function(grunt) { 'use strict'; require('time-grunt')(grunt); // function &amp; property declarations grunt.initConfig({ pkg: grunt.file.readJSON('package.json') }); require('load-grunt-config')(grunt, { init: true, loadGruntConfig: { scope: 'devDependencies', pattern: ['grunt-*', 'time-grunt'] } }); }; In theory, setting all these files up the correct way for load-grunt-config to load should be exactly the same as just having a Gruntfile.js. However, I seem to have run into a little snag. It seems the environment variables set under the env task do not get set for the subsequent grunt tasks, but are set by the time node processes its tasks, in this case an express server. grunt env task: module.exports = { // environment variable values for developers // creating/maintaining site dev: { options: { add: { NODE_ENV: 'dev', MONGO_PORT: 27017, SERVER_PORT: 3000 } } } }; grunt-shell-spawn task: // shell command tasks module.exports = { // starts up MongoDB server/daemon mongod: { command: 'mongod --bind_ip konneka.org --port ' + (process.env.MONGO_PORT || 27017) + ' --dbpath C:/MongoDB/data/db --ipv6', options: { async: true, // makes this command asynchronous stdout: false, // does not print to the console stderr: t…
has comment: http://stackoverflow.com/comment/39493658
has comment: http://stackoverflow.com/comment/41546900
tagged with: node.js
favorite count: 0
possible better answer: http://stackoverflow.com/a/25333267
has answer: http://stackoverflow.com/a/25333267

http://stackoverflow.com/q/25344139
has comment: http://stackoverflow.com/comment/39513361
score: 0
has answer: http://stackoverflow.com/a/25345735
upvote count: 1
tagged with: stylesheet
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25344380
tagged with: javascript
tagged with: browser
answer count: 3
has comment: http://stackoverflow.com/comment/39513735
has comment: http://stackoverflow.com/comment/39513513
accepted answer: http://stackoverflow.com/a/25344380
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25344185
tagged with: css
has answer: http://stackoverflow.com/a/25344185
has title: Loading Browser Specific Style Sheets in Modern Browsers
type: AnsweredQuestion
has body: I really need some help here. I have searched the forum and the internet for hours. I have found many articles but they either have no definitive working answers on how to do this or they are too old. I have 2 stylesheets. One for IE and one for all other browsers. This is not ideal I know but this was a complicated project and it is the way things developed. One sheet is 3D (webkit) and the other is 2D (IE). I need to be able to load the CSS based on the browser. I only need the 2 options, IE an other. I have tried conditional statements and I have tried browser detection. Must work for modern browsers. I have tried the following in the head and nothing has worked. The webkit CSS either overrides the IE CSS or it doesn't load at all. Please assist. Attempt 1 (problem - webkit css overrides IE CSS even though it is commented): &lt;!--[if !IE]&gt;&lt;!--&gt; &lt;link rel="stylesheet" type="text/css" href="http://secure.cart32.com/WarrenKahn/SolarWebkit.css" /&gt; &lt;!--&lt;![endif]--&gt; &lt;!--[if gte IE 9]&gt;&lt;!--&gt; &lt;link rel="stylesheet" type="text/css" href="http://secure.cart32.com/WarrenKahn/SolarIE.css" /&gt; &lt;!--&lt;![endif]--&gt; &lt;!--[if lte IE 9]&gt;&lt;!--&gt; &lt;link rel="stylesheet" type="text/css" href="http://secure.cart32.com/WarrenKahn/SolarIE.css" /&gt; &lt;!--&lt;![endif]--&gt; Attempt 2 (problem - won't load at all in any browser): var nAgt = navigator.userAgent; var browserName = navigator.appName; var nameOffset,verOffset,ix; // In Opera, the true version is after "Opera" or after "Version" if ((verOffset=nAgt.indexOf("Opera"))!=-1) { browserName = "Opera"; } // In MSIE, the true version is after "MSIE" in userAgent else if ((verOffset=nAgt.indexOf("MSIE"))!=-1) { browserName = "Microsoft Internet Explorer"; } // In Chrome, the true version is after "Chrome" else if ((verOffset=nAgt.indexOf("Chrome"))!=-1) { browserName = "Chrome"; } // In Safari, the true version is after "Safari" or after "Version" else if ((verOffset=nAgt.inde…

http://stackoverflow.com/q/25278600
tagged with: wordpress
has comment: http://stackoverflow.com/comment/39392295
type: Question
has answer: http://stackoverflow.com/a/25279495
has title: dependent dropdown in wordpress theme files
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39391883
has comment: http://stackoverflow.com/comment/39392419
score: 0
has comment: http://stackoverflow.com/comment/39392536
has comment: http://stackoverflow.com/comment/39392442
has comment: http://stackoverflow.com/comment/39392258
has body: I want to create state/city dependent dropdown in wordpress. This is my js file code I have created function called getcity in function.php and add hooks and action to that function and add this js file to theme js folder and enque it in function file. I m getting empty alert ?? Anybody has any idea?? add_action('wp_head','ajaxurl'); function ajaxurl() { ?> this is dropdown code <?php _e('State ','wpestate'); ?> Select state <?php $result=$wpdb->get_results("select distinct(state) from tblcitylist"); //$wpdb->get_results($query); foreach($result as $row) { $state=$row->state; echo ' '.$state.' '; } ?> In function.php function getcity(){ global $wpdb; if($_POST['state']) { $id=$_POST['state']; $result=$wpdb->get_results("SELECT * FROM tblcitylist WHERE state='$id'"); //$wpdb->get_results($query); foreach($result as $row) { $city_name = $row- >city_name; $city_id = $row->city_id; echo ' '.$city_name.' '; //echo ' '.'New Phase'.' '; } } } add_action("wp_ajax_nopriv_getcity", "getcity"); add_action("wp_ajax_getcity", "getcity"); I have included js file as follows in functions.php wp_enqueue_script('my_own_js', get_template_directory_uri().'/js/my_own_js.js',array('jquery'));
type: UnansweredQuestion

http://stackoverflow.com/comment/39554960
has text: Did you not have a jobs template beforehand? Was the application template showing up when you hit the root of your app?
score: 0
comment on: http://stackoverflow.com/q/25367012
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25240844
type: Question
has comment: http://stackoverflow.com/comment/39322028
tagged with: javascript
has answer: http://stackoverflow.com/a/25241056
accepted answer: http://stackoverflow.com/a/25241056
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/25241000
has body: I want to populate a table with some data I get from a database using http requests. I get json encoded data with a php script and then I populate the table using jquery echoed from a php script. I doesn't look neat at all and I am wondering how I can do that differently. I want to have php and js in separate files because at the moment when I view the source of the webpage I have like 3k+ lines as all the javascript code is generated inside a script tag and due to the large amount of data the javascript code gets repeated. The actual data I have to work with will be even bigger than what I use now for testing. To give you a better idea of what I am doing at the moment I will write some dummy code here: &lt;?php require_once ('functions.php'); include 'header.html'; include 'standardTable.html'; $results = file_get_contents("http://url.com"); $decodedResult = json_decode($results, true); // I have a function that creates and empty table based on how big the data set is // This function is placed in functions.php CreateEmptyTable($decodedResults); // Then I go ahead and populate the table based on some rules PopulateTable($decodedResults); function PopulateTable($res) { $rowNum = 0; for ($i=0;$i&lt;count($res);$i++) { $rowNum++; foreach($res as $key =&gt; $value) { if ($key == "something") echo '$("tbody tr#row_'.$rowNum.'") .find("td:nth-child(id_based_on_key)").text("'.$value.'"); '; else if ($key == "something_else") echo 'some other jquery lines'; } } } include 'footer.html'; So as you can see this doesn't look pretty at all so I'm wondering if I can structure my code in another way. The thing to keep in mind is that I have to pass php values to the javascript code. I will appreciate if you can help me out with this and please let me know if you need more details as I wrote something short as an example and it may not be clear enough. Cheers!
downvote count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39321572
tagged with: http://stackoverflow.com/tag/html
has title: Populate a table dynamically using javascript echoed from php?
tagged with: php
has comment: http://stackoverflow.com/comment/39321649
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25241000
score: 1

http://stackoverflow.com/q/25243523
tagged with: php
has answer: http://stackoverflow.com/a/30838162
type: Question
answer count: 2
tagged with: javascript
upvote count: 11
has comment: http://stackoverflow.com/comment/43616506
tagged with: joomla3.0
has title: Add custom confirm message to standard joomla 3.0 admin toolbar button
has answer: http://stackoverflow.com/a/64161701
favorite count: 0
has body: Add custom confirm message to standard Joomla 3.0 admin toolbar button. I can get alert messages on delete when I don't select any check boxes on the detailed list. I can get same on any button by set last parameter true in JToolBarHelper::custom('userdetails.sendMail', 'mail.png', 'mail_f2.png', 'Send Mail', false); I want to add a confirm message on the click event of this Button.
downvote count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/21682391
score: 11

http://stackoverflow.com/comment/39365834
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25264373
type: QuestionComment
has text: Indeed. Python and Java (and probably lots of other languages) have had the feature for a long time, so it would be nice to see it come to JS as well.

http://stackoverflow.com/q/25270181
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39379311
tagged with: http://stackoverflow.com/tag/html
has title: Saving a transparent image (PNG) as background image
linked to: http://stackoverflow.com/q/1394061
has body: I have two divs, one above the other. In the foreground div, I have a transparent image of a certain dimension; and in the background div, a colored image. I want to be able to save the transparent image in a way that it also 'saves' the underlying (background) image (since the foreground image is transparent). I know this can be done using canvas but I would like to know if it's possible to do it without using canvas because it doesn't always work with non-image elements (e.g. object).
type: Question
has comment: http://stackoverflow.com/comment/39377355
tagged with: javascript
tagged with: image
score: 0
has comment: http://stackoverflow.com/comment/39377063
answer count: 1
has answer: http://stackoverflow.com/a/25271061

http://stackoverflow.com/a/25312875
answers question: http://stackoverflow.com/q/25245164
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39481696
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25245164
score: 1
has body: ng-submit directive is meant to be used with form. &lt;form ng-submit=""&gt; ... &lt;/form&gt; use ng-click instead. But I don't know using ng-click is a good idea in ion-nav-buttons. Try using it on buttons or divs instead. Good luck!

http://stackoverflow.com/comment/39426310
type: QuestionComment
has text: you can put a constraint on the db table to keep email unique. that won't stop the false approval, but it will keep the DB clean, and you can dbl-check the creation in a subsequent ajax call.
score: 3
comment on: http://stackoverflow.com/q/25296929
type: Comment

http://stackoverflow.com/comment/39411133
type: Comment
has text: @Cockootec: _"I would like to add the word "Success" into an empty DIV"_. I think the OP means ` ` with that _"empty div"_.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25289040

http://stackoverflow.com/comment/39522176
comment on: http://stackoverflow.com/q/25349339
type: Comment
type: QuestionComment
has text: `steam = $.ajax({` is the culprit.
score: 1

http://stackoverflow.com/a/25261541
has body: Have you tried var img = new Image(); instead of var img = printWindow.document.createElement('image'); &lt;image&gt; isn't a correct image tag (&lt;img&gt; is it)
answers question: http://stackoverflow.com/q/25261453
score: 0
type: Answer

http://stackoverflow.com/comment/39378355
type: Comment
has text: The event `oninput` covers all cases.
type: AnswerComment
comment on: http://stackoverflow.com/a/25254264
score: 0

http://stackoverflow.com/comment/39338492
type: Comment
has text: Shouldn't it be - var form = $("#form1") instead of $(this)?
score: 0
comment on: http://stackoverflow.com/q/25249573
type: QuestionComment

http://stackoverflow.com/q/25377640
tagged with: html.dropdownlistfor
has comment: http://stackoverflow.com/comment/39575298
type: Question
tagged with: asp.net-mvc
tagged with: javascript
has body: I have a peculiar question I am developing some website and i need a condition to determine my next operation The requriment is this how to detect that the dropdown list is open or not or how to track that someone has clicked on dropdown list ?
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25377701
tagged with: drop-down-menu
has title: how to detect that the dropdown list is open or not or how to track that someone has clicked on dropdown list?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25378128

http://stackoverflow.com/comment/39468195
type: QuestionComment
has text: @RahilWazir Thats the problem. there really isn't much code. At the base controller, I bind the task structure to scope, and the labels look like my sample. Since this is only affecting Chrome, and I have deadlines, After release, if this isn't resolved, I will will make a plunker demo.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25319066

http://stackoverflow.com/comment/39431837
score: 0
comment on: http://stackoverflow.com/q/25282920
type: Comment
type: QuestionComment
has text: You would basically do return this.get('model').reload() and that should return you a promise. More here http://emberjs.com/api/data/classes/DS.Model.html#method_reload

http://stackoverflow.com/a/25385010
has comment: http://stackoverflow.com/comment/39622523
has comment: http://stackoverflow.com/comment/39589347
upvote count: 2
has body: If I understand your question, I believe all you need to do is name your window when you call window.open and then use this reference in your code just like you would the contentWindow of an iframe: var myWindow = window.open('newTab.html'); myWindow.postMessage('You\'re a nice looking window', 'http://yourtargetdomain.com'); You would then put the 'message' handler inside the newTab.html document window.addEventListener('message', function (event) { // security check ... console.log('message: ' + event.data); });
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25384729
score: 2
answers question: http://stackoverflow.com/q/25384729
has comment: http://stackoverflow.com/comment/39589527

http://stackoverflow.com/comment/39478625
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25323027
has text: Is there a way to pass parameter with a value from code behind using regitster startup script.I guess ready method will execute prior to the value being assign to my parameter and will be null. i am setting this parameter in page load and i need to pass it to the external javascript function

http://stackoverflow.com/comment/39792386
comment on: http://stackoverflow.com/a/25379980
score: 0
type: AnswerComment
has text: does that make sense?
type: Comment

http://stackoverflow.com/q/25291849
has body: I am trying to make a website, where a user can input some data. I would then run a number of methods on this data using sinatra and then display the results on the same input page (i.e. without refreshing (or redirecting) the page - as such the input data is still the form). I understand that I would probably have to use javascript to watch the submit button and use that to stop the redirection. I know ruby quit well, but do not know javascript that well; so please bear with me. I have done quite a bit of research on this, but I haven't got anything to work. (This question is similar, but I haven't even been able to successfully use that). This is the my sinatra file. Currently, pressing the submit button redirects to an another page. require 'sinatra' get '/' do erb :search end post '/' do @the_input = " ID header #{params[:input]}" end __END__ @@ search I would really be grateful if someone could help me to get this to work so that the input of the form is displayed into the content div. Any explanation of what you are doing would also be extremely helpful. Many Thanks for all your help.
type: Question
has answer: http://stackoverflow.com/a/25291992
tagged with: javascript
linked to: http://stackoverflow.com/q/15377367
score: 0
answer count: 1
has title: Sinatra: Present Form input without redirecting
accepted answer: http://stackoverflow.com/a/25291992
tagged with: jquery
tagged with: ruby
tagged with: sinatra
type: AnsweredQuestion

http://stackoverflow.com/a/25304634
upvote count: 7
has comment: http://stackoverflow.com/comment/71208257
has body: Best is to use regex to replace all occurrences: C:\\backup\\".replace(/\/\//g, "/")[0] this returns: C:\backup\ OR use split() "C:\\backup\\".split(); both produces your desired result C:\backup\ console.log("using \"C:\\backup\\\".replace(/\/\//g, \"/\")") console.log("C:\\backup\\".replace(/\/\//g, "/")); console.log("Using \"C:\\backup\\\".split()"); console.log("C:\\backup\\".split()[0]);
type: Answer
has comment: http://stackoverflow.com/comment/131208973
score: 4
has comment: http://stackoverflow.com/comment/79313317
downvote count: 3
has comment: http://stackoverflow.com/comment/81724141
answers question: http://stackoverflow.com/q/25304214

http://stackoverflow.com/a/25358277
downvote count: 1
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/25358168
type: Answer
has body: @Update Here is an generall definition "Occurs when the selection, the checked state or the contents of an element have changed. In some cases, it only occurs when the element loses the focus."

http://stackoverflow.com/q/25249961
score: 5
has comment: http://stackoverflow.com/comment/39350133
has title: value of select elements with "e.value" vs "e.options[e.selectedIndex].value"
has comment: http://stackoverflow.com/comment/39340412
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/70682906
tagged with: selectedvalue
upvote count: 5
has comment: http://stackoverflow.com/comment/39339360
has comment: http://stackoverflow.com/comment/39339304
type: Question
tagged with: selectedindex
has body: Given the HTML: test1 test2 test3 and the javascript: var e = document.getElementById('mySelect'); To get the value of the select I can use e.value and e.options[e.selectedIndex].value. I am aware that e.options[e.selectedIndex].value will give me the selected value (1,2 or 3) and e.options[e.selectedIndex].text would give me test1, test2, test3 depending on which is selected. Is it ok to use just e.value? was this a problem in old browsers? which is more correct: e.value vs e.options[e.selectedIndex].value? jsFiddle
has answer: http://stackoverflow.com/a/25268879
possible better answer: http://stackoverflow.com/a/25276536
has comment: http://stackoverflow.com/comment/39340754
linked to: http://stackoverflow.com/q/1085801
downvote count: 0
has answer: http://stackoverflow.com/a/25276536
has comment: http://stackoverflow.com/comment/39339039
tagged with: javascript
has comment: http://stackoverflow.com/comment/39340463
favorite count: 0
has comment: http://stackoverflow.com/comment/39339267
answer count: 3
has comment: http://stackoverflow.com/comment/39339044
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39355421
accepted answer: http://stackoverflow.com/a/25268879
tagged with: html-select
has comment: http://stackoverflow.com/comment/39339436
has comment: http://stackoverflow.com/comment/39339332

http://stackoverflow.com/comment/39584428
has text: Please add the code of your double for loop, just to be sure of what you're asking.
score: 0
comment on: http://stackoverflow.com/q/25382759
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25244836
has answer: http://stackoverflow.com/a/25244872
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25245047
accepted answer: http://stackoverflow.com/a/25244858
has answer: http://stackoverflow.com/a/25245261
has title: How to access object property names
answer count: 5
has comment: http://stackoverflow.com/comment/39329109
has comment: http://stackoverflow.com/comment/39329149
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25244858
score: 0
has answer: http://stackoverflow.com/a/25245317
type: Question
has body: I have a data structure like this: var r = { "abc": ["a1","a2","a3"] , "xyz": ["x1","x2","x3"] } I am accessing these elements like this jQuery.each(r,function(index,ele){ alert(ele); // values like a1,a2,a3 in ele -loop }); I am getting values a1, a2, a3 in elements in ele variable. I want to access values abc and xyz. how to access value abc in loop? fiddle: [fiddle]: http://jsfiddle.net/ce58qutw/
possible better answer: http://stackoverflow.com/a/25244872

http://stackoverflow.com/a/25261613
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25261489
answers question: http://stackoverflow.com/q/25261489
has body: Your problem is that you select the correct values, then set the adjacent input fields to those values - this works fine. Then you inexplicably try and reselect the values out of the input fields (incorrectly). This is all unnecessary as you select the correct values in the 1st place, simply use those values in your ajax data: $(document).ready(function(e) { $('input[type="button"]').on('click', function() { domain_price = $(this).parents('h2').children('.domain_price').text(); $(this).siblings('.order_domain').val(domain_price); //order_domain = $('.order_domain').val(); &lt;-your error domain = $(this).parents('h2').children('.domain').text(); $(this).siblings('.domain_name').val(domain); //domain_name = $('.domain_name').val(); &lt;- your error //setTimeout(function(){ $.post('orderdomain.php',{order_domain:domain_price, domain:domain},function(data){ //}); },1000); }); });
has comment: http://stackoverflow.com/comment/39360527
has comment: http://stackoverflow.com/comment/39360450

curl
tags question: http://stackoverflow.com/q/25363804
tag name: curl
type: Tag

http://stackoverflow.com/a/25379344
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25379301
has comment: http://stackoverflow.com/comment/39583266
answers question: http://stackoverflow.com/q/25379301
score: 5
has comment: http://stackoverflow.com/comment/39586742
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39583383
has comment: http://stackoverflow.com/comment/39586897
has comment: http://stackoverflow.com/comment/39587658
has body: Yes. If none of the params passed to $.when() are unresolved promise objects then the done handler is called immediately. If a single argument is passed to jQuery.when and it is not a Deferred or a Promise, it will be treated as a resolved Deferred and any doneCallbacks attached will be executed immediately. The doneCallbacks are passed the original argument. In this case any failCallbacks you might set are never called since the Deferred is never rejected. var a = 7; $.when(a).done(function (x) { console.log('inside', x) }); console.log('after') Demo: Fiddle, Fiddle2
type: Answer
has comment: http://stackoverflow.com/comment/39586301
has comment: http://stackoverflow.com/comment/39586734
has comment: http://stackoverflow.com/comment/39586716
has comment: http://stackoverflow.com/comment/39586274
has comment: http://stackoverflow.com/comment/39579916

http://stackoverflow.com/a/25300580
answers question: http://stackoverflow.com/q/25300321
downvote count: 0
upvote count: 2
has body: Here is a fiddle to demonstrate that (switch between callSuper and callParent in the overridden class to see the difference in console logs) Based on this documentation.
type: Answer
score: 2

http://stackoverflow.com/q/25346009
answer count: 2
has comment: http://stackoverflow.com/comment/39516558
has title: How to make video disappear after end in html?
tagged with: javascript
type: UnansweredQuestion
has body: How do I make a video on an overlay all disappear after it has finished playing? Is this javascript? Here is the code I have so far: HTML / CSS Video end event issue
linked to: http://stackoverflow.com/q/25274410
has answer: http://stackoverflow.com/a/25346094
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25346034
tagged with: video
linked to: http://stackoverflow.com/q/6624904
score: 0

http://stackoverflow.com/comment/39450542
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25310242
type: Comment
has text: is it even correct to compare a `Date` and a `Moment` using that operator?

http://stackoverflow.com/comment/39326265
type: Comment
type: QuestionComment
has text: @C-linkNepal I can't see a single question mark (except in that comment), but maybe you can tell me what the question is. I just see a description of something the OP wants to achieve.
comment on: http://stackoverflow.com/q/25243367
score: 0

http://stackoverflow.com/a/51395131
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/102597812
upvote count: 1
has body: Use this style code on your page.Now your chrome url bar will not hide.It'll stop scrolling. &lt;style type="text/css"&gt; html, body {margin: 0; height: 100%; overflow: hidden} &lt;/style&gt; You can also see here
answers question: http://stackoverflow.com/q/25298443

graphics
tag name: graphics
tags question: http://stackoverflow.com/q/25389528
type: Tag
tags question: http://stackoverflow.com/q/25338481
tags question: http://stackoverflow.com/q/25239391

http://stackoverflow.com/comment/39560542
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25369848
score: 0
has text: Your angularMoment js file needs to be loaded before your application js file. Meaning angularMoment needs to be defined before it is injected into your factory. Make sure your files are loading in correct order.

http://stackoverflow.com/q/25313273
type: AnsweredQuestion
tagged with: highcharts
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25314265
type: Question
has title: Pie Chart Custom Legend
upvote count: 1
answer count: 1
tagged with: charts
has answer: http://stackoverflow.com/a/25314265
has body: I am using highcharts to build a Pie chart, I am hiding the default legend that comes with highcharts and making my own. I am able to build one for line graphs, but when I do it for a pie chart, I can not get show()/hide() methods of the data to work because they are all in the same series. How can I get show()/hide() to work on a pie chart? var chart = $('#chartdiv').highcharts(); $(".legend div").html(""); $(chart.series).each(function(seriesKey, series){ $(series.data).each(function(k, v){ var color = v.color; var name = v.name; var total = v.options.y; var activeStatus = v.visible ? "active" : "inactive"; var item = $("&lt;div data-color=\""+color+"\" data-series=\""+k+"\" class=\""+activeStatus+"\"&gt;&lt;p&gt;"+name+"&lt;/p&gt;&lt;p&gt;"+total+"&lt;/p&gt;&lt;/div&gt;"); $(".legend &gt; div").append(item); if(item.hasClass("active")){ item.css("border-bottom", "solid 3px " + color); } item.on("mouseover mouseleave click", function(e){ if(e.type === "mouseover"){ $(this).css("border-bottom", "solid 3px " + color); }else if(e.type === "mouseleave"){ if($(this).hasClass("active")){ $(this).css("border-bottom", "solid 3px " + color); }else{ $(this).css("border-bottom", "solid 3px #dddddd"); } }else if(e.type === "click"){ $(this).removeClass("active inactive"); if(v.visible){ $(this).addClass("inactive"); v.hide(); }else{ $(this).addClass("active"); v.show(); } } }); }); });
tagged with: pie-chart

http://stackoverflow.com/comment/39572531
has text: If you remember to keep sessions alive and not start new ones for every new call, it should work to emulate human behaviour. However, I would start with something simpler than an online banking site ;)
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25375649
type: QuestionComment

http://stackoverflow.com/q/25256535
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25256751
has answer: http://stackoverflow.com/a/25256661
has body: I'm trying to get each array link on some interval. For example: I get first link, wait for 30 seconds, next link, wait for 30 seconds another link etc. Here is my code: var urls = [ 'http://mylink1','http://mylink2','http://mylink3','http://mylink4']; setInterval(function(){ urls.forEach(function(entry){ console.log(entry); ajaxd(entry); console.log("merge pana aici"); }); },30000); function ajaxd(my_url) { $.ajax({ type : "POST", url : my_url, success : function(msg) { console.log(my_url); } }); } And the problem is, after 30 seconds I get all the links. Not first value, wait for 30 seconds, next value and so on..
type: Question
score: 5
upvote count: 5
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/37215055
linked to: http://stackoverflow.com/q/16873889
has answer: http://stackoverflow.com/a/25256687
has answer: http://stackoverflow.com/a/25256626
has answer: http://stackoverflow.com/a/25257637
possible better answer: http://stackoverflow.com/a/25256661
downvote count: 0
answer count: 7
tagged with: jquery
has title: Javascript - Set interval for each array value. setinterval, array, foreach
favorite count: 0
tagged with: php
has answer: http://stackoverflow.com/a/25256791
accepted answer: http://stackoverflow.com/a/25256791

http://stackoverflow.com/q/25329108
type: AnsweredQuestion
has title: Javascript: Error in Date result format
score: 0
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25329126
tagged with: javascript
tagged with: date
has body: I try to make timer in my site. Now i have do subtract " Now Day " with " End Day " like this :- var end = new Date( 2014 , 08 , 16 , 14 , 20 , 0 ); var _second = 1000; var _minute = _second * 60; var _hour = _minute * 60; var _day = _hour * 24; var timer; function showRemaining() { var now = new Date(); var distance = end - now; if (distance &lt; 0) { clearInterval(timer); document.getElementById('d').innerHTML = '-'; document.getElementById('m').innerHTML = '-'; document.getElementById('h').innerHTML = '-'; document.getElementById('s').innerHTML = '-'; return; } var days = Math.floor(distance / _day); var hours = Math.floor((distance % _day) / _hour); var minutes = Math.floor((distance % _hour) / _minute); var seconds = Math.floor((distance % _minute) / _second); if(days) { document.getElementById('d').innerHTML = days; $("#d").parent('li').show(); } document.getElementById('h').innerHTML = hours; document.getElementById('m').innerHTML = minutes; document.getElementById('s').innerHTML = seconds; $(".timers").css({'visibility':'visible'}); } timer = setInterval(showRemaining, 1000); The result of this operation it must be 1 day, but its show me 31 day !! I try to alert var end = new Date( 2014 , 08 , 16 , 14 , 20 , 0 ); it show me Tue sep 16 2014 14:20:00 GMT +0300 (Jerusalem Daylight Time) Its Error, It must be like Tue Agu 16 2014 14:20:00 GMT +0300 (Jerusalem Daylight Time) Why !!
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25329126

http://stackoverflow.com/q/25369230
has body: I have tried to display the following image onto the html, however to no avail. When the html is loaded, it displays the picture icon, but it won't display the image itself. I have copied the code below Thanks. HTML Code: XML: <?xml version="1.0" encoding="UTF-8"?> <TEST_GROUP> <TITLE>Hello World "CFL_175x175.png" </TEST_GROUP>
has answer: http://stackoverflow.com/a/25369441
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25369441
tagged with: javascript
tagged with: image
has title: Displaying Image from XML into HTML
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: http://stackoverflow.com/tag/xml
has comment: http://stackoverflow.com/comment/39559358

http://stackoverflow.com/q/25238545
duplicate of: http://stackoverflow.com/q/14028959
has comment: http://stackoverflow.com/comment/39317658
has body: If width of the device visiting my site is <320 I want a to be removed. This is what I've tried with: HTML: Title JavaScript: if (document.documentElement.clientWidth <= 320) { document.write("Testing"); var h3 = document.getElementById("title"); h3.parentNode.removeChild(h3); } The "testing" label is printed on the screen but the is still there. What's wrong?
score: 0
linked to: http://stackoverflow.com/q/5933157
type: Question
tagged with: javascript
has title: Trying to remove HTML-element using JavaScript
answer count: 1
linked to: http://stackoverflow.com/q/14028959
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25238591
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25330749
has body: You simply place an ng-repeat inside the parent ng-repeat. Plunker.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25330608
answers question: http://stackoverflow.com/q/25330608
type: Answer
has comment: http://stackoverflow.com/comment/39490387
has comment: http://stackoverflow.com/comment/39492816
has comment: http://stackoverflow.com/comment/39489217
has comment: http://stackoverflow.com/comment/39492303
score: 4
upvote count: 4

http://stackoverflow.com/a/25325991
has comment: http://stackoverflow.com/comment/39480057
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39479849
has comment: http://stackoverflow.com/comment/39479990
has comment: http://stackoverflow.com/comment/39479787
has comment: http://stackoverflow.com/comment/39479944
has comment: http://stackoverflow.com/comment/39479846
has body: Chrome has some specialized windows/popups available for it's own use .. things you can't do via regular JavaScript. Other things you can't do via regular JavaScript are the Enable Webcam prompt window Download file window. If you are trying to do something similar in pure JavaScript, this is a great little replacement: http://www.codersgrid.com/2013/07/05/alertify-js-replacement-of-your-browser-alert-dialog/
downvote count: 0
answers question: http://stackoverflow.com/q/25325897
type: Answer

http://stackoverflow.com/comment/39650504
has text: @Rookie I rewrote my answer to correctly address the problem. Sorry I misunderstood it the first time.
comment on: http://stackoverflow.com/a/25388943
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25319926
tagged with: facebook-graph-api
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/39494595
tagged with: facebook
tagged with: php
has comment: http://stackoverflow.com/comment/39494880
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39494913
has comment: http://stackoverflow.com/comment/39497918
type: Question
has body: I'm trying to allow my users to post a bulleted list from my webapp to their Facebook feed. The list is created in a form (with bullets &amp; line breaks) that can then be edited and submitted. My code works fine when sending regular text (posting the form contents to FB feed), but it breaks when the message has bullets (&#x25cf;&amp;#x25cf;) and line breaks (&amp;#13;&amp;#10;) aren't recognized. I've tried a bunch of different ways of encoding the message, but none of them work. Here's my FB function: &lt;script&gt; window.fbAsyncInit = function() { FB.init({ appId : '(MYID)', xfbml : true, version : 'v2.0' }); FB.login(function(){ FB.api('/me/feed', 'post', {message: '&lt;?=$share_text;?&gt;'}); }, {scope: 'publish_actions'}); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); &lt;/script&gt; My questions are how should I encode $share_text, which comes from a POST form, and should I use a different way to write bullets &amp; line breaks so that Facebook understands there are bullets and line breaks? If I copy bullets and line breaks into a status update they work fine, so I assume this is possible. EDIT: I've narrowed the problem down to the line breaks. I can post bullets to FB if there are no line breaks in the text. I think the issue is that html encoding of &lt;BR /&gt; includes ;'s. Thanks
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39494554
has answer: http://stackoverflow.com/a/25334462
accepted answer: http://stackoverflow.com/a/25334462
has title: Including line breaks & bullet points in a Facebook graph post function
has comment: http://stackoverflow.com/comment/39495312
has comment: http://stackoverflow.com/comment/39470196
has comment: http://stackoverflow.com/comment/39497105

http://stackoverflow.com/a/25277472
accepted answer of: http://stackoverflow.com/q/25277010
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25277010
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Besides the answer above , in fact the offical has already have this answer Most common FAQs Q. My events don't work on the second page A. When attaching events to cells in a table controlled by DataTables, you need to be careful how it is done. Because DataTables removes nodes from the DOM, events applied with a static event listener might not be able to bind themselves to all nodes in the table. To overcome this, simply use jQuery delegated event listener options, as shown in this example. Additionally, you could use my Visual Event bookmarklet to help debug event issues. reference:http://datatables.net/faqs/#events $('#example tbody').on('click', 'tr', function () { var name = $('td', this).eq(0).text(); alert( 'You clicked on '+name+'\'s row' ); } ); elegant and works

http://stackoverflow.com/a/25351252
type: Answer
downvote count: 0
has body: Object.create without the () is just a reference to the function. With the (), it's a call to the function. Calling Object.create() with no argument is an error, as the exception message explains. You have to pass an object, or the value null.
score: 5
accepted answer of: http://stackoverflow.com/q/25351237
answers question: http://stackoverflow.com/q/25351237
type: AcceptedAnswer
upvote count: 5

http://stackoverflow.com/comment/39437709
has text: may be `String filePath = context.getInitParameter("file-upload");` returning null, check out.
score: 0
comment on: http://stackoverflow.com/q/25301237
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25304942
upvote count: 2
answers question: http://stackoverflow.com/q/25304500
type: Answer
score: 2
has body: Have a look at the Cycle2 API page, the loader option and the associated demo. In summary: Set data-cycle-loader="wait" on the slideshow div. This pauses the slideshow until all images are loaded. Set the background of the slideshow div to display the loading gif. Use CSS to center this image. Here is the rule used in the above mentioned demo: .cycle-slideshow { background: url(http://malsup.github.com/images/spinner.gif) 50% 50% no-repeat; }
downvote count: 0

http://stackoverflow.com/comment/39482339
score: 0
has text: @Bergi: I don't know much Lisp either apart from reading up SICP. I just know that closures were invented much later with Scheme. I used Tcl a lot and did some Forth hacking. Both very primitive but purely functional (Though tcl programs traditionally looks procedural, there are almost no syntax in tcl. Instead, language constructs were implemented as functions). And you guessed it, maintaining state used globals which is a much older concept to closures (though related). Tcl made it less painful with namespaces allowing you to have multiple global scopes.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25325037

http://stackoverflow.com/comment/39374504
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25269181
type: Comment
has text: #facepalm Well now I know! I never imagined the CSS would be overriding the JS transforms, should have checked...

http://stackoverflow.com/comment/39517411
type: QuestionComment
type: Comment
has text: Post `.load` implementation.
score: 1
comment on: http://stackoverflow.com/q/25346538

http://stackoverflow.com/comment/39528396
type: Comment
type: QuestionComment
has text: JQuery is OK. I tried in the Dom ready handler as suggested, didn't change anything. No errors in console.
comment on: http://stackoverflow.com/q/25352668
score: 0

http://stackoverflow.com/comment/39488948
type: AnswerComment
has text: When you say to a label, do you mean a label in the HTML dom or are you referring to label as a variable.
comment on: http://stackoverflow.com/a/25330185
type: Comment
score: 0

http://stackoverflow.com/q/25300757
has answer: http://stackoverflow.com/a/25300860
tagged with: javascript
score: 0
answer count: 3
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25300860
has answer: http://stackoverflow.com/a/25300829
has answer: http://stackoverflow.com/a/25300870
has body: I have a row of checkboxes and I want the following: - when clicking the parent select/unselect all child checkboxes - when all checkboxes are checked (including the parent) and you uncheck one of the child checkboxes, the parent should also uncheck. I have this code: $(document).ready(function(){ //clicking the parent checkbox should check or uncheck all child checkboxes $(".parentCheckBox").click( function() { $(this).parents('fieldset:eq(0)').find('.childCheckBox').attr('checked', this.checked); } ); //clicking the last unchecked or checked checkbox should check or uncheck the parent checkbox $('.childCheckBox').click( function() { if ($(this).parents('fieldset:eq(0)').find('.parentCheckBox').attr('checked') == true &amp;&amp; this.checked == false) $(this).parents('fieldset:eq(0)').find('.parentCheckBox').attr('checked', false); if (this.checked == true) { var flag = true; $(this).parents('fieldset:eq(0)').find('.childCheckBox').each( function() { if (this.checked == false) flag = false; } ); $(this).parents('fieldset:eq(0)').find('.parentCheckBox').attr('checked', flag); } } ); }); And here it is in a fiddle: http://jsfiddle.net/2b2hw58d/1/ Why doesn't it work?
has comment: http://stackoverflow.com/comment/39433069
has comment: http://stackoverflow.com/comment/39433054
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
possible better answer: http://stackoverflow.com/a/25300829
type: AnsweredQuestion
has title: Checkboxes with parent and child selections
type: Question

http://stackoverflow.com/comment/39398350
score: 1
comment on: http://stackoverflow.com/a/25281794
type: AnswerComment
type: Comment
has text: Yes but not at the moment of the javascript execution. as @user2864740 showed :) Read my answer, I let two solutions

http://stackoverflow.com/comment/39514096
type: Comment
type: QuestionComment
has text: do you have the html markup you're referencing?
comment on: http://stackoverflow.com/q/25344592
score: 0

http://stackoverflow.com/a/25251326
upvote count: 4
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25249196
type: Answer
accepted answer of: http://stackoverflow.com/q/25249196
has comment: http://stackoverflow.com/comment/39341708
downvote count: 1
score: 3
has body: Figured this out. I simply added the code below, after the click method: describe('Search', function() { it('should click Search button and wait for results', function() { browser.driver.findElement(by.id('search')).click(); dvr.wait(function() { return dvr.isElementPresent(by.xpath( '/html/body/div/div[4]/div/div[2]/div/div/div/span')); }, 20000); }); });
has comment: http://stackoverflow.com/comment/77806870

http://stackoverflow.com/q/25334211
upvote count: 1
accepted answer: http://stackoverflow.com/a/25334232
type: AnsweredQuestion
score: -2
type: Question
tagged with: syntax-error
has answer: http://stackoverflow.com/a/25334256
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25334232
answer count: 3
has title: Javascript syntax error [Node JS]
possible better answer: http://stackoverflow.com/a/25334222
has answer: http://stackoverflow.com/a/25334222
tagged with: node.js
tagged with: syntax
downvote count: 3
has body: I am learning nodeJS and I have this syntax error which I don't understand. Can someone point out what is the syntax error, why I am getting it, and how do I bypass it? var http = require('http'); var url = require('url'); var server = http.createServer(function(req,res) { if (req.method == 'POST') { return res.end("Only get requests"); } var st = url.parse(req.url,true); if (st.indexOf("parsetime") &gt; -1) { var time = st.substring(st.indexOf("iso")); var date = new Date(time); var out = '{ "hour":'+date.getHours()+', "minute":'+date.getMinutes()+', "second":'+date.getSeconds()+', }'; res.writeHead(200, { 'Content-Type': 'application/json' }); res.end(out); } else if (st.indexOf("unixtime") &gt; -1) { var time = st.substring(st.indexOf("iso")); var date = new Date(time); var out = "{ 'unixtime':"+date.getTime()+" }"; res.writeHead(200, { 'Content-Type': 'application/json' }); res.end(out); } else { return res.end("404"); } }); server.listen(process.argv[2]); The syntax error is on line 11 : " var out = '{ "

http://stackoverflow.com/a/25339680
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25339188
type: Answer
accepted answer of: http://stackoverflow.com/q/25339188
has body: Would a queue be a suitable solution to this problem? You would split your code into two parts: one part adds functions to a queue, and another part regularly checks the queue. If there's something on it, it invokes that function. This example isn't an exact mapping to your situation, but it should demonstrate the approach: var queue = []; // Enqueue a function. function addFunctionToQueue() { var func = function() { console.log("I'm a queued function"); }; queue.push(func); } // Check the queue for a function, and run it if found. function runQueue() { var fn; while (fn = queue.shift()) { // [].shift() is undefined, and undefined is falsey fn(); } console.log("No more work to do, runQueue() ending."); } // Enqueue a function every second, and check the queue every 500ms setInterval(addFunctionToQueue, 1000); setInterval(runQueue, 500); If you generate a function that runs a passed-in function n times and add that function to your queue, then you can be sure that the functions will run in the order you enqueued them.
upvote count: 1

http://stackoverflow.com/q/25317821
accepted answer: http://stackoverflow.com/a/25317931
has body: In the code below, I can't seem to understand the ordering of events. When I load this in the browser, I get the alert before the first div renders and the .onclick event listener cannot find the translate_button element to attach to. I thought because of the use of window.onload, my script would execute after the above html loaded. Does this have to do with the inline javascript within the html? Disclaimer
type: AnsweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25317931
score: 0
has title: Window.onload and ordering
answer count: 1
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25386575
has comment: http://stackoverflow.com/comment/39592304
score: 1
answers question: http://stackoverflow.com/q/25386099
has comment: http://stackoverflow.com/comment/39592332
upvote count: 1
has body: Try this: $(document).ready(function() { $('#calendar').fullCalendar({ defaultDate: '&lt;?php echo date("Y-m-d");?&gt;', weekends: false, editable: true, lang: 'nl', events: [ &lt;?php echo $event;?&gt; ] }); grayDates(); });
has comment: http://stackoverflow.com/comment/39592267
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39592094
type: Answer
accepted answer of: http://stackoverflow.com/q/25386099

http://stackoverflow.com/a/25246788
upvote count: 3
has body: You can make a negation caluse like Pointy suggests but a more solid solution involves adding an extra node. The idea is that the row and the button become proper siblings since you can't style a TextNode. Lalalalaiaia Panananannaeue Now you can do: .list-group-item div:hover { background: #fafafa; cursor: pointer; } You will need some extra trickery to get the button in the right place, like: // untested .list-group-item { position: relative; } .list-group-item button { position: absolute; top: 5px; left: 5px; }
type: Answer
answers question: http://stackoverflow.com/q/25246472
has comment: http://stackoverflow.com/comment/39337420
downvote count: 0
has comment: http://stackoverflow.com/comment/39358392
score: 3

http://stackoverflow.com/q/25330571
possible better answer: http://stackoverflow.com/a/25333691
has answer: http://stackoverflow.com/a/25333691
upvote count: 1
tagged with: validation
favorite count: 0
tagged with: angularjs
downvote count: 0
type: AnsweredQuestion
score: 1
has title: how to show different message on required and invalid?
type: Question
tagged with: angularjs-directive
answer count: 2
has answer: http://stackoverflow.com/a/25332840
accepted answer: http://stackoverflow.com/a/25332840
has body: can you please tell me how to show different message on required and invalid ?In other word .make a form from json using plugin .In that there are some required parameter .and some I need to validate example "Email".When user press "submit" button if user did not fill the field it show "this field is required" .and if user fill the value but not same patten than it say "invalid value".can we show different message as different situation . i used this plugin https://github.com/Textalk/angular-schema-form/blob/master/docs/index.md#validation-messages and I make this plunker http://plnkr.co/edit/ZNJO3x3IqajjdMNStJMF?p=preview angular.module('test',['schemaForm']).controller('FormController', function($scope,$http){ $scope.schema = { type: "object", properties: { name: { type: "string", minLength: 2, title: "Name", description: "Name or alias" ,required:true,"default": "dddd"}, "student": { type: "string", title: "studentname", description: "Name or student" ,required:false}, "email": { "title": "Email", "type": "string", "pattern":"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", "description": "Email will be used for evil.", required:true }, title: { type: "string", required:true, enum: ['dr','jr','sir','mrs','mr','NaN','dj'], } } }; $scope.form = [ "*", { type: "submit", title: "Save" } ];
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25235457
tagged with: java
has title: google chart data formatting error(javascript)
type: Question
accepted answer: http://stackoverflow.com/a/25235635
tagged with: google-visualization
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25235635
has body: I'm calling a scatter plot with google.visualization.arrayToDataTable(loadGraphData); where loadGraphData is being generated from a backing bean in the form of an ArrayList&lt;ArrayList&lt;String&gt;&gt; and looks like this: "[['Date','Variable'], [0, 9.66], [1, 9.24], [2, 8.73], [3, 8.50]...]" The data isn't loading the graph using the var, but if I paste the output in its place (without the quotes)the code works and correctly displays the data. is there a convenient way to remove the quotes, or am I taking the wrong approach? BTW, I've replaced the dates with 0,1... as that was causing a different error I'm yet to fix. the data comes from a JSF backing bean, extract below: public ArrayList graphData(int variable, int nodeNumber) { Collection dataValues = dataValuesFacade.findVariable(currentNodes.getCurrentNodes().get(nodeNumber), variable); ArrayList &lt;DataValues&gt; dataValuesArray = new ArrayList(); dataValuesArray.addAll(dataValues); dataValues = dataValuesFacade.findVariable(currentNodes.getCurrentNodes().get(nodeNumber), 0); ArrayList&lt;DataValues&gt; timeValuesArray = new ArrayList(); timeValuesArray.addAll(dataValues); ArrayList &lt;DataPairs&gt; dataPairs = new ArrayList(); dataPairs.add(new DataPairs()); ArrayList&lt;ArrayList&lt;String&gt;&gt; returnData = new ArrayList&lt;&gt;(); ArrayList&lt;String&gt; newAL = new ArrayList(); newAL.add("Date"); newAL.add("Variable"); returnData.add(newAL); //Gson gson = new Gson(); for (int i=0;i&lt;dataValuesArray.size();i++) { String varTimestamp = dataValuesArray.get(i).getdTimeStamp().toString(); String dateTimestamp = timeValuesArray.get(i).getdTimeStamp().toString(); String tempVariable = dataValuesArray.get(i).getdVariable().toString(); String tempDate = timeValuesArray.get(i).getdVariable().toString(); if ((varTimestamp.equals(dateTimestamp))&amp; (dataPairs.get(i).getXdateStamp()==null)&amp; (dataPairs.get(i).getYvariable()==null)&amp; (dataPairs.get(i).getTimeStamp()==null)) { dataPairs.get(i).setTimeSta…
score: 0
type: AnsweredQuestion
tagged with: jsf

http://stackoverflow.com/q/25299115
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25299238
accepted answer: http://stackoverflow.com/a/25299238
has title: handling mailchimp's ajax query with js
answer count: 1
downvote count: 0
has body: I didn't use their API, I thought it would just easy with js, but I was wrong. After hours of battle, I found a way to handle the post-submission. below code check whether user submitted their email successfully. function checkSuccess() { if ($('#mce-success-response').is(':visible')) { $('.ok_button').css('display','block'); // window.clearInterval(); } } window.setInterval(checkSuccess, 100); but how to reset back? I wish to hide back the ok button when user focus back on the input bar, I couldn't found a way even I use clearInterval. Help.
favorite count: 0
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39430193
upvote count: 1
has comment: http://stackoverflow.com/comment/39430298

http://stackoverflow.com/a/25252224
has comment: http://stackoverflow.com/comment/39344539
type: Answer
has body: Right now, your block of code is only being checked when the javascript is loaded. At this time, the .uranus element is probably not active, so nothing will happen. First of all, you want to move this block inside of document ready, otherwise your elements such as .uranus might not even exist yet. Your logic is very close, but you need to move the if statement inside of the hover function like this: $('#uranus .infos').hover( function () { if($("a.active").is('.uranus')){ $("#descriptionsp").fadeIn("2000"); } }); This way, every time you hover on #uranus .infos, it will only execute the code if the .uranus is also .active
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25251901
has comment: http://stackoverflow.com/comment/39343430
answers question: http://stackoverflow.com/q/25251901
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/25253391
accepted answer: http://stackoverflow.com/a/25253988
type: Question
has answer: http://stackoverflow.com/a/66410562
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39345966
has answer: http://stackoverflow.com/a/25253988
has body: This is a little hard to explain, So I'll try my best So while a HTML page loads, I'd like there to be a cool loading screen going on. When it finishes loading, I want the loading screen to clear and the HTML document to be shown. Basically, I want This: CSS: /* Absolute Center CSS Spinner */ .loading { position: fixed; z-index: 999; height: 2em; width: 2em; overflow: show; margin: auto; top: 0; left: 0; bottom: 0; right: 0; } /* Transparent Overlay */ .loading:before { content: ''; display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.3); } /* :not(:required) hides these rules from IE9 and below */ .loading:not(:required) { /* hide "loading..." text */ font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; } .loading:not(:required):after { content: ''; display: block; font-size: 10px; width: 1em; height: 1em; margin-top: -0.5em; -webkit-animation: spinner 1500ms infinite linear; -moz-animation: spinner 1500ms infinite linear; -ms-animation: spinner 1500ms infinite linear; -o-animation: spinner 1500ms infinite linear; animation: spinner 1500ms infinite linear; border-radius: 0.5em; -webkit-box-shadow: rgba(0, 0, 0, 0.75) 1.5em 0 0 0, rgba(0, 0, 0, 0.75) 1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) 0 1.5em 0 0, rgba(0, 0, 0, 0.75) -1.1em 1.1em 0 0, rgba(0, 0, 0, 0.5) -1.5em 0 0 0, rgba(0, 0, 0, 0.5) -1.1em -1.1em 0 0, rgba(0, 0, 0, 0.75) 0 -1.5em 0 0, rgba(0, 0, 0, 0.75) 1.1em -1.1em 0 0; box-shadow: rgba(0, 0, 0, 0.75) 1.5em 0 0 0, rgba(0, 0, 0, 0.75) 1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) 0 1.5em 0 0, rgba(0, 0, 0, 0.75) -1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) -1.5em 0 0 0, rgba(0, 0, 0, 0.75) -1.1em -1.1em 0 0, rgba(0, 0, 0, 0.75) 0 -1.5em 0 0, rgba(0, 0, 0, 0.75) 1.1em -1.1em 0 0; } /* Animation */ @-webkit-keyframes spinner { 0% { -webkit-transform: rotate(0deg); -moz-transform: rotate(0deg); -ms-transform: rotate(0deg); -o-transform: rotate(0deg); transform: rotate(0deg); } 100% { …
has answer: http://stackoverflow.com/a/25253637
has answer: http://stackoverflow.com/a/25253456
score: 69
tagged with: http://stackoverflow.com/tag/html
answer count: 7
has answer: http://stackoverflow.com/a/25253600
has answer: http://stackoverflow.com/a/45138730
has title: JavaScript Loading Screen while page loads
has comment: http://stackoverflow.com/comment/39346050
favorite count: 0
possible better answer: http://stackoverflow.com/a/25253456
upvote count: 69
has comment: http://stackoverflow.com/comment/39345780
has answer: http://stackoverflow.com/a/48885272
tagged with: css
has comment: http://stackoverflow.com/comment/39345851
tagged with: loading
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/39558226
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25368726
score: 1
has text: "Ivrgroupzbase_grpzWelcomeNotes1".substr(-1,1)

http://stackoverflow.com/comment/39593729
type: QuestionComment
comment on: http://stackoverflow.com/q/25387405
has text: I noticed that probably you're referring to the element class as id. Name your variables properly to make things easier to understand.
score: 0
type: Comment

http://stackoverflow.com/comment/39311825
type: Comment
score: 2
comment on: http://stackoverflow.com/q/25235442
type: QuestionComment
has text: Can you post some of your code? What have you tried?

http://stackoverflow.com/a/25263275
type: Answer
has body: Separate the invoking of the process from the execution of the process. Basically you would add a table to the database as your "queue", each record of which has the information necessary to perform the process in question. (The data posted from the page, basically, as well as any other meta-data like the user who queued it and the time it was queued, etc.) The code on the page would do nothing more than simply insert a record in that table. Separate from the ASP.NET application you would have a background process (a Windows Service might be best, a scheduled Console Application may work just as well) which periodically checks that table for new records. When it finds records, it executes the process in question on each one successively. This allows the web application to still be multi-threaded (which you definitely want) while processing the records in a single thread.
accepted answer of: http://stackoverflow.com/q/25263153
answers question: http://stackoverflow.com/q/25263153
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/55970422
answers question: http://stackoverflow.com/q/25271366
type: Answer
score: 1
upvote count: 1
downvote count: 0
has body: ES6 provides even shorter possibilities: let el = document.getElementById('id'); el.addEventListener('blur', () =&gt; console.log('blurred')); Or if you need the element: let el = document.getElementById('id'); el.addEventListener('blur', (event) =&gt; console.log(event.target)); Snippet: let el = document.getElementById('id'); el.addEventListener('blur', (event) =&gt; console.log(`${event.target}: ${event.target.value}`)); &lt;input id="id" /&gt;

http://stackoverflow.com/q/25291060
favorite count: 0
has body: $(document).ready(function(){ $('#datepicker').datepicker({ dateFormat: 'mm/dd/yy', onSelect: function() { $("#getDate").click(function () { var start = $("#datepicker").datepicker("getDate"), currentDate = new Date(start), between = []; for(var i=0;i<7;i++) { currentDate.setTime(currentDate.getTime() + 24*60*60*1000); //miliseconds in 1 day between.push(new Date(currentDate)); } for (var i = 0; i < between.length; i++) { var date = $.datepicker.formatDate('mm/dd/yy', new Date(between[i])); between[i] = date; $('#datepicker').datepicker({ beforeShowDay: function(date) { var Highlight = between[i]; if (Highlight) { return [true, "Highlighted", Highlight]; } else { return [true, '', '']; } } }); } $.getJSON('http://localhost:10039/wps/wcm/myconnect/SampleWork/SampleWork_SA/?srv=cmpnt&source=library&cmpntname=CalendarMenu', function (data) { console.log("Length!!!" +data.length); $.each( data, function( key, val ) { console.log("Date!!!!!" +val.Date); if(between[i] = val.Date){ console.log("In If Block"); // console.log("EventName: " +val.EventName); console.log("EventName!!!" +val.EventName); $(".current").append(" " + val.Time +" " + " "+" " + val.EventName +" " + " "+" " + val.EventDescription +" " + ' ' +" "); } }); }); console.log("Date : "+between); //Here I am Getting : Date : 08/05/2014,08/06/2014,08/07/2014,08/08/2014,08/09/2014,08/10/2014,08/11/2014 }) } }); }); css is : .Highlighted a{ background-color : Green !important; background-image :none !important; color: White !important; font-weight:bold !important; font-size: 12pt; }
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39414788
has answer: http://stackoverflow.com/a/25292254
has comment: http://stackoverflow.com/comment/39415489
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39414715
type: Question
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: jquery
has title: How to show selected dates in Highlight using Jquery

http://stackoverflow.com/q/25295541
has comment: http://stackoverflow.com/comment/39423598
has comment: http://stackoverflow.com/comment/39460271
has answer: http://stackoverflow.com/a/25295648
has comment: http://stackoverflow.com/comment/39424429
type: UnansweredQuestion
downvote count: 2
has title: Javascript variables not adding, only concatenating as strings
has answer: http://stackoverflow.com/a/25295632
has body: I have some simple code that should add two numbers and it seems to keep adding them, i.e. if I have a variable that is initialized as 0 , I add 100 once, and then I add 200, it seems to add it as follows 0 + 100 + 100 + 200, returning 400 NOT 300. How can I get this to add correctly? function calcScores(amount) { amount = parseInt(amount,10); for(var key in teamSelection) { if (teamSelection[key]['Selected']) { score = parseInt(teamSelection[key]['Score'],10); var total = +score + +amount; teamSelection[key]['Score'] = total; } } }
tagged with: math
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39423567
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/39423500
tagged with: javascript
tagged with: string
favorite count: 0

http://stackoverflow.com/comment/39377787
comment on: http://stackoverflow.com/q/25270851
has text: Basically, if an object has `length` and `splice` properties, then Chrome will show it as an array in the console, even though it's not an array. If you use `console.dir` instead of `console.log`, then you'll see what it really is.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25280394
has body: Is it possible to have a javascript code in the controller? I'm trying to have an alert if the login failed, here is the condition in my controller: public function login2() { if(!empty($_POST['btn_login'])){ $session_login = $this->inventory_model->select_login($this->input->post()); if($session_login){ $this->session->set_userdata('login_session', array( 'Username' => $session_login->Username, 'Password' => $session_login->Password, 'UserType' => $session_login->UserType ) ); redirect('inventorysys_controller/homepage'); } else{ echo "Invalid Username/Password!"; } } } I'm trying to put the javascript in the else, so is it possible guys? Here is my view in case you need a reference: Username: Password: Sign-In Cancel Your help will be truly appreciated. :)
upvote count: 1
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25280792
score: 1
tagged with: codeigniter
has answer: http://stackoverflow.com/a/25280477
has comment: http://stackoverflow.com/comment/39394735
has comment: http://stackoverflow.com/comment/39395162
accepted answer: http://stackoverflow.com/a/25280792
type: Question
has comment: http://stackoverflow.com/comment/39395055
downvote count: 0
tagged with: javascript
has title: Javascript in Controller Codeigniter
answer count: 3
possible better answer: http://stackoverflow.com/a/25280660
favorite count: 0
has answer: http://stackoverflow.com/a/25280660

http://stackoverflow.com/comment/39558664
type: QuestionComment
comment on: http://stackoverflow.com/q/25368547
has text: No problem at all. I love sharing knowledge.
score: 0
type: Comment

http://stackoverflow.com/comment/39401078
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25283639
type: Comment
has text: @morgi No problem, glad to have helped :)

http://stackoverflow.com/comment/39446628
score: 0
type: Comment
type: QuestionComment
has text: You can't show hyperlinks within an alert box.
comment on: http://stackoverflow.com/q/25308182

http://stackoverflow.com/q/25330775
tagged with: javascript
tagged with: xpages
has comment: http://stackoverflow.com/comment/39490895
upvote count: 3
has comment: http://stackoverflow.com/comment/39489892
answer count: 2
has comment: http://stackoverflow.com/comment/39489298
has comment: http://stackoverflow.com/comment/39493227
has comment: http://stackoverflow.com/comment/39490971
favorite count: 0
type: AnsweredQuestion
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39489692
possible better answer: http://stackoverflow.com/a/25331176
has answer: http://stackoverflow.com/a/25331176
has comment: http://stackoverflow.com/comment/39489418
type: Question
has title: how to update a value in array scoped variable?
has answer: http://stackoverflow.com/a/25339503
has body: I have a scoped variable that stores an archive: viewScope.MY_SCOPE = new Array(); viewScope.MY_SCOPE.push(["id0", 0, true]); viewScope.MY_SCOPE.push(["id1", 1, false]); viewScope.MY_SCOPE.push(["id2", 3, true]); now I want to update one of item. viewScope.MY_SCOPE[1][2] = "true"; and this fails with the error: Error while executing JavaScript action expression put(int index,FBSValue value) not supported in JavaWrapperObject. How do I update a specific item in the array?
accepted answer: http://stackoverflow.com/a/25339503

http://stackoverflow.com/q/25377010
has answer: http://stackoverflow.com/a/25379827
tagged with: javascript
score: 0
answer count: 3
upvote count: 1
downvote count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39574422
favorite count: 0
has comment: http://stackoverflow.com/comment/39574167
has answer: http://stackoverflow.com/a/25377420
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/25377220
has body: I need a script to copy tag when switch button is on and to delete tag when switch button is off. I need a simple way. Here is button for switch: I tried this:
type: AnsweredQuestion
has title: I need a script to copy tag when switch button is on and to delete tag when switch button is off
has comment: http://stackoverflow.com/comment/39574244
has answer: http://stackoverflow.com/a/25377220
type: Question
possible better answer: http://stackoverflow.com/a/25377420

http://stackoverflow.com/comment/39476952
type: Comment
comment on: http://stackoverflow.com/q/25324180
has text: You need to use the [directions API](https://developers.google.com/maps/documentation/directions/)
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39368366
comment on: http://stackoverflow.com/q/25265901
score: 0
type: Comment
type: QuestionComment
has text: @Cameron: I understand. I'm just saying, it's the correct way, nothing you (should) have to explain. (Sadly a lot of people misunderstand `data`...)

http://stackoverflow.com/comment/39547579
comment on: http://stackoverflow.com/a/25361671
score: 0
type: Comment
has text: string.Replace or some regex? When you load the file on the server you can get its contents as a string and manipulate it. In this way you will not need to change your files at all. If you are using them as HTML template you may want to move them to real HTML files, though. If you are open to commercial options, Telerik's editor has built-in templates support - see the Template Manager dialog: http://demos.telerik.com/aspnet-ajax/editor/examples/filemanagers/defaultcs.aspx
type: AnswerComment

http://stackoverflow.com/a/25373174
downvote count: 0
answers question: http://stackoverflow.com/q/25373027
type: Answer
has body: maybe it's not exactly answer to your question but you can add some content to all elements with css :after. .stat-wrap:after { content: "jkfdgdff14"; display: block; } demo: http://jsfiddle.net/t0ro94dz/
score: 1
upvote count: 1

http://stackoverflow.com/comment/39590445
type: AnswerComment
comment on: http://stackoverflow.com/a/25385705
score: 0
type: Comment
has text: I want to reach pure black smoothly, that's why i'm using an alpha value... but it stacks on a "ghost" color

http://stackoverflow.com/comment/39462662
type: QuestionComment
comment on: http://stackoverflow.com/q/25300284
has text: hide the file upload, using opacity and size. then put a label with a _for_ attrib set to the id of the file upload. put a button without any events in the label. you can now click the dummy button and it will open the file dialog.
score: 0
type: Comment

http://stackoverflow.com/q/25297322
has comment: http://stackoverflow.com/comment/39438761
answer count: 3
tagged with: cdn
downvote count: 0
has body: I've been working hard to achieve 100/100 on Google Pagespeed (https://developers.google.com/speed/pagespeed/insights/) but I keep getting hungup when trying to use Javascript to download CDN based files. I get 'CAUTION: Provisional headers are shown.' and I assume it's blocking this kind of call for security reasons but I'm stuck. I can call script files asycn like this, which Google likes: &lt;script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" async&gt;&lt;/script&gt; But what am I to do about the CSS files? If I call it the normal way: &lt;link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"&gt; Google complains and says I have a 'blocking CSS resources'. Here's a copy of the code I've been trying to use so far: var headID = document.getElementsByTagName("head")[0]; var cssNode = document.createElement('link'); cssNode.type = 'text/css'; cssNode.rel = 'stylesheet'; cssNode.href = '//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css'; headID.appendChild(cssNode); Anyone have any suggestions?
tagged with: asynchronous
favorite count: 0
has title: Loading CDN files via Javascript
accepted answer: http://stackoverflow.com/a/25355589
has comment: http://stackoverflow.com/comment/39437664
tagged with: css
has comment: http://stackoverflow.com/comment/39427913
has comment: http://stackoverflow.com/comment/39437087
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25298142
has answer: http://stackoverflow.com/a/25298181
has comment: http://stackoverflow.com/comment/39439149
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/39437869
possible better answer: http://stackoverflow.com/a/25298142
has comment: http://stackoverflow.com/comment/39436951
has answer: http://stackoverflow.com/a/25355589
tagged with: javascript
score: 4

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

http://stackoverflow.com/a/25359140
has body: We have implemented our own Recorder which will be used only for recording in Internet Explorer. It is a javascript file. The concept is to add listeners to each object in the source code of the GUI of web page. Below code helps you to do that. As soon as the page is loaded these listeners will be added. When you perform click action, all its properties will be captured. Here i have given an example of adding listener and getting properties of the object of type "SELECT", you can do the same thing for other types of objects. var added_MClistener = false; var tagn = dObj.tagName; if(tagn == "SELECT") { dObj.attachEvent("onchange",so_showObjInfo); dObj.added_OClistener = true; dObj.so_prevBGColor = alll[i].style.backgroundColor; } if(tagn != "OPTION" &amp;&amp; tagn != "SELECT" ) { dObj.added_MClistener = true; dObj.attachEvent("onclick",so_showObjInfo); dObj.so_prevBGColor = alll[i].style.backgroundColor; } function so_showObjInfo(e) { if(pause)return; if(isActive)return; var preE = e; var e =e? e:window.event; var ele=e.target?e.target:e.srcElement; activeObj = ele; var eltagn= activeObj.tagName; var currentNode=activeObj; var path=[]; while(currentNode){var pe=getNode(currentNode);if(pe){path.push(pe);if(pe.indexOf('@id')!=-1)break;}currentNode=currentNode.parentNode;}var xpath="//"+path.reverse().join('/'); var fff=0; var xpath; while(currentNode){var pe=getNode(currentNode);if(pe){path.push(pe);if(pe.indexOf('@id')!=-1){fff=1; break;}if(pe.indexOf('@name')!=-1){fff=1; break;}}currentNode=currentNode.parentNode;}if(fff==1){xpath="//"+path.reverse().join('/');} var acurrentNode=activeObj; var apath=[]; while(acurrentNode){var ape=agetNode(acurrentNode);if(ape){apath.push(ape);}acurrentNode=acurrentNode.parentNode;} var axpath="//"+apath.reverse().join('/'); var el=activeObj; var cssPath = cssselect(el); if (cssPath!=null) { cssPath="css="+cssPath; } var objval=activeObj.value; var objname=activeObj.name; var objidd=activeObj.id; } In this way we can add listeners t…
downvote count: 0
score: 7
answers question: http://stackoverflow.com/q/25355022
upvote count: 7
type: Answer
has comment: http://stackoverflow.com/comment/78733116

http://stackoverflow.com/comment/39449049
type: Comment
comment on: http://stackoverflow.com/a/25309261
has text: The first one… "only show #intro-page on the specific url … full-sized, after click, fade out…
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39388208
type: Comment
comment on: http://stackoverflow.com/a/25276570
score: 0
type: AnswerComment
has text: Can you post your manifest.json file? It will help to see what you are saying.

http://stackoverflow.com/q/25324128
linked to: http://stackoverflow.com/q/3127429
has title: Javascript object and element object this conflict
has comment: http://stackoverflow.com/comment/39476542
type: UnansweredQuestion
has body: this is my main problem while using javascript objects. if theres another function in method this explains that function or element object. and i want to fire my dinamic object method in that function. How can i do that? Thanks for help. Here's an example code: var myobject = function(param1,param2) { this.parentElement = element.get(param2); /*element is my helper object*/ this.param1 = param1; this.param3 = null; this.isSomething = false; this.init = function(){ if(this.isSomething){ for(var i=0; i&lt;this.param1.length; i++){ this.param3 = element.create("a"); this.param3.setAttribute("href","javascript:;"); this.param3.innerHTML = i; this.param3.onclick = function(){ this.action(i); /*my problem is here*/ } this.parentElement.appendChild(this.param3) } } } this.action = function(i){ console.log(i); } } var useobject = new myobject(["example","data"],".someselector");
linked to: http://stackoverflow.com/q/750486
answer count: 0
score: 0
type: Question
has comment: http://stackoverflow.com/comment/39476373
duplicate of: http://stackoverflow.com/q/750486
tagged with: javascript

http://stackoverflow.com/q/25242657
type: AnsweredQuestion
has body: Utterly stumped as to why the below javascript doesnt assign the variables as expected Maybe I am missing something very simple due to staring at it for hours on end !! Any help appreciated. Cheers var $name; var $district; var $distance; var myArray = []; jQuery('.getrowdata').on('click', function(){ var $row = jQuery(this).closest('tr'); var $columns = $row.find('td'); var value; jQuery.each($columns, function(i, item){ value = item.innerHTML; if(i &lt; 3){ myArray.push(value); // adds first 3 elements to the array } } ); $name = myArray[0]; // trying to set value of these variables to value of array element $district = myArray[1]; $distance = myArray[2]; alert(myArray.join(", ")); // this works - displays data as expected !! }); document.write($name); // these don't work - print out as undefined ? document.write($district); document.write($distance);
has title: javascript variable assignment
downvote count: 1
has answer: http://stackoverflow.com/a/25242688
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25242688
score: -1
has comment: http://stackoverflow.com/comment/39324776
upvote count: 0
answer count: 1
tagged with: variables
favorite count: 0

http://stackoverflow.com/a/25277227
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: The button you have in your screenshot is an extension browserAction which does not yet support contextMenus. App launchers are described here. An apps and extensions are different things and support different Chrome APIs. In an extension you might use the options page to provide logout functionality. In a few months there is a browser_action context coming out for contextMenuse.
answers question: http://stackoverflow.com/q/25276509

http://stackoverflow.com/a/25318221
has comment: http://stackoverflow.com/comment/39466577
type: Answer
has body: You can set the ordered attribute wherever you want in your HTML element, like this: <?php foreach($data as $row) { $orderid =$row['id']; $username = $row['name']; $done = $row['refsDone']; $quantity = $row['quantity']; $running =$row['refsRunning']; $untouched = $quantity - ($done+$running); ?> <tr class='header mySlideToggler' orderedid='<?php echo $orderedid ?>'> <?php echo $username ?> 0 % 22 Aug 2014 <?php echo $done / $quantity ?> <?php echo $running ?> <?php echo $untouched ?> Content of the additional info is here <?php } ?> PHP will render the right id for you like a simple HTML attribute. After it, you can access the attribute of your element using jQuery selector inside your .click() function: $(this).attr('orderedid'); As a good practice, do not "echo" your HTML. Instead of it, enclose plain HTML inside PHP tags. This will make your code more legible.
score: 0
answers question: http://stackoverflow.com/q/25317601

http://stackoverflow.com/a/25346582
has body: var pLocal = new THREE.Vector3( 0, 0, - 10 ); var target = pLocal.applyMatrix4( camera.matrixWorld ); var tweenMove = new TWEEN.Tween( object.position ).to( target, 2000 );
accepted answer of: http://stackoverflow.com/q/25346031
answers question: http://stackoverflow.com/q/25346031
score: 4
type: AcceptedAnswer
type: Answer
upvote count: 4
downvote count: 0

http://stackoverflow.com/q/25285813
has comment: http://stackoverflow.com/comment/39404834
tagged with: php
downvote count: 4
upvote count: 0
has body: I'm looking for a way to 'convert' my Jquery/JS part into PHP. I know you can do it all with AJAX but my only problem is I don't know how to validate it in PHP, because there are HTML parts that are validate.(Sorry if it isn't clear). My JS/Jquery part: function highlight() { var timerId = 0; var $divs = $('.cell').removeClass('redborder'); var random = Math.floor(Math.random() * $divs.length); $divs.eq(random).addClass('redborder'); console.log($divs.eq(random)); $('#submit').show(); } $(document).ready(function () { $('#button').click(function () { $('p').empty(); if ($('#plaatje1').hasClass("redborder") == true) { $(".textarea").append(" Tekst 1 "); } if ($('#plaatje2').hasClass("redborder") == true) { $(".textarea").append(" Tekst 2 "); } if ($('#plaatje3').hasClass("redborder") == true) { $(".textarea").append(" Tekst 3 "); } if ($('#plaatje4').hasClass("redborder") == true) { $(".textarea").append(" Tekst 4 "); } if ($('#plaatje5').hasClass("redborder") == true) { $(".textarea").append(" Tekst 5 "); } if ($('#plaatje6').hasClass("redborder") == true) { $(".textarea").append(" Tekst 6 "); } if ($('#plaatje7').hasClass("redborder") == true) { $(".textarea").append(" Tekst 7 "); } if ($('#plaatje8').hasClass("redborder") == true) { $(".textarea").append(" Tekst 8 "); } if ($('#plaatje9').hasClass("redborder") == true) { $(".textarea").append(" Tekst 9 "); } if ($('#plaatje10').hasClass("redborder") == true) { $(".textarea").append(" Tekst 10 "); } if ($('#plaatje11').hasClass("redborder") == true) { $(".textarea").append(" Tekst 11 "); } if ($('#plaatje12').hasClass("redborder") == true) { $(".textarea").append(" Tekst 12 "); } if ($('#plaatje13').hasClass("redborder") == true) { $(".textarea").append(" Tekst 13 "); } if ($('#plaatje14').hasClass("redborder") == true) { $(".textarea").append(" Tekst 14 "); } if ($('#plaatje15').hasClass("redborder") == true) { $(".textarea").append(" Tekst 15 "); } if ($('#plaatje16').hasClass("redborder") == true) { $(".textarea…
has comment: http://stackoverflow.com/comment/39405574
score: -4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25294332
accepted answer: http://stackoverflow.com/a/25294332
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/39405099
has title: Converting Jquery to PHP
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39404959
has comment: http://stackoverflow.com/comment/39405205
has comment: http://stackoverflow.com/comment/39405273

http://stackoverflow.com/comment/39457795
type: Comment
type: QuestionComment
has text: Use keydown and you should be good. http://plnkr.co/edit/lUTJBL?p=preview
score: 1
comment on: http://stackoverflow.com/q/25313934

http://stackoverflow.com/comment/39443331
has text: Sorry, but there must be something wrong in your code. [See this Plunker](http://plnkr.co/edit/CktkgrbItUSGMsjln6ox?p=preview). It works fine for me with prefetch.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25296699

http://stackoverflow.com/comment/39350578
type: Comment
score: 0
has text: http://www.regular-expressions.info/repeat.html
comment on: http://stackoverflow.com/q/25255902
type: QuestionComment

http://stackoverflow.com/q/25299276
downvote count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39430579
has title: Parsing csv data with jQuery-csv
has comment: http://stackoverflow.com/comment/39430554
type: Question
has comment: http://stackoverflow.com/comment/39430518
tagged with: javascript
has comment: http://stackoverflow.com/comment/39430489
score: 0
has comment: http://stackoverflow.com/comment/39430512
has body: I am parsing through a csv file. My goal is to look for the names that starts with "A", "B" and count the occurrences. The problem with the following code is it never completes the while loop. HTML: &lt;form&gt; &lt;input type="button" id="csv1ButtonRun" value="Run" style="background-color: lightgray"/&gt; &lt;/form&gt; Scripts included: &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="app.js"&gt;&lt;/script&gt; &lt;script src="jquery.csv-0.71.js"&gt;&lt;/script&gt; JavaScript: var babyCsv = " Jacob, 1, boy, 2010, Isabella, 1, girl, 2010, Ethan, 2, boy, 2010, Sophia, 2, girl, 2010, Michael, 3, boy, 2010, Emma, 3, girl, 2010, Jayden, 4, boy, 2010, Olivia, 4, girl, 2010, William, 5, boy, 2010, Ava, 5, girl, 2010, Alexander, 6, boy, 2010, Emily, 6, girl, 2010, Noah, 7, boy, 2010, Abigail, 7, girl, 2010, Daniel, 8, boy, 2010, Madison, 8, girl, 2010, Aiden, 9, boy, 2010, Chloe, 9, girl, 2010, Anthony, 10, boy, 2010, Mia, 10, girl, 2010, Joshua, 11, boy, 2010, Addison, 11, girl, 2010, Mason, 12, boy, 2010, Elizabeth, 12, girl, 2010, Christopher, 13, boy, 2010, Ella, 13, girl, 2010, Andrew, 14, boy, 2010, Natalie, 14, girl, 2010, David, 15, boy, 2010, Samantha, 15, girl, 2010, Matthew, 16, boy, 2010"; var data = $.csv.toArray(babyCsv); $("#csv1ButtonRun").click(function() { var arrayLength = data.length / 4; var count1 = 0; var count2 = 0; var i = 0; while (i &lt;= arrayLength) { var name = data[i * 4]; if (name.substring(0, 2) == " A") { count1 = count1 + 1; } else if (name.substring(0, 2) == " B") { count2 = count2 + 1; }; i++; }; document.write(count1 + count2); });
has answer: http://stackoverflow.com/a/25299568
accepted answer: http://stackoverflow.com/a/25299568
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39430598
has comment: http://stackoverflow.com/comment/39430621
favorite count: 0
tagged with: jquery-csv
has comment: http://stackoverflow.com/comment/39430499
tagged with: http://stackoverflow.com/tag/csv
upvote count: 4

http://stackoverflow.com/comment/39444253
has text: can you provide a fiddle please, so that we can help you easier finding the problem
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25306090

http://stackoverflow.com/comment/39315717
type: Comment
has text: Wow! That was fast! This worked. You're a true jquery master. :D
comment on: http://stackoverflow.com/a/25237538
score: 0
type: AnswerComment

http://stackoverflow.com/comment/75401769
comment on: http://stackoverflow.com/a/25265878
has text: real hero is here !
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39388027
type: Comment
has text: I did; the last link in the "CSS" tab and the last link in the "JS" tab are the two files for the TableTools plugin. I included these as my `style2.css` and `script3.js`.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25276505

http://stackoverflow.com/q/25271283
has title: How to trim all spaces except those within quotes for large JSON file
has body: I am currently working on a large JSON file, and wish to shorten it by deleting all extra spaces, tabs, returns, etc. that are not within quotes. The file is some 100,000 lines of code and hard for my other scripts to use it quickly. The file originally looks like: { "path": "/math/", "id": "math", "title": "Math Title", "icon_url": "/images/power-mode/badges/circles-40x40.png", "contains": [ "Topic", "Video", "Exercise" ], "children": [], "parent_id": "root", "ancestor_ids": [ "root" ], "description": "null", "kind": "Topic", "h_position": -10, "v_position": 6, "slug": "math" } and I wish for it to look like this after deleting unnecessary spaces, tabs,returns, etc: {"path":"/math/","id":"math","title":"Math Title","icon_url":"/images/power-mode/badges/circles-40x40.png", "contains":["Topic","Video","Exercise"],"children":[],"parent_id":"root","ancestor_ids":["root"], "description": "null","kind":"Topic","h_position":-10,"v_position":6,"slug":"math"} Basically every space should be deleted except for those within quotes.
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/32279565
has answer: http://stackoverflow.com/a/25273498
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/5499798
type: Question
score: 5
upvote count: 5
has answer: http://stackoverflow.com/a/39634795
tagged with: javascript
accepted answer: http://stackoverflow.com/a/32279565
possible better answer: http://stackoverflow.com/a/39634795
downvote count: 0
tagged with: space
favorite count: 0
has answer: http://stackoverflow.com/a/25271390
tagged with: linux

http://stackoverflow.com/comment/39402345
type: AnswerComment
type: Comment
has text: Hi, the json output is valid but after posting in server it is showing this error: {"readyState":4,"responseText":"","status":400,"statusText":"Bad Request"}
comment on: http://stackoverflow.com/a/25280601
score: 0

http://stackoverflow.com/q/25273470
tagged with: regex
type: AnsweredQuestion
has title: JavaScript regular expression to get valid date format "MM/dd/yyyy"
has answer: http://stackoverflow.com/a/25273483
accepted answer: http://stackoverflow.com/a/25273483
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39382721
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25273514
has body: I am learning JavaScript Regular Expression. I am writing a function to check valid date format, 'MM/dd/yyyy'. function isValidDate(dateStr) { var result = dateStr.match(/^(0?[1-9]|1[012])\/(0?[1-9]|[12][0-9]|3[01])\/(199\d)|([2][0]\d{2})$/); if(result) return true; return false; } It works fine, but I got some issues. 01/01/2014 // return true 01/1/2014 // return true (it should return false) 1/01/2014 // return true (it should return false) I don't want the function to return true when the month.length is 1. I want to make sure that the month.length == 2 &amp;&amp; the date.length == 2. How can I modify my regular expression? EDIT 01/01/20 // return true (it should return false) How can I make sure that the year.length == 4?
has comment: http://stackoverflow.com/comment/39382550
has answer: http://stackoverflow.com/a/25273720
possible better answer: http://stackoverflow.com/a/25273514
has comment: http://stackoverflow.com/comment/39383114

http://stackoverflow.com/comment/39338377
type: Comment
has text: Thank you.but when I use `String` or `toString` the code didn't work and cause error.I'm using node.js express framework.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25249406

http://stackoverflow.com/comment/39467112
type: Comment
score: 1
has text: @user3558931: Yes they would, I added a note of this to the answer.
type: AnswerComment
comment on: http://stackoverflow.com/a/25319021

http://stackoverflow.com/q/25356617
score: 0
answer count: 1
has body: I am developing a web application which deals with interactive grids. I am using Kendo UI for displaying grids and doing CRUD operations. I am new to Kendo UI. We are performing database calls using jquery, Ajax only. I was able to make it read the data from the database and display it. But I am stuck at CRUD operations. How to get the event that a specific row or a specific single data is changed and perform the update. Please help me to understand how to do the crud operations. I couldn't find it in detail anywhere. There are 8 parameters which are in the first column. The user should be able to change the rest of the data except the parameters. following is the code for Grid. CreateWBDGridData triggers the database service call and creates the table. gridSource is JSON data getting from the database after converting through Json convert function. $(document).ready(function() { var param ="HOLE_DIAMETER|4.875_CASING_ID|5.5_GRAVEL_PACK|NET_PERF_THICKNESS|PERF_DIAMETER|PERF_GRAVEL_PERM_@19k|GRAVEL_BETA_FACTOR_@19K|SHOT_DENSITY"; $.when(GetWBDGridDataByWell(param)).then(function (data) { }); }); function CreateWBDGridData(gridSource) { if (gridSource == undefined) return; console.log(gridSource); $("#grid").kendoGrid({ dataSource: { data: gridSource, schema: { model: { fields: { ParameterName: { type: "string" }, Zone_1: { type: "number" }, Zone_2: { type: "number" }, Zone_3: { type: "number" }, } } }, // pageSize: 20 }, //height: 550, //scrollable: true, //sortable: true, //filterable: true, //reorderable: true, resizable:true, //pageable: { // input: true, //numeric: false //}, columns: [ { field: "ParameterName", title: "Lucius 01", width: 300 }, { field: "Zone_1", title: "Zone 1", width: 100 }, { field: "Zone_2", title: "Zone 2", width: 100 }, { field: "Zone_3", title: "Zone 3", width: 100 }, ] }); } Controller var dspstore = "System.Sources.Db.MsSql.DSPStore"; function GetWBDGridData(queryName, param) { var varData = CreateParamQuery(dspstore, queryName, param);…
type: AnsweredQuestion
has title: kendo ui crud operations using only jquery and Ajax
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: kendo-grid
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25375766
accepted answer: http://stackoverflow.com/a/25375766
tagged with: kendo-ui

http://stackoverflow.com/comment/39387756
has text: What about the `buffer` listener option?
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25276203

http://stackoverflow.com/comment/39388649
has text: I can see it works in the fiddle but not in my code! I need to pull it apart and see where the conflicts are.
comment on: http://stackoverflow.com/a/25276770
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25357122
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25357312
accepted answer: http://stackoverflow.com/a/25357312
tagged with: http://stackoverflow.com/tag/html
has title: The element is clicked, but Page is not reloaded accordingly
has body: Using phantom JS, I am trying to click a &lt;li&gt; element(target_element) and render the page which loads after it. The element is clicked successfully. But, on rendering, the refreshed page is not seen in the output. I have given enough wait item. The code is: page.open(address, function (status) { if (status !== 'success') { console.log('Unable to load the address!'); phantom.exit(); } else { window.setTimeout(function () { page.evaluate(function() { document.getElementById('custom_filters').style.visibility = "hidden"; var a = document.getElementById('target_element'); var e = document.createEvent('MouseEvents'); e.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); console.log(a.dispatchEvent(e)); waitforload = true; }); page.render(output); phantom.exit(); }, waitTime); } }); Does this mean The event has not triggered the JS function or am I doing anything wrong here?
tagged with: phantomjs
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/25239849
answers question: http://stackoverflow.com/q/25239771
score: 0
has body: First, use the JS Date object to get the day of the week var DayOfTheWeek = new Date().getDay(); //0=Sun, 1=Mon, ..., 6=Sat then, based on the day, show the element if(DayOfTheWeek == 6 || DayOfTheWeek == 0){ $('#div1').hide(); } else { $('#div1').show(); }
type: Answer

http://stackoverflow.com/a/25241723
downvote count: 1
answers question: http://stackoverflow.com/q/25241459
score: -1
upvote count: 0
has body: i have updated your code.. code:- jQuery(document).ready(function(){ // This button will increment the value $('.qtyplus').click(function(e){ // Stop acting like a button e.preventDefault(); //the field name fieldName = $(this).attr('field'); // Get its current value var txt=$($(this).prev("input[type=text]")); var currentVal = parseInt(txt.val()); // If is not undefined if (!isNaN(currentVal)) { // Increment txt.val(currentVal + 1); } else { // Otherwise put a 0 there txt.val(0); } }); // This button will decrement the value till 0 $(".qtyminus").click(function(e) { // Stop acting like a button e.preventDefault(); // Get the field name fieldName = $(this).attr('field'); var txt=$($(this).next("input[type=text]")); // Get its current value var currentVal = parseInt(txt.val()); // If it isn't undefined or its greater than 0 if (!isNaN(currentVal) &amp;&amp; currentVal &gt; 0) { // Decrement one txt.val(currentVal - 1); } else { // Otherwise put a 0 there txt.val(0); } }); }); working example:-http://jsfiddle.net/puJ6G/1011/ thanks
type: Answer

http://stackoverflow.com/q/25361989
has comment: http://stackoverflow.com/comment/39546014
has comment: http://stackoverflow.com/comment/39545909
type: UnansweredQuestion
has title: Get value of a jquery element?
has comment: http://stackoverflow.com/comment/39545876
type: Question
has comment: http://stackoverflow.com/comment/39546599
has comment: http://stackoverflow.com/comment/39544965
has comment: http://stackoverflow.com/comment/39545557
has comment: http://stackoverflow.com/comment/39546457
answer count: 1
has comment: http://stackoverflow.com/comment/39545328
tagged with: javascript
tagged with: jquery
has body: var $x = $("input[name='" + linkedmodule + "']"); //var x=document.getElementsByName(linkedmodule); console.log($x); if ($x !== "" || $x !== "undefined" || $x !== null) { linkedid = $x.val(); linked_module = $x.attr("relatedModule"); console.log(linkedid); } else { } I am getting an undefined in the linkedid Please could someone help me
score: 0
has answer: http://stackoverflow.com/a/25362615

http://stackoverflow.com/q/25236615
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/25237339
has comment: http://stackoverflow.com/comment/39314349
has comment: http://stackoverflow.com/comment/39314106
has comment: http://stackoverflow.com/comment/39313942
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25237339
has body: I have a fine working jquery multicolumn autocomplete. Now i have to add a column which should be hidden. Basically its a ID of the values. So when the user selects the value i could able to get the ID of the selected row. //Code: Working Fiddle here
has comment: http://stackoverflow.com/comment/39313914
type: Question
has comment: http://stackoverflow.com/comment/39314227
has comment: http://stackoverflow.com/comment/39314404
has comment: http://stackoverflow.com/comment/39314079
tagged with: autocomplete
has comment: http://stackoverflow.com/comment/39314061
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39313872
tagged with: jquery
has title: Hide column in jQuery MultiColumn Autocomplete
tagged with: multiple-columns

http://stackoverflow.com/q/25299503
has comment: http://stackoverflow.com/comment/39431068
answer count: 1
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/39430965
has comment: http://stackoverflow.com/comment/39430929
favorite count: 0
has comment: http://stackoverflow.com/comment/39430894
has answer: http://stackoverflow.com/a/25299524
type: AnsweredQuestion
score: 1
has body: I've been working with jQuery UI Autocomplete to make an suggestion from database and autocomplete the rest of field. the javascript working just fine, but it made output like this: But if i press down button and enter it, the field will completed with value from database. this is my javascript : $(function() { //clear values on refresh $('#nmbr').val(""); $(".kdbr").autocomplete({ source: function (request, response) { $.ajax({ url: "<?php echo base_url();?>js/coba3.php", dataType: "json", data: { term: request.term }, success: function (data) { // var data = $.parseJSON(response); response($.map(data, function (el) { return { kdbr: el.kdbr, nmbr: el.nmbr }; })); } }); }, select: function (event, ui) { // Prevent value from being put in the input: event.preventDefault(); this.value = ui.item.kdbr; // Set the next input's value to the "value" of the item. $('#nmbr').val(ui.item.nmbr); } }); }); and this is my html code : KDBR NMBR and this is the javascript version that i used i have to write it to, because when i used version 1.8.1 the list show word undefined
upvote count: 1
accepted answer: http://stackoverflow.com/a/25299524
type: Question
tagged with: jquery-ui
tagged with: autocomplete
has title: Autocomplete JQuery-UI Undefined List
tagged with: javascript

http://stackoverflow.com/comment/39382244
type: AnswerComment
has text: Thank you for your help. About your first suggestion: see my response to Jain above, I was not clear enough in my original question about what the issue was. About using ::selection : I did take a look at this before but I would like to avoid using it as it is only experimental with no plans for inclusion within CSS (see the warning at the top of https://developer.mozilla.org/en-US/docs/Web/CSS/::selection). It's a good suggestion though, if I have nothing else I may resort to that.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25273230

http://stackoverflow.com/q/25233410
downvote count: 0
has comment: http://stackoverflow.com/comment/39307766
type: Question
upvote count: 2
tagged with: magento
has comment: http://stackoverflow.com/comment/39322406
tagged with: javascript
tagged with: jquery
has body: My task is to make a box on magento product page with total price for quantity selected. In other words qty * price. So I did this: $j = jQuery.noConflict(); function get_total_qty() { var qt_Price = parseInt(0); $j('.price').each(function() { if (this.offsetParent.className != 'dropdown-cart no_quickshop') { qt_Price = parseFloat(this.textContent); } }); /* * AJAX call */ var quantity = $j('#qty').val(); // get final quantity var price = qt_Price; // get price $j.post("http://example.com/myscripts/ajaxPriceCal.php", { qty: quantity, pr: price }, function(data) { var qt_total_price = data; $j('#totpr').html(qt_total_price); }); } $j(document).ready(function() { get_total_qty(); }); And I call get_total_qty() function every time button to increase or decrease qty is pressed. Now I tried the same with drop-down lists of product options but it didn't work as I expected. It calls the function before reloading product price which I use for calculation. E.g. product is $10, qty is 2, total $20 if option selected (+$5) then what I get displayed is price $15, qty 2, total $20. Because function was called before updating .price class element. If I change qty it displays correct total again. Perhaps my way of doing these calculations is silly. I'm open to suggestions on how to do it right way. Yet my pressing issue is calling the function on right time. What files should I edit and where should I place the call? Sorry if my question appears silly i'm new in JS or jquery... EDIT -> /app/design/frontend/base/default/template/catalog/product/view/type/options/configurable.phtml file generates options selection drop-downs here is the code: <?php $_product = $this->getProduct(); $_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes()); ?> <?php if ($_product->isSaleable() && count($_attributes)):?> <?php foreach($_attributes as $_attribute): ?> *<?php echo $_attribute->getLabel() ?> <dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>> <select…
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39308229
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25275215
has title: Call javascript/jQuery function onchange product option on Magento product page
score: 2

http://stackoverflow.com/comment/39376070
has text: Converting to string is the real solution, just be careful with the regex, for it may accidentally match something else (such as number after colon, that's in a string).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25269406
score: 0

http://stackoverflow.com/comment/39539483
type: AnswerComment
type: Comment
has text: So I can find "files" where sessions are stored ?
comment on: http://stackoverflow.com/a/25358865
score: 1

http://stackoverflow.com/q/25301831
has comment: http://stackoverflow.com/comment/39435070
has comment: http://stackoverflow.com/comment/39435205
linked to: http://stackoverflow.com/q/25285154
score: 0
has comment: http://stackoverflow.com/comment/39435292
has comment: http://stackoverflow.com/comment/39435230
has comment: http://stackoverflow.com/comment/39438624
has body: Already posted a question Previous Asked Question The replies from the above question works fine, but am having a concern regarding my array. Previous Question array and this array has some difference. Example Array: var newArray = ['$100-$129','Abcd is abcd','$20','$30.0987'] I need to just avoid alphabets and $ symbol only. Hyphen should remain same. From the new array I need to take the max value and min value. Can anyone please help me out how to achieve this on new array.
type: UnansweredQuestion
answer count: 0
type: Question
tagged with: data-conversion
tagged with: arrays
has title: How to avoid Text and hyphen when converting currency-strings-from-array
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25274449
has title: AngularJS $promise then() data undefined
type: Question
has answer: http://stackoverflow.com/a/58809919
score: 7
favorite count: 0
tagged with: angularjs
tagged with: angular-promise
tagged with: angular-resource
upvote count: 7
has answer: http://stackoverflow.com/a/38327286
has answer: http://stackoverflow.com/a/25274536
has answer: http://stackoverflow.com/a/25274516
has body: I am trying to get data assigned to a $scope variable. Inside my $promise.then() function it is displaying correctly but outside the function it shows as undefined. The following is my controller code: angular.module('testSiteApp').controller('TestController', function ($scope, Tests) { $scope.test = Tests.get({id: 1}); $scope.test.$promise.then(function(data) { $scope.tasks = data.tasks; console.log($scope.tasks); }); console.log($scope.tasks); }); The results inside the then() function: [Object, Object, Object, Object] The results outside the then() function: undefined The 'Tests' service factory I am using is the following: angular.module('testSiteApp').factory('Tests', function($resource) { return $resource('/api/test/:id', {id: '@id'}, { 'update': { method: 'PUT' } } ); }); Even when I use the query method instead of the get for my resource and set isArray to true I still end up with the same issue. For some reason the data is not binding to my scope inside the then function. I am sorry if this is a repeat question but i looked everywhere and only found undefined issue relating to the $promise function which is no the issue in this case. Thanks in advance for the support.
tagged with: angularjs-scope
answer count: 4
downvote count: 0
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/39560879
type: Comment
comment on: http://stackoverflow.com/a/25369318
score: 1
type: AnswerComment
has text: @Lori: `td` represents the column in the row. `tr` is whole row and all of it's columns. Based on your HTML sample, `tr` should be the correct option. I have updated my answer with a link to a working example based on your code.

http://stackoverflow.com/comment/39542732
type: QuestionComment
comment on: http://stackoverflow.com/q/25360030
has text: If the file is not included, 404 is raised behind the scenes - is that a good behaviour?
score: 0
type: Comment

http://stackoverflow.com/q/25342275
duplicate of: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/39510373
has comment: http://stackoverflow.com/comment/39511888
has answer: http://stackoverflow.com/a/25342308
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25342308
score: 0
possible better answer: http://stackoverflow.com/a/25342330
has title: Javascript: Accessing external variable within anonymous function
has answer: http://stackoverflow.com/a/25342330
has body: See the following JavaScript: (function() { var allMatches = []; $.getJSON("myURL", function(data) { $.grep(data.feed.entry, function(element, index) { var match = { day: element.gsx$day.$t, winner: element.gsx$winner.$t, field: element.gsx$field.$t, time: element.gsx$time.$t, grade: element.gsx$grade.$t, round: element.gsx$round.$t, teamOne: element.gsx$team1.$t, teamOneGoals: element.gsx$goals.$t, teamOnePoints: element.gsx$points.$t, teamOneTotal: element.gsx$totalscore.$t, teamTwo: element.gsx$team2.$t, teamTwoGoals: element.gsx$goals_2.$t, teamTwoPoints: element.gsx$points_2.$t, teamTwoTotal: element.gsx$total.$t } allMatches[index] = match; }); }); var fridayMatches = SQLike.q( { Select: ['*'], From: allMatches, Where: function(){return this.day === "Friday"}, OrderBy: ['field','|asc|'] } ); console.log(fridayMatches); })(); If I put a breakpoint at allMatches[index] = match; I can clearly see this array being populated fully However, if I put a breakpoint further down at the start of my SQLike code allMatches is completely empty. Why is this, and what is the solution?
linked to: http://stackoverflow.com/q/14220321

http://stackoverflow.com/comment/39523755
type: AnswerComment
score: 0
type: Comment
has text: If it's an Object I can only make 'lasting' changes if I use something like `target.prop1 = ...` to change the Object's properties -- I could never _replace_ the whole object with `target = ...`, as far as I understand. Thanks for your answer!
comment on: http://stackoverflow.com/a/25349739

http://stackoverflow.com/a/25303503
has comment: http://stackoverflow.com/comment/39438557
has body: to combine the animation change class="pageItem finger_1" to class="pageItem finger finger_1" AND $('.finger_1') to $('.finger') For fadein effect you can try, $('.finger').fadeOut(); $('.finger').waypoint(function() { $('.finger').fadeIn(); setInterval(function(){ $('.finger').animate({ top: '-=12px' }, 500); $('.finger').animate({ top: '+=12px' }, 500); }, 1300); }, {offset: '70%', triggerOnce: true }); Update $(window).load(function(){ $('.finger').each(function(){ $(this).waypoint(function() { $(this).fadeIn(); setInterval(function(elem){ elem.animate({ top: '-=12px' }, 500); elem.animate({ top: '+=12px' }, 500); }, 1300,$(this)); }, {offset: "70%", triggerOnce: true }).fadeOut(); }); });
has comment: http://stackoverflow.com/comment/39438636
answers question: http://stackoverflow.com/q/25303188
score: 1
has comment: http://stackoverflow.com/comment/39438944
has comment: http://stackoverflow.com/comment/39443290
downvote count: 0
has comment: http://stackoverflow.com/comment/39438496
upvote count: 1
type: Answer

http://stackoverflow.com/comment/39534645
comment on: http://stackoverflow.com/q/25356214
has text: @Zip It will be string manually entered and onchange it will check whether in correct format or not
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39395991
comment on: http://stackoverflow.com/q/25281095
has text: Just a little workaround: Why not always listening to the scroll and eventually act if the button is displayed?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25335381
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25335167
answers question: http://stackoverflow.com/q/25335167
has body: You can do something like this using the attribute starts-with selector // get all elements with id's that start with btn_step $("[id^='btn_step']").on("click", function( event ){ activeDiv.hide(); activeDiv.next().show(); activeDiv = $("#mod_formSteps-" + (+this.id.replace('btn_step','') + 1)); body.animate({scrollTop:0}, '500', 'swing'); }); or give them a similar class $(".theClass").on("click", function( event ){ activeDiv.hide(); activeDiv.next().show(); activeDiv = $("#mod_formSteps-" + (+this.id.replace('btn_step','') + 1)); body.animate({scrollTop:0}, '500', 'swing'); }); Looking at the code more you can actually just do this $(".theClass").on("click", function( event ){ activeDiv = activeDiv.hide().next().show(); body.animate({scrollTop:0}, '500', 'swing'); });

http://stackoverflow.com/comment/45036241
score: 0
type: Comment
has text: To this, I've provided a solution below. [click here](http://stackoverflow.com/a/28346042/2642351)
type: AnswerComment
comment on: http://stackoverflow.com/a/25282812

http://stackoverflow.com/comment/39455526
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25312842
has text: if you are not using strict mode, you wouldn't need to add a semicolon there
type: AnswerComment

http://stackoverflow.com/q/25361272
has title: Onclick list-item, display new data
has comment: http://stackoverflow.com/comment/39552320
upvote count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39555179
answer count: 0
score: 1
has body: I am making a script that wil look like this: This is the demo: DEMO The list in the first page is generated with javascript and it only displays certain list-items. This works fine and it only displays list-items where the category == category. $( document ).ready(function() { var data = [{ "name": "Lichtbediening", "category": "category", "info": "Klik voor lichtbediening", "img": "lichtbediening" }, { "name": "Stopcontact", "category": "category", "info": "Klik voor stopcontacten", "img": "stopcontacten" }, { "category": "Lichtbediening", "name": "Enkele schakelaar", "info": "Een knop, een lamp", "img": "rolluikbediening" }, { "category": "Stopcontact", "name": "Enkel stopcontact", "info": "Twee knoppen, twee lampen", "img": "multimedia" }]; var output = ''; $.each(data, function (index, value) { if(value.category != 'category') { return; } else { output += '&lt;li&gt;&lt;a href="#"&gt;' output += '&lt;img src="img/' + value.img + '.jpg"&gt;' output += '&lt;h2&gt;' + value.name +'&lt;/h2&gt;' output += '&lt;p&gt;' + value.info + '&lt;/p&gt;' output += '&lt;/a&gt;&lt;/li&gt;'; } }); $('#list_zoek_category').html(output).listview("refresh"); }); Now I want to display a new list when one list-item is clicked. First I want to generate a new list wich displays only the list-items where the category is the same as the name of the item clicked. Example: When I click on the list-item with the name: lichtbediening" in the first list, the new list displays only list-items with the category: "lichtbediening". What is the best way to do this? Is it better to re-generate the current list, or to go to a new page? But to keep in mind, when i click on an item in the second list, i want to go to a detail page. Also i want to create a backbutton to display the previous view. Can anyone give me some advise, and maybe some help to start that direction?
type: Question
downvote count: 0
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39462013
type: Comment
has text: Thx for answering... I moved the Body tag before the header (added in post above) but it is still not working :/
score: 0
comment on: http://stackoverflow.com/a/25316312
type: AnswerComment

http://stackoverflow.com/q/25251070
tagged with: javascript
tagged with: visual-studio-2012
downvote count: 0
favorite count: 0
has body: I'm not sure how I achieved it, but using Visual Studio 2012 I was able to place breakpoints in JavaScript files which are then hit when the statement is reached (project is asp.net web forms application). This was really useful and allows me to use Visual Studio's debugger to inspect object properties and so on. Unfortunately, something has changed - possibly to do with merging branches in TFS (or maybe it was an IE update or something?) and suddenly it no longer works. I know get the 'No symbols have been loaded...' message by the breakpoint. I know someone is going to suggest using IE dev tools, switching to Chrome or using the debugger; JS statement and they are all good ideas. However, the workflow I've been using was working great for me and I'd really like to continue that way. Also, knowing it is possible makes me determined to actually get it working! I know there are several similar posts on SO already, but nothing that seems directly relevant. i.e. I'm not trying to run in page inspector, and I'm using IE10 not IE9. Another thing is this worked without having to clear the 'disable debugging...' checkboxes in IE so other websites didn't keep presenting the debug popup for every odd JavaScript fault out there. Does anyone have a list of settings / steps required to definitely get this working in a VS2012 / IE 10 environment (on Windows 7). Thanks in advance!
answer count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39341377
has title: Breakpoints not hit in Visual Studio 2012 JavaScript files
upvote count: 1
linked to: http://stackoverflow.com/q/12747525
has answer: http://stackoverflow.com/a/25251490
type: Question
has answer: http://stackoverflow.com/a/25251271
has comment: http://stackoverflow.com/comment/39341183
tagged with: debugging
has answer: http://stackoverflow.com/a/48682602
score: 1

http://stackoverflow.com/comment/39541582
has text: Yes.. i want the website to be intact, to have the exact same behavior as before injecting this js code.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25309313

http://stackoverflow.com/comment/39491605
comment on: http://stackoverflow.com/q/25331912
type: Comment
score: 0
has text: What your saying is that the HTML table is auto-resizing when you empty it of all content, right?
type: QuestionComment

http://stackoverflow.com/q/25336970
has answer: http://stackoverflow.com/a/27712962
linked to: http://stackoverflow.com/q/23398485
tagged with: angularjs
score: 0
accepted answer: http://stackoverflow.com/a/25367013
has comment: http://stackoverflow.com/comment/39504869
has comment: http://stackoverflow.com/comment/39509126
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25349740
possible better answer: http://stackoverflow.com/a/25349740
type: Question
has comment: http://stackoverflow.com/comment/39567037
tagged with: mean-stack
tagged with: javascript
has answer: http://stackoverflow.com/a/25367013
has title: MeanJS - integrate Angular in index.html file
has body: I'm coming from a LAMP background, and as a learning project I downloaded MEAN.JS so I can dive into the MEAN stack. I got the whole thing running, but I feel like I'm missing something... I followed all of the steps at http://meanjs.org/generator.html, got Mongo running, got my server running, etc. My index.html file loads on localhost:3000 and life is good. So in my mind, I'm going down the checklist... MongoDB - Check (running after executing mongod.exe). Node - Check (server is running after executing grunt). Express - Check (tied to Node as server). Angular - ....?? I see that installing MEAN.JS installed several folders for Angular, but I don't think my index.html file is magically "working" for Angular. In fact, to get Angular working, I had to do it the good old fashioned way in my head element: &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"&gt;&lt;/script&gt; So what did MEAN.JS actually do here? And how should I be integrating Angular if not this way? I'd appreciate any help here on this. Thanks!
answer count: 3
has comment: http://stackoverflow.com/comment/39524361
tagged with: meanjs

http://stackoverflow.com/comment/39544496
comment on: http://stackoverflow.com/q/25361724
has text: You can't put a `div` element inside an `h3` anyway as it is invalid HTML.
type: Comment
type: QuestionComment
score: 3

http://stackoverflow.com/q/25253664
type: Question
upvote count: 2
tagged with: cheerio
has answer: http://stackoverflow.com/a/25253880
tagged with: javascript
has body: I'm giving web page scraping a go, as I can see a lot of potential to do interesting stuff with it. I've spent a few hours researching what I need and I've decided to use node.js with the 'request' and 'cheerio' modules to perform the scrape. So for a first project I thought I'd try and get a random sentence from this random sentence generator site: http://watchout4snakes.com/wo4snakes/Random/RandomSentence The markup looks relatively simple, here's the bit I'm interested in: An amateur regret slights the lust outside his contentious century. So the bit I want is in the span (obviously it'll be different on inspection of the actual page), I wrote the following Javascript file and ran it in node: var request = require("./node_modules/request/"); cheerio = require('./node_modules/cheerio/'); request('http://watchout4snakes.com/wo4snakes/Random/RandomSentence', function(err, resp, body){ if(!err && resp.statusCode == 200){ console.log("connected...\n"); var $ = cheerio.load(body); console.log($('#result').html()); } else console.log("Failed To Connect..."); }); I get the notification so I do some checks and determine that I've correctly scraped the page's data. So now all I want to do is select the text in the #result ID field. However I'm just given a blank space, in fact if I get the cheerio module to print the actual markup of that region I'm given a with no random sentence inside. My initial guess is that node is scraping the markup before the random sentence script has finished running. But I don't know a way of diagnosing what's happening, so does anyone have an idea?
accepted answer: http://stackoverflow.com/a/25253841
has answer: http://stackoverflow.com/a/25272082
favorite count: 0
possible better answer: http://stackoverflow.com/a/25253853
tagged with: web-scraping
tagged with: xmlhttprequest
has answer: http://stackoverflow.com/a/25253841
answer count: 4
tagged with: node.js
score: 2
type: AnsweredQuestion
downvote count: 0
has title: Web Scraping Basics
has answer: http://stackoverflow.com/a/25253853

http://stackoverflow.com/comment/39558603
type: QuestionComment
has text: @all I've modified the function call to $("#Button" + count.toString()).onClick(delete_image_custom); but nothing
comment on: http://stackoverflow.com/q/25368693
score: 0
type: Comment

http://stackoverflow.com/q/25319376
score: 1
has comment: http://stackoverflow.com/comment/39467602
has comment: http://stackoverflow.com/comment/39468072
has comment: http://stackoverflow.com/comment/39468225
has comment: http://stackoverflow.com/comment/39468144
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: Javascript script for form submit doesn't execute
downvote count: 2
tagged with: php
type: AnsweredQuestion
upvote count: 3
has answer: http://stackoverflow.com/a/25319432
type: Question
has body: I tried to intercept a submit form by javascript script but it doesn't work . this is my html code : Sign up Script: $("#myForm").submit(function(event) { /* stop form from submitting normally */ event.preventDefault(); alert('success'); }); });
accepted answer: http://stackoverflow.com/a/25319432
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/39513265
comment on: http://stackoverflow.com/a/25343817
type: Comment
has text: Thanks @Viktor Chynarov, I edited your code, it seems to work, but there's something I didn't think about.. How to make reappear the .button-2 by clicking once again on the .button-1 ?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39493907
comment on: http://stackoverflow.com/q/25333050
type: Comment
type: QuestionComment
score: 2
has text: Asynchronous programming is not just relevant for I/O. It is common in other places as well.

http://stackoverflow.com/q/25348688
has title: Jquery Mask Strange Behavior In Android Browser
type: UnansweredQuestion
tagged with: android-browser
has body: i have an input with type text in my html file and want to mask it with 00/00 pattern . but when i want to type it sample input 12/10 it converts to 12/01. if i explicitly type / character everything works fine. i test my html code in all desktop browsers and everything works. html Card Exp Date js $(document).ready(function () { var expData = $('#expData'); expData.mask("00/00", {placeholder: "__/__"}); }); here is jsfiddle Link
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: jquery-mask
score: 2
answer count: 0
upvote count: 2

http://stackoverflow.com/q/25366916
tagged with: internet-explorer-9
has answer: http://stackoverflow.com/a/25378951
type: Question
tagged with: javascript
tagged with: jquery
answer count: 2
has title: handlebars.js is not rendering template in IE9
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25366981
linked to: http://stackoverflow.com/q/11338114
has body: I'm working on a simple site using handlebars.js. It works just well in FF, Chrome, IE11 and Mobile Browsers. However, in IE9 the template is not gonna be rendered. Does anybody have an idea what the problem could be? here's the site: http://dev.thomasveit.com/zuzuegler any help is very appreciated!
upvote count: 2
type: UnansweredQuestion
tagged with: handlebars.js
score: 2

http://stackoverflow.com/comment/39395926
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25280911
has text: `XMLHttpRequest`s include a [`responseXML` property](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#Properties) for XML responses. Provided a valid response, it should hold a DOM document created from the XML.

http://stackoverflow.com/comment/39433674
type: QuestionComment
comment on: http://stackoverflow.com/q/25300923
has text: when ever user click on give exam button you need to store that into the table and get the time and reduce it with the current time.
score: 0
type: Comment

http://stackoverflow.com/comment/39565921
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25372455
score: 0
has text: In the query string `childlastname=1&childlastname=2` the value of the single resulting variable `$_POST['childlastname']` would be `2` since the first occurrence in the query string is overwritten.

http://stackoverflow.com/a/25288783
answers question: http://stackoverflow.com/q/25288030
type: Answer
has body: What you need to do is make your ajax function recursive, eg on completion, it calls its self, rather than using a loop. Here is a full example, contained in a single php file, called ajax-example.php: <?php if($_SERVER['REQUEST_METHOD']=='POST'){ sleep(1); echo $_POST['name']; die(); } ?> doin nothin send Just to add, dont discount jQuery just because you dont like the syntax, it can make your life a lot easier for non trivial dom manipulation
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39411866
accepted answer of: http://stackoverflow.com/q/25288030
score: 0

http://stackoverflow.com/q/25338035
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/39503294
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39503314
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39503183
tagged with: angularjs
type: UnansweredQuestion
has body: can you please tell me how to get event of on change of drop down in angular ?. I make a drop down from json .I need to show alert when user change the drop down ng:change and get it drop down value ? I make form form using this doc https://github.com/Textalk/angular-schema-form/blob/master/docs/index.md#global-options here is my plunker http://plnkr.co/edit/wbziK5aRUg69JuwXDoVy?p=preview how I i bind ng:change ? here is my drop down title: { type: "string", required: true, enum: ['dr', 'jr', 'sir', 'mrs', 'mr', 'NaN', 'dj'] } how to bind the drop down event ?
has comment: http://stackoverflow.com/comment/39502986
has title: how to get event of on change of drop down in angular?
linked to: http://stackoverflow.com/q/12851504
has answer: http://stackoverflow.com/a/25338808
has comment: http://stackoverflow.com/comment/39503467
tagged with: angularjs-scope

http://stackoverflow.com/comment/39515479
has text: The OP mentioned PHP view file and doing what you are suggesting, creating a JS file on the server side, is shamming the rules set forth by MVC frameworks.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25345352
type: Comment

http://stackoverflow.com/comment/39504516
score: 0
type: AnswerComment
type: Comment
has text: Why downvotes? He didn't mention html 5 tags but it's more accurate than "all" (because, for example, BR is not)
comment on: http://stackoverflow.com/a/25338634

http://stackoverflow.com/q/25353444
tagged with: javascript
score: -1
answer count: 2
has title: Outputting human readable times from timestamps on blockchain.info
possible better answer: http://stackoverflow.com/a/25353485
has comment: http://stackoverflow.com/comment/39529477
upvote count: 0
accepted answer: http://stackoverflow.com/a/25353521
favorite count: 0
tagged with: bitcoin
tagged with: blockchain
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39529447
has answer: http://stackoverflow.com/a/25353521
downvote count: 1
type: Question
has body: I want to parse the timestamps from the JSON responses from blockchain.info's API. Here is an example snippet https://blockchain.info/api/api_websocket So if we look at "time": 1331300839, I try and do something like var test = new Date(1331300839); test.getFullYear(); And my results are circa 1970. I've tried using the Date object to parse recent Bitcoin transactions.. say https://blockchain.info/rawaddr/1Hy8LSovPiT3Z4qF7Hr2piJXZFHzpSBaEK And I'm still getting 1970. So how do I get a human readable output from these timestamps? Thanks.
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25353485

http://stackoverflow.com/comment/39417640
comment on: http://stackoverflow.com/a/25289040
has text: Place a `console.log('something')` in `success: function() {`
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39402493
type: Comment
comment on: http://stackoverflow.com/a/25275965
score: 0
type: AnswerComment
has text: Well, for the first one, 'Tom' is the first value in the List in the code above. So I'm not sure the first part of your answer is proper. But I get the second option working. thanks much! I'm also having to pass a variety of data formats. Next one being List of objects. I'm still not getting the hang of it as to why are we using so many double quotes. So not sure how to do it for objects. Will be grateful for more inputs.

http://stackoverflow.com/comment/39570850
type: QuestionComment
has text: Nope, that should work nicely. You're basically telling it do not perform any actions on the script until it's fully loaded (or eliminating the asynchronicity of that particular script). I still might stick it in the `head` section just as a CYA but that's your call.
score: 0
comment on: http://stackoverflow.com/q/25375065
type: Comment

http://stackoverflow.com/comment/51216615
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25237608
has text: Hi @MariusDjerv, did you find out something or finish your plugin yet? I am having the same need here.
score: 0

http://stackoverflow.com/q/25241999
has title: how to make a drop down list from 2d array and display the value in input?
has body: I want to display a drop down list whose entries are filled by the coder and the list is made using multidimensional array... and the value of the selected drop down should be displayed in input box. The following one was working only with the 1d array. Html code: Choose a city Javascript code: var city = new Array() city[0][H: 1] = "Delhi"; city[1][H: 2] = "Mumbai"; city[2][H: 3] = "Bangalore"; city[3][H: 4] = "Kolkata"; city[4][H: 5] = "Chennai"; city[5][H: 6] = "Hyderabad"; city[6][H: 7] = "Ahemdabad"; var dropdown = document.getElementById("selectCity"); for (var i = 1; i < city.length; ++i) { dropdown[dropdown.length] = new Option(city[i], city[i]); } var select = document.getElementById('myForm'); var input = document.getElementById('txtprice'); select.onchange = function () { input.value = select.value; }
has answer: http://stackoverflow.com/a/25242454
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25242454
tagged with: javascript
tagged with: forms
score: 0
answer count: 1

http://stackoverflow.com/a/25364103
type: Answer
has comment: http://stackoverflow.com/comment/39552855
answers question: http://stackoverflow.com/q/25363399
score: -1
has comment: http://stackoverflow.com/comment/39550719
downvote count: 1
has comment: http://stackoverflow.com/comment/39551182
has comment: http://stackoverflow.com/comment/39551863
upvote count: 0
has comment: http://stackoverflow.com/comment/39552159
has body: Of course use: &lt;input type="number" /&gt; This will create you spinner =)

http://stackoverflow.com/comment/39557562
type: QuestionComment
score: 8
has text: Judging from the fact that they have a complete header (including ` `, ` `, ` ` and ` ` elements) it looks like they are abusing ` ` for templating.
comment on: http://stackoverflow.com/q/25359600
type: Comment

http://stackoverflow.com/comment/39363648
score: 0
has text: can you show what is the actuall code you put instead of example of google.com
type: Comment
comment on: http://stackoverflow.com/q/25263378
type: QuestionComment

http://stackoverflow.com/a/25322597
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25322501
downvote count: 0
has body: Pass ng-class from myDirective to your template using a template function: Directive angular.module('myapp.directive'). directive('myDirective', function() { return { template: function(element, attr) { return '' }, restrict: 'E', replace: 'true', scope: { options = "=options" }, link: function(scope, element, attrs) { scope.$watch('options', function(data) { scope.class = data.class; scope.href = data.href; } } }
type: Answer

http://stackoverflow.com/a/25288073
has body: From the comments, your motivation to bypass $(...).data seems to be based on the fact that it's causing performance issues. I totally agree with @meagar on that point, $(...).data shouldn't be expensive enough to cause bottlenecks. However, if you continously re-query and re-wrap DOM elements as jQuery elements (e.g. $('#someEl').data(...) multiple times rather than caching $('#someEl') and do $someEl.data(...), then it might be an issue. Please also note that if you find yourself attaching a lot of data to DOM elements, you probably got your design wrong. Your data shouldn't live in the presentation layer and you shouldn't have to query the DOM or get a reference to a DOM element to access your data. Obviously, you might in some situations, but these shouldn't be the norm. If you still want to build your own data feature, then here's an example. It's not optimized, but you should get the idea: Note that WeakMap is only available in modern browsers, but without it we would be leaking memory, unless you provide a mechanism to destroy the cached attributes expendo object when the associated DOM element gets destroyed. JSFIDDLE JSPERF (the test might not be fair, since I'm not sure my implementation does everyting $(...).data does) var data = (function () { var attributes = new WeakMap(); return function (el, attr, val) { var elAttrs = attributes.get(el), isSetOperation = arguments.length &gt; 2; if (isSetOperation) { if (!elAttrs) attributes.set(el, elAttrs = {}); elAttrs[attr] = val; } else { return datasetOrCachedAttrsValue(); } function datasetOrCachedAttrsValue() { var attrVal = el.dataset[attr]; return typeof attrVal !== 'undefined'? attrVal: elAttrs &amp;&amp; elAttrs[attr]; } }; })(); var div = document.querySelector('div'); console.log(data(div, 'test')); //test console.log(data(div, 'notexisting')); //undefined data(div, 'exists', true); console.log(data(div, 'exists')); //true "would be leaking memory, unless you provide a mechanism to destroy the cached" -…
answers question: http://stackoverflow.com/q/25286488
has comment: http://stackoverflow.com/comment/39411027
score: 6
has comment: http://stackoverflow.com/comment/39413040
has comment: http://stackoverflow.com/comment/39410464
has comment: http://stackoverflow.com/comment/39410896
has comment: http://stackoverflow.com/comment/46180059
has comment: http://stackoverflow.com/comment/46184952
has comment: http://stackoverflow.com/comment/39410694
downvote count: 0
upvote count: 6
has comment: http://stackoverflow.com/comment/46182373
has comment: http://stackoverflow.com/comment/39410209
has comment: http://stackoverflow.com/comment/39412851
type: Answer

http://stackoverflow.com/comment/39405448
score: 0
type: Comment
type: QuestionComment
has text: What did you try with setTimeout? And what didn't work?
comment on: http://stackoverflow.com/q/25286049

http://stackoverflow.com/q/25387948
type: Question
has body: In the Q-promise library, if there is a random problem like TypeError: Cannot read property 'blah' of undefined then it can be handled via the Q.catch() block. But in Parse-promise library, if there is such a problem inside a then() block, I currently see no way of handling it other than putting a try/catch inside every single then() block! Am I missing something? What is the q.catch() equivalent for parse promises? Or are such errors simply impossible to capture without a try/catch block in every then() block? .then(function(data)){ try{ // do something with data that might throw an exception/error } catch(exception){ return Parse.Promose.error(exception); } })
tagged with: javascript
upvote count: 2
answer count: 1
favorite count: 0
tagged with: parse-platform
type: UnansweredQuestion
has title: What is the q.catch() equivalent for parse promises?
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/26858469
has comment: http://stackoverflow.com/comment/39919563

http://stackoverflow.com/comment/39479077
has text: I'd really like to close this as a duplicate, but it's too many different questions asked in a single post.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25325666

http://stackoverflow.com/comment/39499528
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25335135
has text: I just added JSONView to Chrome. Still unsure how to use it. I'll figure it out.
score: 0

http://stackoverflow.com/comment/39449691
comment on: http://stackoverflow.com/a/25308849
type: AnswerComment
has text: yep, therefore i wrote save() and load() at first. In the following versions of extjs preferable to use second way for save and reloading store.
score: 0
type: Comment

http://stackoverflow.com/comment/39511103
type: Comment
comment on: http://stackoverflow.com/a/25342614
type: AnswerComment
has text: I had to add parenthesis to onload="checkformLoaded()" to work. Thanks
score: 0

http://stackoverflow.com/q/25287936
has answer: http://stackoverflow.com/a/25288048
score: 0
tagged with: angularjs
has body: I started today with angular js, I did a few tutorials on codeschool. I used this tutorial and this example The problem is: I successfully get my JSON back from the PHP server side (it's for phonegap) but there is no way angularJS wants to show it in html. HTML Click here to load data. div style="display:block" id="event-list"> Naam: {{event.name}} Url: {{event.eventUrl}} APP.JS (function(){ var app = angular.module('teamapp',[]); //Teamcontroller app.controller('TeamController', function($scope,$http){ //Declare events as array $scope.events = []; //Load events from database $scope.loadEvents = function(teamUrl){ var httpRequest = $http({ method: 'GET', url: baseUrl + 'events/' + teamUrl + '/event', }).success(function(data, status){ console.log(data); $scope.events = data; }); }; }); })(); My log shows perfectly good json data. At somepoint when I used data like this: $scope.events = [ { name: 'Azurite', price: 2.95 }, { name: 'Bloodstone', price: 5.95 }, { name: 'Zircon', price: 3.95 }, ]; It worked, but It seemed I broke something that even that doesn't work anymore. What is going wrong? I'm searching trough tons of stack overflow posts and going to check angulars own tutorial also.
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25287998
has answer: http://stackoverflow.com/a/25287998
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25288107
has title: Angular JS not filling up html after http request
type: Question
tagged with: http://stackoverflow.com/tag/json
answer count: 3
accepted answer: http://stackoverflow.com/a/25288107
tagged with: javascript

http://stackoverflow.com/a/25252189
answers question: http://stackoverflow.com/q/25252059
has comment: http://stackoverflow.com/comment/39344649
has comment: http://stackoverflow.com/comment/39343386
has comment: http://stackoverflow.com/comment/39344623
has comment: http://stackoverflow.com/comment/39344585
score: 0
has comment: http://stackoverflow.com/comment/39344862
has body: setupController is a route hook. Cut/paste it into the route: App.InsightsRoute = Ember.Route.extend({ // This will fire after the model hook callback has returned, allowing you to interact with it. setupController: function(controller, model) { var chartJSON = []; // Empty in example but I have a valid JSON var KPICategories = [], KPIValues = []; for (var i = 0; i &lt; chartJSON.length; i++) { var categoryDate = new Date(chartJSON[i]['file_creation_time']); KPICategories.push(categoryDate.getHours() + ':' + categoryDate.getMinutes()); KPIValues.push(Math.round(chartJSON[i]['kpi_value'])); }; console.log(KPICategories); controller.set('dataset:categories', KPICategories); controller.set('dataset:data:data', KPIValues); } }); You can fire off any methods in the controller directly from here. For example: App.InsightsRoute = Ember.Route.extend({ // This will fire after the model hook callback has returned, allowing you to interact with it. setupController: function(controller, model) { //... You already set up the properties and whatnot... controller.fireOffMethod(args); controller.set('property_bar', controller.get('foo')); } });
type: Answer
has comment: http://stackoverflow.com/comment/39343483

http://stackoverflow.com/comment/39527493
comment on: http://stackoverflow.com/q/25352343
score: 0
has text: The `.prototype` property is only really relevant on a function. The function, when invoked using `new` establishes the relationship between the new object being created and the function's `.prototype` object. *...like Jonanthan said ^^^*
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39463683
type: Comment
type: QuestionComment
has text: updated with error and html
comment on: http://stackoverflow.com/q/25317106
score: 0

http://stackoverflow.com/a/25314244
has body: Don't use for..in to iterate over arrays. What this actually does is set site to 0, 1, 2 and this just doesn't work very well. Use some other form of iteration like a regular for loop, or Array.prototype.forEach sites.forEach(function (site) { var deferred = Q.defer(); promises.push(deferred.promise); options = {url: site};
score: 0
answers question: http://stackoverflow.com/q/25314086
type: Answer

http://stackoverflow.com/comment/39561209
score: 0
type: Comment
type: QuestionComment
has text: check this [fiddle](http://jsfiddle.net/lalu050/occm1twj/1/) of mine..are you in need of that??
comment on: http://stackoverflow.com/q/25370189

http://stackoverflow.com/a/25307518
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25307467
downvote count: 0
score: 1
has body: did you tried to view source? var_dump will output the variable as is, so if it contains HTML the browser will parse it and you won't see the HTML part (only in view source). try to escape it before using var_dump. var_dump(htmlspecialchars($input));

http://stackoverflow.com/comment/39482199
comment on: http://stackoverflow.com/a/25327081
type: Comment
score: 2
type: AnswerComment
has text: @Khalid not always - it will be called automatically in some cases. You really have no other choice than something like this.

http://stackoverflow.com/comment/39434815
score: 0
has text: Is DOM ready when you select the `a` element?
type: QuestionComment
comment on: http://stackoverflow.com/q/25301636
type: Comment

http://stackoverflow.com/q/25372429
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25372597
has comment: http://stackoverflow.com/comment/39565644
score: 0
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/39565746
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25372603
has body: Can't seem to get this to work for me, can anyone offer me some help? http://codepen.io/anon/pen/kABjC This should open and close a section of text based on click, it takes the ID # which is just a digit (1,2,3,4,etc) and using that id targets an id to open and close the section. Javascript $(document).ready(function(){ $('.classclick').click(function(){ $('#class'+$(this).Attr('data-id')+"show").show(400); }); }); HTML <?php foreach ($classes as $class): ?> <div class="classclick" data-id="<?=$class['cid']?>"> <?=$class['className']?> Intensity: <?=$class['classIntensity']?> <div class="class-show hidden" id="class<?=$class['cid']?>show"> <?=$class['classDesc']?> Things To Know: asdfasd asdf afsdadfs fsda dfsa dfsadfsa <?php endforeach; ?>
has comment: http://stackoverflow.com/comment/39565740
has title: Javascript toggle using custom attributes

http://stackoverflow.com/q/25299940
has comment: http://stackoverflow.com/comment/39436963
tagged with: ko.observablearray
tagged with: knockout.js
type: Question
has answer: http://stackoverflow.com/a/25300783
tagged with: arrays
tagged with: javascript
has title: Knockout js: can't write value from form inside array
has comment: http://stackoverflow.com/comment/39437026
score: 0
has comment: http://stackoverflow.com/comment/39470639
answer count: 1
has comment: http://stackoverflow.com/comment/39509794
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39535243
has comment: http://stackoverflow.com/comment/39436923
has body: I have a script that produces an array of forms, with each form affecting the available options for the next form. The awesome martin booth solved the problem of getting the displayed values to update as new forms are added. however, I have an observable array (defaultSampleRates) that sits outside the forms array, and for the life of me I can't get the form to push items into that array. I've tried declaring it in a dozen different places in a dozen different ways, but it just won't stick. basically I need the 'Default sample rate' drop-down to show the sample rates that have been selected in the form above (the user must only be able to choose a default sample rate from a displayed one, rather than from the full list). Any tips much helpo brain pain. fiddle here: http://jsfiddle.net/3lliot/9vsa4hh7/ html: Sample rate element Sample rate (Hz): Add element Remove Default sample rate: <sample_rate></sample_rate> <default_srate></default_srate> js: // This is a simple *viewmodel* - JavaScript that defines the data and behavior of your UI //window.onload = startKnockout; window.onload = startKnockout; var formNum; var i = -1; var selectedSampleRates = []; function Form(allSampleRates, forms) { var self = this; // Declare observables self.selectedSampleRate = ko.observable(); self.formNum = ko.observable(); self.sampleRates = ko.computed(function () { var formsValue = forms(), availableSampleRates = ko.utils.arrayFilter(allSampleRates, function (sampleRate) { return !ko.utils.arrayFirst(formsValue, function (form) { if (form != self) { if (form.selectedSampleRate() === sampleRate) { if (selectedSampleRates.indexOf(sampleRate) === -1) { selectedSampleRates.push(sampleRate); } } return form.selectedSampleRate() === sampleRate; } else { return form != self; } }); }); return availableSampleRates; }); // count how many srate elements there are i++; self.formNum = i; } var Vm = function () { var self = this; var item = 0, allSampleRates = ['192000', '176400', '96000', '88200'…

http://stackoverflow.com/a/25341865
has body: $.getJSON is asynchronous, so the console.log call is always going to happen before the request completes and the done function is called. Look at getJSON Synchronous for doing synchronous ajax calls, although this is an anti--pattern and you should be able to do everything in the callback.
type: Answer
accepted answer of: http://stackoverflow.com/q/25341776
upvote count: 3
answers question: http://stackoverflow.com/q/25341776
score: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39511641
downvote count: 0

http://stackoverflow.com/comment/39381935
type: QuestionComment
type: Comment
has text: I think `elseif` is not correct in JS, try to use `else if` (with a space between else and if).
comment on: http://stackoverflow.com/q/25273017
score: 0

http://stackoverflow.com/comment/39481944
comment on: http://stackoverflow.com/q/25317668
score: 0
has text: The control is added in the HTML markup. <uc1:control name /> and, yes, we have set Visible=false to the panel. What I would like to do is remove the user control from the panel and set its visibility using css.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39526168
has text: i have asked another question at this link: http://stackoverflow.com/questions/25343611/xmlhttprequest-mimicking-script-works-on-one-web-page-but-not-another where I have tried to locate with the source code in developer tools where the URL 'tournamentsfeed' is, but have been unable to do so...reason being in the question i have asked, the above method for obtaining data from the website server is not returning the same data as that on the page when i am looking at the premier league rather than the FA Cup. Can you tell me where I should be looking in the source code for this URL?
comment on: http://stackoverflow.com/a/25234506
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39548508
comment on: http://stackoverflow.com/q/25363771
type: QuestionComment
has text: What is your problem?
score: 0
type: Comment

http://stackoverflow.com/a/25270497
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25240719
answers question: http://stackoverflow.com/q/25240719
type: Answer
score: 2
has body: I found a solution. The problem was that I have not installed jQuery.MaskedInput plugin. To install jQuery.MaskedInput, run the following command in the Package Manager Console: PM&gt; Install-Package jQuery.MaskedInput -Version 1.3.1
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/25357876
has comment: http://stackoverflow.com/comment/39537620
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25358868
type: Question
has comment: http://stackoverflow.com/comment/39537843
score: 0
has title: Replacing double quotes while sending parameter to javascript function
answer count: 2
has body: This is JSFiddle : http://jsfiddle.net/5kdek3vn/ I have button as follows: Modify in this on click i am calling setFileDescriptionForUpdate function whose first parameter is string and is as follows: !@#$%^&*()_+-=~`{}|[]\:";'<>?,./ when " is involved in string it creates problem. What changes i can make to avoid this?? Please help me.
tagged with: javascript
has answer: http://stackoverflow.com/a/25358621
tagged with: jquery
has answer: http://stackoverflow.com/a/25358868
possible better answer: http://stackoverflow.com/a/25358621
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25247197
has comment: http://stackoverflow.com/comment/39466925
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/26567782
favorite count: 0
has body: I've got my form accepting drag and drop events but everything I've read online about them seems to imply that you can't upload the dropped file as part of a standard form submission like an &lt;input type="file" /&gt;. Is it actually possible to avoid AJAX / XHR and just upload the file when you submit the form? Perhaps moving the file data into the file input?
tagged with: drag-and-drop
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
type: Question
has title: Is it possible to use HTML Drag and Drop file uploads, but without AJAX / XHR?
linked to: http://stackoverflow.com/q/12121589
tagged with: javascript
score: 4
upvote count: 4

http://stackoverflow.com/q/25242550
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25252658
tagged with: tampermonkey
type: UnansweredQuestion
has body: I want to buy some product online, but every time more stock is added, it's all gone in 5 minutes or less :/ That's why I'm trying to make a small grease/tampermonkey script to watch that page and alert me when stock is available again... Just to avoid reinventing the wheel I was wondering if there is any existing script for that purpose (I already googled, but couldnt find anything interesting in my search) Also i'm not sure if greasemonkey allows scripts to be executed every X minutes (Actually I've never done this before with js/greasemonkey)... If not, any advice on a lead to follow or an alternative way to reach my means would be appreciated
tagged with: web-scraping
type: Question
tagged with: greasemonkey
tagged with: javascript
tagged with: monitoring
has title: Greasemonkey script to monitor a website change

ajax
tags question: http://stackoverflow.com/q/25302676
tags question: http://stackoverflow.com/q/25319193
tags question: http://stackoverflow.com/q/25321348
tags question: http://stackoverflow.com/q/25247772
tags question: http://stackoverflow.com/q/25303445
tags question: http://stackoverflow.com/q/25365054
tags question: http://stackoverflow.com/q/25231813
tags question: http://stackoverflow.com/q/25234732
tags question: http://stackoverflow.com/q/25312766
tags question: http://stackoverflow.com/q/25233323
tags question: http://stackoverflow.com/q/25273879
tags question: http://stackoverflow.com/q/25375030
tags question: http://stackoverflow.com/q/25260278
tags question: http://stackoverflow.com/q/25373388
tags question: http://stackoverflow.com/q/25382616
tags question: http://stackoverflow.com/q/25285813
tags question: http://stackoverflow.com/q/25310217
tags question: http://stackoverflow.com/q/25308764
tags question: http://stackoverflow.com/q/25357836
tags question: http://stackoverflow.com/q/25350989
tags question: http://stackoverflow.com/q/25353576
tags question: http://stackoverflow.com/q/25265485
tags question: http://stackoverflow.com/q/25272390
tags question: http://stackoverflow.com/q/25283991
tags question: http://stackoverflow.com/q/25254502
tags question: http://stackoverflow.com/q/25310450
tags question: http://stackoverflow.com/q/25381605
tags question: http://stackoverflow.com/q/25389054
tags question: http://stackoverflow.com/q/25307679
tags question: http://stackoverflow.com/q/25324533
tags question: http://stackoverflow.com/q/25300193
tags question: http://stackoverflow.com/q/25270935
tags question: http://stackoverflow.com/q/25273931
tags question: http://stackoverflow.com/q/25278052
tags question: http://stackoverflow.com/q/25276782
tags question: http://stackoverflow.com/q/25303386
tags question: http://stackoverflow.com/q/25380011
tags question: http://stackoverflow.com/q/25292835
tags question: http://stackoverflow.com/q/25266426
tags question: http://stackoverflow.com/q/25320856
tags question: http://stackoverflow.com/q/25382590
tags question: http://stackoverflow.com/q/25288330
tags question: http://stackoverflow.com/q/25380964
type: Tag
tags question: http://stackoverflow.com/q/25374338
tags question: http://stackoverflow.com/q/25372321
tags question: http://stackoverflow.com/q/25361143
tags question: http://stackoverflow.com/q/25388096
tags question: http://stackoverflow.com/q/25342561
tags question: http://stackoverflow.com/q/25332794
tags question: http://stackoverflow.com/q/25295492
tags question: http://stackoverflow.com/q/25321783
tags question: http://stackoverflow.com/q/25324833
tags question: http://stackoverflow.com/q/25304214
tags question: http://stackoverflow.com/q/25301008
tags question: http://stackoverflow.com/q/25277269
tags question: http://stackoverflow.com/q/25246406
tags question: http://stackoverflow.com/q/25245584
tags question: http://stackoverflow.com/q/25367445
tags question: http://stackoverflow.com/q/25249952
tags question: http://stackoverflow.com/q/25282034
tags question: http://stackoverflow.com/q/25299419
tags question: http://stackoverflow.com/q/25302521
tags question: http://stackoverflow.com/q/25378068
tags question: http://stackoverflow.com/q/25286647
tags question: http://stackoverflow.com/q/25366743
tags question: http://stackoverflow.com/q/25304610
tags question: http://stackoverflow.com/q/25284450
tags question: http://stackoverflow.com/q/25335648
tags question: http://stackoverflow.com/q/25383758
tags question: http://stackoverflow.com/q/25266354
tags question: http://stackoverflow.com/q/25368734
tags question: http://stackoverflow.com/q/25289848
tags question: http://stackoverflow.com/q/25279785
tags question: http://stackoverflow.com/q/25371627
tags question: http://stackoverflow.com/q/25310062
tags question: http://stackoverflow.com/q/25324418
tags question: http://stackoverflow.com/q/25259008
tags question: http://stackoverflow.com/q/25285075
tags question: http://stackoverflow.com/q/25343276

http://stackoverflow.com/q/25238173
accepted answer: http://stackoverflow.com/a/25238730
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25238347
tagged with: underscore.js
has answer: http://stackoverflow.com/a/25238347
tagged with: group-by
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25238730
score: 0
answer count: 2
has title: javascript underscorejs group and sum data
has body: I have a data like this: var dates = [ {date: "2000-01-01", total: 120}, {date: "2000-10-10", total: 100}, {date: "2010-02-08", total: 100}, {date: "2010-02-09", total: 300} ]; I want to create a grouped and sum of total like this. var grouped = [ {date: "2000", total: 220}, {date: "2010", total: 100} ]; I am using underscorejs but did not find function. var byYear = _.map(dates, function(item){ var year = new Date(Date.parse(item.date)).getFullYear(); return {date: year, total: item.total}; }); workig code is here.

http://stackoverflow.com/comment/39384156
has text: Have a look at browserify: http://browserify.org/
comment on: http://stackoverflow.com/q/25274162
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/25307467
has answer: http://stackoverflow.com/a/25307529
has comment: http://stackoverflow.com/comment/39445310
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39445592
has answer: http://stackoverflow.com/a/25307518
has body: How is the best way to send string from javascript to php with html tags inside? I'm trying, but all html tags disappear. var ajaxData = ' some text '; jQuery.ajax({ url: url, type: 'POST', dataType: 'json', data: ajaxData, }); but in my php code var_dump($input); shows string like that: 'some text' instead ' some text ' even this doesn't work htmlspecialchars(urldecode($input));
has comment: http://stackoverflow.com/comment/39445306
score: 0
answer count: 2
has title: Javascript - sending html code in string via Ajax
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/39445275
tagged with: html-encode
tagged with: http://stackoverflow.com/tag/html
tagged with: php

http://stackoverflow.com/comment/39560292
score: 0
has text: Yes you can. You make a call for the "encrypted" URL and within the response you make the second call with the real URL. However, it is useless.
type: Comment
comment on: http://stackoverflow.com/a/25369762
type: AnswerComment

http://stackoverflow.com/comment/39576628
comment on: http://stackoverflow.com/q/25378229
type: QuestionComment
type: Comment
score: 0
has text: Server side request? Are there any documents or tutorials?

http://stackoverflow.com/comment/39355004
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25257863
type: Comment
has text: Does HTML encoding even *work* inside of script tags? Never seen that before.

http://stackoverflow.com/comment/39468966
type: QuestionComment
has text: Try to remove '.' in removeClass('user-marked-offensive')
score: 1
type: Comment
comment on: http://stackoverflow.com/q/25320091

http://stackoverflow.com/comment/39311706
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25235394
has text: I would like the element to be hidden and show on click, however the element shows anyway. Any suggestions? :) Thank you by the way

http://stackoverflow.com/comment/39380146
comment on: http://stackoverflow.com/a/25272039
type: AnswerComment
type: Comment
has text: Is a jsfiddle out of the question? I feel i'll be of more help if I can see what you're trying to do.
score: 0

http://stackoverflow.com/comment/39332118
type: Comment
type: QuestionComment
score: 0
has text: [`JSON.parse`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) is the dual of `JSON.stringify`. It takes a string and returns a separately allocated value.
comment on: http://stackoverflow.com/q/25246431

http://stackoverflow.com/comment/39543299
type: Comment
has text: Thank you Chris :) its a pleasure to meet you.
comment on: http://stackoverflow.com/a/25360794
score: 0
type: AnswerComment

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

http://stackoverflow.com/q/25357475
answer count: 0
tagged with: d3.js
has comment: http://stackoverflow.com/comment/39551976
type: Question
tagged with: javascript
score: 0
has title: Problems with loading Javascript
has body: Hi all I've just started with Javascript and i wanted to use d3 and I already met into a problem: XMLHttpRequest cannot load https://blahblah/api/votes. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access. This problem was shown in my console. Attached is my code: Testbed! Can someone give me some clues as to what is going on?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39536724
has comment: http://stackoverflow.com/comment/39536839

http://stackoverflow.com/a/25271342
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39378610
answers question: http://stackoverflow.com/q/25271204
has body: Well it won't be cookie anymore dear. It's like adding a space in the middle of the property, therefore making it co okie. But it's fine if you do: alert(/* Comment here */ document.cookie /* Or here */);
accepted answer of: http://stackoverflow.com/q/25271204
type: Answer
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/25238632
tagged with: jquery
tagged with: zooming
tagged with: viewport
downvote count: 0
favorite count: 0
answer count: 0
type: UnansweredQuestion
score: 3
has body: Is it possible to reset scale after user zoom? I have a page in which I enable zoom: $('head').append('&lt;meta name="viewport" content="width=device-width, initial-scale=0.5" /&gt;'); when I press on my application "back" button, I return to a page in which I want to disable zoom and reset the scale: I add: $('head').append('&lt;meta name="viewport" content="width=device-width, minimum-scale=0.5, initial-scale=0.5, maximum-scale=0.5, user-scalable=no" /&gt;'); but if the user zoomed-in, the scale is not being reset. Is there any way to solve it without refreshing the whole page?
upvote count: 3
has title: Reset iPhone/iPad scale after user zoom-in without refresh
type: Question
tagged with: ios
tagged with: javascript

http://stackoverflow.com/q/25241404
downvote count: 1
has body: I have an edm template input/generated by a web frontend, and I have to replace all merge tags in the format *|TAG_NAME|* with its corresponding value. I tried to use the below RegEx but it seems I got an error on the | characters. ^\*|[0-9A-Za-z]+|\*$ Below is a sample template (in json format): "fields": [ { "key": "member_id", "label": "Member ID", "value": "*|member_id|*" } Any help is appreciated!
answer count: 1
has answer: http://stackoverflow.com/a/25241709
accepted answer: http://stackoverflow.com/a/25241709
favorite count: 0
tagged with: pattern-matching
has comment: http://stackoverflow.com/comment/39322902
has title: Ways to do RegEx matching for *|TAG_NAME|*
tagged with: regex
tagged with: node.js
tagged with: string-matching
type: AnsweredQuestion
upvote count: 0
type: Question
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39334289

http://stackoverflow.com/q/25301881
has comment: http://stackoverflow.com/comment/40285296
has title: How to invoke model events forcefully
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25309466
has body: I written a function, it will trigger whenever model attribute change just like in the following way. modelEvents:{ "change:Name":"callback1" }, callback1:function(){ console.log("This is testing"); } Initially I set model.set("Name","hi") so automatically callback1 was invoked. Again If I set the same value into model, callback1 not triggering because model attribute not modified. so For this every time I am doing in the following. model.set({"Name":""},{silent:true}); model.set({"Name":"hi"}); If I do like above it's working fine, but I want to know is there any option(like silent) to forcefully invoke callback. Thanks.
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25306183
accepted answer: http://stackoverflow.com/a/25306183
tagged with: javascript
has comment: http://stackoverflow.com/comment/39435545
tagged with: backbone.js
has answer: http://stackoverflow.com/a/25309466

http://stackoverflow.com/q/25344223
score: 0
accepted answer: http://stackoverflow.com/a/25345637
tagged with: meteor
has title: submitting form values to meteor method but get error userSchema not defined
has body: I'm trying to create a Meteor method to save the user profile from a form created by autoform. I'm getting an error saying the userSchema is not defined. It is defined in my helper which is within a Meteor.isClient condition, which could be the problem. I tried making it available to both the client and server but that didn't work. What I'm trying to acheive is simply take the form values and insert them into the Meteor.users.profile. Looks like the server isn't seeing the userSchema which is visible on the client. I'm getting this error: I20140816-14:14:28.170(-7)? Exception while invoking method 'saveProfile' ReferenceError: userSchema is not defined I20140816-14:14:28.173(-7)? at Meteor.methods.saveProfile (app/server/server.js:6:16) I20140816-14:14:28.173(-7)? at maybeAuditArgumentChecks (packages/livedata/livedata_server.js:1487) I20140816-14:14:28.173(-7)? at packages/livedata/livedata_server.js:643 I20140816-14:14:28.173(-7)? at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56) I20140816-14:14:28.174(-7)? at packages/livedata/livedata_server.js:642 I20140816-14:14:28.174(-7)? at _.extend.withValue (packages/meteor/dynamics_nodejs.js:56) I20140816-14:14:28.176(-7)? at _.extend.protocol_handlers.method (packages/livedata/livedata_server.js:641) I20140816-14:14:28.176(-7)? at packages/livedata/livedata_server.js:541 My Schema: if (Meteor.isClient) { Schema = {}; Schema.UserProfile = new SimpleSchema({ firstName: { type: String, regEx: /^[a-zA-Z-]{2,25}$/ }, lastName: { type: String, regEx: /^[a-zA-Z]{2,25}$/ }, gender: { type: String, allowedValues: ['Male', 'Female'] }, bio: { type: String, }, avatar: { type: String, }, pinCode: { type: Number, min: 7, max: 7 }, phoneNumber: { type: Number, min: 9, max: 10 } }); Schema.User = new SimpleSchema({ _id: { type: String, regEx: SimpleSchema.RegEx.Id, optional: true, }, email: { type: String, regEx: SimpleSchema.RegEx.Email, optional: true, }, createdAt: { type: Date, optional: true }, profile: { type: Schema…
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25345637
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/81724141
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25304634
has text: @codemirror Good point. But if it contains '\' then you won't see it as 'ab\cd' you'll get that as 'ab\\cd' in code.

http://stackoverflow.com/comment/39533158
comment on: http://stackoverflow.com/q/25354948
type: Comment
has text: not sure if there is something out there which manages javascript version for dependency management
score: 1
type: QuestionComment

http://stackoverflow.com/comment/39451483
type: Comment
has text: Add a `console.log(element)` to make sure that it's what you think it is - an answer below suggests that you've gotten the parameter order wrong.
comment on: http://stackoverflow.com/q/25310571
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39449325
has text: Then use the other option that I mentioned...
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25308486

http://stackoverflow.com/comment/39563437
has text: No problem, that's why we're here :)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25370973

http://stackoverflow.com/q/25379184
type: Question
has answer: http://stackoverflow.com/a/25380988
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25380988
upvote count: 2
answer count: 1
tagged with: zend-framework2
favorite count: 0
tagged with: php
type: AnsweredQuestion
score: 2
downvote count: 0
has body: The problem I am having is similar to some questions already posted, but none of them provids an answer in respect to ZF2. What I am trying to achieve is this: on an image click a clearbox (lightbox) should open with a form from a different PHP file. What i have: a view script in .phtml format which contains the image to be clicked. an image.php file which contains the code for the function to be executed when the form is processed in the clearbox. clearbox is attached and working fine: &lt;a href="link\to\image.php" rel="clearbox[width=800,height=600]" title="Caption" &gt; &lt;img src="img/test.jpg" class="img-responsive img-rounded" style="width:150px; height:200px;" &gt; &lt;/a&gt; The problem: First of all, where should I keep the image.php file in ZF2? And if I need to write a function as we do in pure PHP, keep all the functions in one file, whats the best practice in ZF2? I tested the file as separately and it worked, but if I use the same URL for the clearbox, it will also display the layout for the page in box, which I don't want. So I need just the content of the file to work. Please, let me know if the question is unclear. EDIT: Also, the page used in clearbox is coming through router using a separate .phtml view script, it would be great if someone can tell me how to call the file directly for the clearbox.
has title: How to call a PHP function or a file on image click in ZendFramework 2?

http://stackoverflow.com/q/25329717
tagged with: lodash
type: AnsweredQuestion
has title: Javascript Zipped Arrays Automatically Indexed or Named
has answer: http://stackoverflow.com/a/25364700
accepted answer: http://stackoverflow.com/a/25364700
downvote count: 0
tagged with: underscore.js
score: 1
type: Question
has body: How do I zip two or more arrays and then iterate through each element by name instead of by index? In Python, you could do this: for A, B in zip(As, Bs): However, in Javascript I am using something like this: var As = [1,2,3]; var Bs = [4,5,6]; _(As) .zip(Bs) .map(function(x) { return {A:x[0], B:x[1]}; // I want x[0] and x[1] mapped to names. }) .map(function(x) { // Now I can use x.A and x.B. ... Is there a better way to do this in Javascript?
tagged with: javascript
tagged with: functional-programming
upvote count: 1
answer count: 1
favorite count: 0

http://stackoverflow.com/a/25359254
has comment: http://stackoverflow.com/comment/39549459
accepted answer of: http://stackoverflow.com/q/25359039
has body: You should give us your work for more detail, but I think this link will help you https://docs.angularjs.org/tutorial/step_07 ... phonecatApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/phones', { templateUrl: 'partials/phone-list.html', controller: 'PhoneListCtrl' }). when('/phones/:phoneId', { templateUrl: 'partials/phone-detail.html', controller: 'PhoneDetailCtrl' }). otherwise({ redirectTo: '/phones' }); }]);
type: AcceptedAnswer
score: 0
answers question: http://stackoverflow.com/q/25359039
type: Answer

http://stackoverflow.com/comment/39482309
has text: That's just not how JS works. Almost all functions will return as soon as possible. So effectively you're telling the element to move 900 times in (way) less than a second. This is why you only see the last animation, and have to work with callbacks.
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25327260
type: Comment

http://stackoverflow.com/a/25380994
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25379233
has comment: http://stackoverflow.com/comment/39612776
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25379233
upvote count: 2
has comment: http://stackoverflow.com/comment/39583940
has comment: http://stackoverflow.com/comment/39612181
has body: I would "improve" your code in 3 aspects: Stay DRY (don't repeat yourself) Only use jQuery if it is necessary Choose scope wisely var toggleVisbility = function( aVal, $Element ) { // #1, #2, #3 $Element[0].style.display = aVal.indexOf('3') !== -1 ? 'initial' : 'none'; // #2 return $Element; // #1 chainable }; jQuery(function() { // document ready var $EmailId = jQuery(".emailid"), $FormTo = jQuery("#jform_to") // #1 .on('change click', function() { // #1 | on change click toggleVisbility( $FormTo.val(), $EmailId); // #1 }) .click();// #1 | trigger click on document ready });

http://stackoverflow.com/q/25325473
has comment: http://stackoverflow.com/comment/39478968
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39478776
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25327062
has answer: http://stackoverflow.com/a/25325871
type: Question
has title: Add coordinates to google Maps in angular app
tagged with: google-maps
tagged with: javascript
has answer: http://stackoverflow.com/a/25325545
answer count: 3
has body: How can I add coordinates to google maps "center" when working with angular framework. I have coordinates displace on my page with coordinates: &lt;td&gt;{{lat}},{{lng}}&lt;/td&gt; I have the below code which does not work, where am I going wrong? &lt;google-map center="map.center" zoom="zoom" draggable="true" options="options"&gt; I get the following error with this Error: [$parse:syntax] Syntax Error: Token 'latitude' is at column {2} of the expression [{3}] starting at [{4}]. Below is the controller from which the values of the coordinates are obtained: .controller('UncatCtrl', function ($scope, $http, $routeParams) { $http.get('http://94.125.132.253:8000/getuncategorisedplaces').success(function (data, status, headers) { $scope.places = data; console.log(data); $scope.message = 'Uncategorised places'; }) $scope.id = $routeParams.id; $scope.showplace = function(id) { $http({method: 'GET', url: 'http://94.125.132.253:8000/getitemdata?ID=' + $scope.id}). success(function(data, status, headers, config) { $scope.place = data; //set view model console.log(data); console.log(id); $scope.view = 'templates/detail.html'; console.log(data.place.lat); $scope.map = { center: { latitude : data.place.lat, longitude : data.place.lng, }, zoom: 13, }
upvote count: 1
favorite count: 0

http://stackoverflow.com/comment/39524519
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25350625
score: 1
has text: Are you allowed to modify the film objects? Or alternately, make a random list of them and then just pop one each time...

http://stackoverflow.com/q/25254233
tagged with: javascript
has answer: http://stackoverflow.com/a/40858839
upvote count: 4
has comment: http://stackoverflow.com/comment/39347439
has answer: http://stackoverflow.com/a/64248853
answer count: 7
has body: How can I achieve a five star rating functionality using css. I have some html: Rate this page And some additional css which gives me this: I then have a css hover state which swaps the grey star with a pink star: span.stars ol li:hover { background-image: url(../images/starHover.png); } Output: So obviously this will only effect the star I hover over. But I was wonder How would I be able to highlight star 1, 2, 3, and 4 when i hover over star 4. So highlight all the stars that trial the selected. I also want to be able to keep the stars pink if a click event is triggered. I want to basically do this with css and no javascript. My css skills are a bit rusty. Any suggestions on how to achieve this functionality.
tagged with: jquery
has comment: http://stackoverflow.com/comment/39347465
has answer: http://stackoverflow.com/a/25256312
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25254429
tagged with: css
type: AnsweredQuestion
score: 2
possible better answer: http://stackoverflow.com/a/25254429
downvote count: 2
accepted answer: http://stackoverflow.com/a/25256312
has answer: http://stackoverflow.com/a/78115740
has title: Five star rating functionality
type: Question
linked to: http://stackoverflow.com/q/4502633
has answer: http://stackoverflow.com/a/25254426
has answer: http://stackoverflow.com/a/66053604

http://stackoverflow.com/comment/39362673
type: Comment
comment on: http://stackoverflow.com/q/25262944
score: 0
type: QuestionComment
has text: How about `display:inline-block`?

http://stackoverflow.com/comment/39514136
score: 1
type: Comment
type: QuestionComment
has text: What does *"doesn't seem to work"* mean? Show your input and explain both the expected and observed output. Your code works for me.
comment on: http://stackoverflow.com/q/25344603

http://stackoverflow.com/comment/39387939
type: AnswerComment
has text: And may I ask why exactly you want to know that? It's not that it can be useful and it might change in the future as well. Right now the AMD loader has a lot of legacy code support that may be removed in Dojo 2.0.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25255140

http://stackoverflow.com/q/25339484
tagged with: jquery
favorite count: 0
tagged with: onload
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25339520
has title: Run javascript based on url
downvote count: 1
type: Question
tagged with: javascript
score: -1
has body: okay so I need this script $(document).ready(function() { $('a[id="twittersocial"]').click(function() { $(".twittersocial").slideToggle("slow", function() { $(".twittersocial").load('social/twitter.php?k=&lt;?php echo"$website"; ?&gt;', function() {}); }); }); }); to run when someone goes to the direct url www.website.com#twittersocial and when of course when somene click the link twitter social How can I achieve this ?
accepted answer: http://stackoverflow.com/a/25339520
upvote count: 0
answer count: 1
tagged with: url

http://stackoverflow.com/comment/39396822
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25281318
has text: Your question is not very clear. It would help if you showed your existing code.
type: Comment

http://stackoverflow.com/comment/39577990
has text: Why is this tagged `jquery` if you’re not using any?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25378991

http://stackoverflow.com/a/25350026
has body: I think, you should convert your time to minutes like so: var sunrise_m = sunrise[0] * 60 + sunrise[1] and then test your conditions: var sunrise = [09, 23] var sunset = [20, 49]; var sunrise_m = sunrise[0] * 60 + sunrise[1] var sunset_m = sunset[0] * 60 + sunset[1] var now = new Date() var now_m = now.getHours() * 60 + now.getMinutes() if (now_m &gt; sunset_m - 60 &amp;&amp; now_m &lt;= sunset_m + 60) { console.log("dusk"); } else if (now_m &gt; sunrise_m - 60 &amp;&amp; now_m &lt;= sunrise_m + 60) { console.log("dawn"); } else if (now_m &gt; sunrise_m + 60 &amp;&amp; now_m &lt;= sunset_m - 60) { console.log("day"); } else { console.log("night"); }
type: Answer
score: 2
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25349902
downvote count: 1
answers question: http://stackoverflow.com/q/25349902
type: AcceptedAnswer

http://stackoverflow.com/comment/39586401
has text: jsFiddle doesn't shake hands with IE 8.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25383541

http://stackoverflow.com/comment/39369256
score: 0
comment on: http://stackoverflow.com/q/25266303
has text: In the JS you're getting the "linkEditDiv" by ID while you set it as the name in the HTML
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25356048
has body: I am sending an http post request from node using request (https://github.com/mikeal/request), and I am getting back a null body. The same request getting sent from hurl.it is returning the correct response with the correct body. Another request getting sent from the same nodejs server to the same server is also returning the correct body. What is really infuriating is that this was working last week and is no longer working in nodejs. My server.js is: var request = require('request'); request({ uri: 'insert url here; contains sensitive info', method: 'POST', body: 'insert body here; contains sensitive info', followRedirect: true, maxRedirects: 10 }, function(error, response, body) { console.log('body in response is: ' + body); }); anyone have any idea how to fix this? thank you.
has answer: http://stackoverflow.com/a/25370903
has comment: http://stackoverflow.com/comment/39534361
has comment: http://stackoverflow.com/comment/39534473
favorite count: 0
has comment: http://stackoverflow.com/comment/39534284
has comment: http://stackoverflow.com/comment/39537100
has comment: http://stackoverflow.com/comment/39534376
has title: nodejs request returning null body from server for a POST request
tagged with: node.js
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39534454
upvote count: 2
has comment: http://stackoverflow.com/comment/39534423
has comment: http://stackoverflow.com/comment/39534227
tagged with: node-request
type: Question
has comment: http://stackoverflow.com/comment/39562522
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25370903
tagged with: httprequest
tagged with: post
downvote count: 0
answer count: 1

http://stackoverflow.com/q/25261730
has answer: http://stackoverflow.com/a/25261936
type: Question
has comment: http://stackoverflow.com/comment/39360717
linked to: http://stackoverflow.com/q/25199149
tagged with: javascript
has title: Get weekdata in between 2 Dates
has body: i want to show all dates in between 2 Dates.so for i wrote, $( document ).ready(function() { $( "#day" ).click(function() { startJsonSession(); return false; }); function startJsonSession(){ var inputdate=$('#inputdate').val(); //alert("Input Date!!!" + inputdate ); var d = new Date(inputdate); var nowMS = d.getTime(); // get # milliseconds for today //alert(nowMS); var week = 1000*60*60*24*7; // milliseconds in one week //alert(week); var oneWeekFromNow = new Date(nowMS + week); //alert("oneWeekFromNow!!!" + oneWeekFromNow); var fromdate = d.getDate(); var month = d.getMonth() + 1; var year = d.getFullYear(); if (fromdate &lt; 10) { fromdate = "0" + fromdate; } if (month &lt; 10) { month = "0" + month; } //var date = fromdate + "/" + month + "/" + year; var date = year + "/" + month + "/" + fromdate; alert("InputDate!!!!" + date); //var weekdate=oneWeekFromNow.getDate() + "/" + month + "/" + year; var weekdate=year + "/" + month + "/" + oneWeekFromNow.getDate(); alert("weekdate!!!" + weekdate); var tomorrow = new Date(d.getTime() + (24 * 60 * 60 * 1000)); var tomorrowdate = tomorrow.getDate(); var month1 = tomorrow.getMonth() + 1; var year1 = tomorrow.getFullYear(); if (tomorrowdate &lt; 10) { tomorrowdate = "0" + tomorrowdate; } if (month1 &lt; 10) { month1 = "0" + month1; } //var nextday = tomorrowdate + "/" + month1 + "/" + year1; var nextday = year1 + "/" + month1 + "/" + tomorrowdate; alert("tomorrow!!!!" + nextday); var d1 = new Date(date); alert("D1!!!!!" + d1); var d2 = new Date(weekdate); var aDates = []; do { aDates.push(d1.toString()); d1.setDate(d1.getDate()+1); } while (d1 &lt;= d2); alert("Dates!!!" + aDates); //alert(aDates.join("\n")); } }); Now I am able to get in between 2 Dates in default Format,i have to Change default Format to mm/dd/yyyy. Can You Suggest me....
score: 0
accepted answer: http://stackoverflow.com/a/25261814
has comment: http://stackoverflow.com/comment/39391061
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/39376272
downvote count: 1
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25261936
has answer: http://stackoverflow.com/a/25261814
has comment: http://stackoverflow.com/comment/39391071
type: AnsweredQuestion

http://stackoverflow.com/q/25232668
answer count: 2
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25233179
has title: raise opacity for first div at same time reduce for second. And looping
tagged with: css
has comment: http://stackoverflow.com/comment/39306360
has answer: http://stackoverflow.com/a/25233092
type: AnsweredQuestion
score: 0
tagged with: css-transitions
possible better answer: http://stackoverflow.com/a/25233092
has comment: http://stackoverflow.com/comment/39306475
type: Question
has answer: http://stackoverflow.com/a/25233179
tagged with: javascript
has body: I have 2 divs with background-image. I want to raise at the same time opacity for first div and reduce opacity of another. And I want to loop that. I want to get the smoothly effect of shifts backgrounds. Is there such a way to do that? &lt;div class="first"&gt;&lt;/div&gt; &lt;div class="second"&gt;&lt;/div&gt; .first, .second { position: absolute; height: 100%; width: 100%; } .first { background: url(http://placehold.it/350x150); background-size: cover; opacity: 0; } .second { background: url(http://placehold.it/250x150); background-size: cover; opacity: 1; } jsfiddle

http://stackoverflow.com/a/25312605
has comment: http://stackoverflow.com/comment/39456081
type: Answer
accepted answer of: http://stackoverflow.com/q/25311138
answers question: http://stackoverflow.com/q/25311138
has body: As Robert Levy pointed out, the correct format is: window.location = url; In 'SPA' frameworks, you usually don't do a lot of redirecting. SPA = Single Page Application (the Wikipedia page is fairly informative). If you would like additional reading: Backbone Introduction More in-depth demo of creating a SPA with Backbone
score: 1
upvote count: 2
type: AcceptedAnswer
downvote count: 1

http://stackoverflow.com/q/25239195
type: Question
has comment: http://stackoverflow.com/comment/39333794
tagged with: firefox
answer count: 1
tagged with: javascript
upvote count: 1
has body: I have two one-second audio sources as follows: var context = system.AudioContext(); var source = context.createBufferSource(); var audioBuffer1 = context.createBuffer(1, float32Array_1.length, context.sampleRate); audioBuffer1.getChannelData(0).set(float32Array_1); var audioBuffer2 = context.createBuffer(1, float32Array_2.length, context.sampleRate); audioBuffer2.getChannelData(0).set(float32Array_2); Now I want to play these two audio sources with no delay between them. For a single source I can play the audio with the following code: source.buffer = audioBuffer1; source.connect(context.destination); source.start(0); How can I attach the second source such that there would be no delay between them.
tagged with: web-audio-api
favorite count: 0
accepted answer: http://stackoverflow.com/a/25248458
downvote count: 0
tagged with: audiocontext
tagged with: google-chrome
has answer: http://stackoverflow.com/a/25248458
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39340071
score: 1
has title: Multiple sources for AudioContext()

http://stackoverflow.com/q/25253751
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/25254177
has answer: http://stackoverflow.com/a/25254076
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/4793604
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25254086
has answer: http://stackoverflow.com/a/25254177
type: Question
has body: I have this code ASPX <asp:TextBox ID="NewComent" TextMode="MultiLine" onkeyup="textEdit(this);" runat="server"></asp:TextBox> JS function textEdit(Inputelement) { var count = Inputelement.value.length; var newElement = document.getElementById(Inputelement.id + "_123"); console.log(newElement); if (newElement == null) { newElement = document.createElement('div'); newElement.setAttribute('id', Inputelement.id + "_123"); newElement.innerHTML = (350 - count) + " letters left"; Inputelement.insertBefore(newElement, Inputelement.parent); //Inputelement.appendChild(newElement); console.log("Inner"); } else { newElement.innerHTML = (350 - count) + " letters left"; console.log("Outer"); } } The code is supposed to take a textbok and add a counter below it. but here is the catch. It places the div inside of it making it non visual. Output (inspector) 344 letters left Using insertBefore and appendChild both result in the same problem, at least on Opera which basically is Chrome. So here i am, any ideas?
has answer: http://stackoverflow.com/a/25254086
has title: Append div before/after texbox places it within
tagged with: javascript

http://stackoverflow.com/q/25345370
tagged with: javascript
answer count: 3
downvote count: 0
has title: Angular JS $http.get does not receive data from PHP script
score: 1
has answer: http://stackoverflow.com/a/25346634
has answer: http://stackoverflow.com/a/26959579
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/26959579
tagged with: php
type: AnsweredQuestion
has body: I am using angular's $http.get function to call a PHP script file to retrieve data var $promise = $http.get("../php-bin/example.php",obj).success(function(data) { console.log(data); }); The php is supposed to just get data from a mysql db to figure out a way to get data into my app $user = json_decode(file_get_contents('php://input')); $email = $user-&gt;email; $pass = $user-&gt;pass; $con = //a mysql_connection; // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $validateEmail = "SELECT `Email` FROM `newUsers` WHERE `Email` = '$email' "; if ($result = mysqli_query($con,$validateEmail)) { if ($result-&gt;num_rows == 1){ $date = '2014-08-13'; //$sql = "INSERT INTO newUsers (Email, CreationDate, UserRef, Type, id) VALUES ('$email','$date','$email','Host','$ssid')"; $sql = "SELECT `email` FROM `newUsers` WHERE `hashpass` = '$pass' "; $result = mysqli_query($con,$sql); $row = mysqli_fetch_assoc($result); return $row; //I never receive this data in the angular app. } } mysqli_close($con); ?&gt; Could some one point me to the correct way to do this.
accepted answer: http://stackoverflow.com/a/25346634
tagged with: mysql
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25345453

http://stackoverflow.com/comment/39328583
score: 0
has text: I gave it a quick go on jsfiddle and it seems to work fine. [Fiddle here](http://jsfiddle.net/r8gk88mh/1/)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25243469

http://stackoverflow.com/comment/39831286
score: 2
comment on: http://stackoverflow.com/a/25514603
type: AnswerComment
has text: thanks, so it seems Safari doesn't support debugging iframe scripts unless a `debugger;` break is triggered from the script itself, I also noticed if you console.log(), the traceback on the console will take you to the script source.
type: Comment

http://stackoverflow.com/a/25232792
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39307317
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25232531
answers question: http://stackoverflow.com/q/25232531
has body: You have to do some work-around programming. An example would be: var MAX_VALUE = 9007199254740992; var lower_digit_set = 0; var upper_digit_set = 0; /* Do some calculations that will eventually result in lower_digit_set to be 9007199254740992 */ lower_digit_set = MAX_VALUE; if (lower_digit_set == MAX_VALUE) { lower_digit_set = 0; upper_digit_set = upper_digit_set + 1; } /* What you have to keep in mid is that your final number is something you calculate, however you cannot display it (you probably could, but it is very complex solution that I should give it a longer thought). And therefore if we increase lower_digit_set as such: */ lower_digit_set = lower_digit_set + 1; /* Then the new number will be a combination of both lower_digit_set and upper_digit_set*/ console.log("The actual number is more than once, or twice, or thrice ...etc. of the max_value"); console.log("Number of times we multiply the max value: ", upper_digit_set); console.log("Then we add our remainder: ", lower_digit_set); Please note, if you are going to calculate negative numbers, then you should account for that. Also, the solution depends on your needs, this is just an example, you may need to modify it to fit your needs, but it just gives you a general idea of what you need to do, or at least a way of thinking so to speak.

http://stackoverflow.com/q/25263345
linked to: http://stackoverflow.com/q/17470790
tagged with: angularjs
linked to: http://stackoverflow.com/q/15417125
has comment: http://stackoverflow.com/comment/39363516
has answer: http://stackoverflow.com/a/25263522
has comment: http://stackoverflow.com/comment/39363539
type: AnsweredQuestion
upvote count: 2
has body: I have a form with multiple input boxes and when the first input box has focus and if I press Enter then route is changing and navigating somewhere. How can I stop it?
accepted answer: http://stackoverflow.com/a/25263522
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39363962
score: 2
answer count: 1
downvote count: 0
favorite count: 0
has title: Stop angular.js route changing on press enter in input box

http://stackoverflow.com/q/25254129
favorite count: 0
has comment: http://stackoverflow.com/comment/39347500
upvote count: 4
tagged with: http://stackoverflow.com/tag/svg
downvote count: 0
tagged with: d3.js
has answer: http://stackoverflow.com/a/25254401
accepted answer: http://stackoverflow.com/a/25254401
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39347631
has body: I have a chart where I create nodes dynamically as time goes by. After a certain time, I fade out the nodes and remove them. I have the 2 variables: data_nodes which contains the data i'm binding the nodes to node which is the result of the d3.selectAll I've tried the following node = svg.selectAll(".nodes") .data(data_nodes, function(d){return d.id;}); node.exit.remove(); This works fine. When I inspect the SVG the nodes are removed properly But when I do node = svg.selectAll(".nodes") .data(data_nodes, function(d){return d.id;}); node.exit().transition() .duration(duration+100) .style("opacity", 1e-6) .remove(); The nodes fade out as expected but they don't get removed from the SVG element. The number of circles element in the DOM keeps on increasing. When I check the size of data_nodes and node in the console, they're what I expect them to be but if I do a d3.selectAll(".nodes") in the console I can see the number is wrong. Thanks for the help. SOLUTION: It appears that my transition on exit() was too long and some of the nodes were coming back in, hence getting a transition assigned on enter().
has comment: http://stackoverflow.com/comment/39347375
score: 4
type: Question
has title: d3js - Nodes don't get removed after transition on exit()
has comment: http://stackoverflow.com/comment/39347197
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/25364502
type: Answer
has body: You are using: $(this).attr('value', value); Should this not be : $(this).attr('value', src);
has comment: http://stackoverflow.com/comment/39558788
has comment: http://stackoverflow.com/comment/39575652
score: 0
answers question: http://stackoverflow.com/q/25364181

http://stackoverflow.com/comment/39465543
has text: Sorry, still not making sense. There's no need for "placeholders" like that. Just render the HTML you want the page to have. This is all happening in the same scope, so if you print static HTML like that to the page you're saying you want that output to the client. If that's not what you want, then remove that static HTML and use the code I gave you instead.
comment on: http://stackoverflow.com/a/25317824
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39408719
type: Comment
type: QuestionComment
has text: @PSL The inner ng-repeat isn't animated. You can check it here http://plnkr.co/edit/506fyYc7fgsvEcXmlgpd?p=preview, if you use different animations for the inner and outer ng-repeat.
score: 0
comment on: http://stackoverflow.com/q/25287517

http://stackoverflow.com/q/25388654
has title: jQuery .animate with if statement
has comment: http://stackoverflow.com/comment/39596083
has answer: http://stackoverflow.com/a/25388829
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/25388739
has answer: http://stackoverflow.com/a/25388695
type: Question
has comment: http://stackoverflow.com/comment/39595977
has comment: http://stackoverflow.com/comment/39596175
score: -2
has body: I'm total beginner with Javascript and jQuery. I'm trying to animate a div IF a var is true but it's not working. Could someone point me in the right direction! Here's my code so far: var prompti = prompt("Please enter true value"); $(document).ready(function(){ if (prompti === true) { $('#test').animate({"left": "300px"}, 200) }; });
tagged with: javascript
answer count: 3
upvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/45004532
comment on: http://stackoverflow.com/a/25408260
score: 0
type: Comment
has text: Ah I see. It was forget from 1.0.0.4 beta I think. Since the big rewrite happened that made chartjs all modular
type: AnswerComment

http://stackoverflow.com/comment/39470265
type: Comment
comment on: http://stackoverflow.com/a/25320503
has text: thanks danikaze for the very quick response! I will try this out but seems like this will do the trick.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39557306
comment on: http://stackoverflow.com/q/25367834
score: 0
type: Comment
type: QuestionComment
has text: @Larkeith How would pagination prevent tables from being comparable? Also, can you include the code used to generate the html elements.

http://stackoverflow.com/a/25255282
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25255172
has comment: http://stackoverflow.com/comment/39454888
has comment: http://stackoverflow.com/comment/39388584
has comment: http://stackoverflow.com/comment/39454214
has body: Can you post the code of your plot? Recently, we have merged a new layout system and it seems to me that you are probably using and old way to set up the axes in your plot...
answers question: http://stackoverflow.com/q/25255172
has comment: http://stackoverflow.com/comment/39429836
type: AcceptedAnswer

http://stackoverflow.com/q/25372321
has comment: http://stackoverflow.com/comment/39565689
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25373007
possible better answer: http://stackoverflow.com/a/25372478
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/39566536
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25373007
has body: The purpose is to display a DIV when you click on a button and then display text inside that DIV that comes from my database. Thing is that data in databse changes, so text inside that div also. I would need a setInterval... with AJAX I'm new in javascript and don't know the good way to go... HTML: &lt;div onClick="showDiv();"&gt; click &lt;/div&gt; &lt;div style="display: none;" id="div"&gt; Info from database: &lt;span style="display: hidden;" id="data1"&gt; DATA 1 &lt;/span&gt; &lt;span style="display: hidden;" id="data2"&gt; DATA 2 &lt;/span&gt; &lt;/div&gt; javascript: function showDiv() { document.querySelector("#div").style.display = "block"; setInterval(function () {getData()}, 1000); } function getData() { $.post( 'process.php', { }, function(data){ if(data == '1'){ document.querySelector("#data1").style.display = "inline"; } else if(data == '2'){ document.querySelector("#data2").style.display = "inline"; } }, 'text' ); return false; } //don't know how to just take data from database without sending by POST or GET. php: &lt;?php SELECT x FROM database if(x == 1) {echo '1';} else if(x == 2) {echo '2';} ?&gt;
has title: Set interval with AJAX
type: Question
has answer: http://stackoverflow.com/a/25372478
tagged with: javascript

http://stackoverflow.com/comment/39398167
has text: If you also want validation you can add a regular expression and "test" it first, something like `/\w\w?\d\d?\w\s?\d\w\w/` could broadly work, but every rule described here http://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom could be encapsulated in a regular expression if you wanted to.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25281753
score: 0

http://stackoverflow.com/comment/39433186
score: 5
type: QuestionComment
comment on: http://stackoverflow.com/q/25282063
type: Comment
has text: Oh damn... sometimes you just need to step back... Beginner's mistake: it is **android.permission.** and not android.permissions. Resolved!

http://stackoverflow.com/a/25338340
has comment: http://stackoverflow.com/comment/39503614
type: Answer
answers question: http://stackoverflow.com/q/25338252
score: 1
accepted answer of: http://stackoverflow.com/q/25338252
upvote count: 1
has body: you don't have to get its width, get its parent width, as I understood parent width will not change, get its width and divide it to 3. that will be what you want
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39466162
has text: Hi, please provide suggestions in javascript as some features are implemented in iOS SDK but not in JS SDK.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25318477

http://stackoverflow.com/q/25285556
has title: How to pass form field value to java function on submit of form?
upvote count: 1
accepted answer: http://stackoverflow.com/a/25285631
possible better answer: http://stackoverflow.com/a/25285746
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25285746
has body: Here is my form: &lt;form id="aform"&gt; &lt;input type="text" id="rollno" name="rollno"&gt; &lt;input type="button" value="show result" onclick="showResultFunction ('someurl.com','divtodisplayresult');&gt; &lt;/form&gt; Question: Can I pass rollno entered in the function onclick as parameter? Like: onclick="showResultFunction ('someurl.com','divtodisplayresult',rollno);
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39404409
answer count: 2
linked to: http://stackoverflow.com/q/11563638
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25285631
favorite count: 0

http://stackoverflow.com/q/25293693
has answer: http://stackoverflow.com/a/25293816
upvote count: 1
tagged with: php
possible better answer: http://stackoverflow.com/a/25293816
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25294351
type: Question
has title: JavaScript Asynchronous Clock from Server Time Stamp
answer count: 2
has body: Currently, I am using an XMLHTTPRequest to get the time and date from an Apache server. The code below shows that... $(document).ready(function() { $("#loadtime").load("getdatetime.php"); setInterval(function() { $("#loadtime").load('getdatetime.php?randval=' + Math.random()); }, 1000); $.ajaxSetup({cache: false}); }); Obviously I do not want to send an http request every second. Below is some code that I am experimenting with. function getTime() { var hr = new XMLHttpRequest(); var url = "getdatetime.php"; var myRandom = parseInt(Math.random() * 999999999); hr.open("GET", url + "?rand=" + myRandom, true); hr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); hr.onreadystatechange = function() { if (hr.readyState === 4 &amp;&amp; hr.status === 200) { var serverTimeStamp = hr.responseText; var displayTime = Date(serverTimeStamp); document.getElementById("clock").innerHTML = displayTime; } }; hr.send(null); return false; } The function above grabs a PHP time stamp via PHP built-in time() function that returns the number of seconds since the UNIX epoch. The PHP time stamp can be conveniently placed inside JavaScript's Date() function. So now I am able to return the server's time via HTTP request. The goal is to send one HTTP request every 5mins, instead of every second. So every 5mins I need to grab the Apache time stamp and then iterate on that time stamp... // Sudo code: // serverTimeStamp += 1000 (milliseconds) // iterate on serverTimeStamp for 5mins // send new HTTP request to get current Apache time stamp // restart iteration, etc... I have already discovered that I have no clue how to iterate upon serverTimeStamp asynchronously. I need the clock to iterate in real time and then sync back up with the server every 5mins. How can this be done? I have done some research on Google but I cannot find a simple explanation, just custom functions and references to Node.js, which I am not using. Any help or suggestions would be much appreciated.
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25294351
tagged with: asynchronous
favorite count: 0

http://stackoverflow.com/q/25240069
has title: How to access the template through the controller in Angularjs
type: Question
upvote count: 0
tagged with: javascript
has body: How to access the template through the controller in Angular Js Thanks.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/39320622
has comment: http://stackoverflow.com/comment/39320347
score: -1
has answer: http://stackoverflow.com/a/25240567
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39320192
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25240567
downvote count: 1

http://stackoverflow.com/q/25318026
has comment: http://stackoverflow.com/comment/39465213
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25318608
type: Question
has title: Color Change on Animation Health Bar
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has body: I'm making a health bar and I wish to use &lt;meter&gt;. I have it working except it doesn't change color as it decreases. I figured I could fix this with an if tree but I don't know how to change the color of the bar when it hits a particular width. Any ideas? Thanks!! FIDDLE: http://jsfiddle.net/Thaikhan/d018xzbj/13/ HTML: &lt;meter id="your_meter" min="0" low="30" optimum="100" high="50" max="100" value="80"&gt; &lt;/meter&gt; &lt;input type="submit" id="byBtn" value="Change" onclick="change()"/&gt; JavaScript: function change(){ setTimeout(function () { var start = $('#your_meter').attr('value'); var end = 55; if (start &gt; 50) { //STARTING FROM GREEN if (end &lt; 50) { //CONTINUE PAST GREEN var css = document.createElement("style"); css.type = "text/css"; css.innerHTML = "#your_meter::-webkit-meter-optimum-value { transition: width 3s; width: 50% !important; }"; document.body.appendChild(css); //CHANGE COLOR AND CONTINUE TO DECREASE///?????????????????? if (end &lt; 30) { //CONTINUE PAST YELLOW } else { //STOP BEFORE YELLOW ENDS setTimeout(function() { var css2 = document.createElement("style"); css2.type = "text/css"; css2.innerHTML = "#your_meter::-webkit-meter-optimum-value { transition: width 3s; width: "+end+"% !important; }"; document.body.appendChild(css2); }, 3000); } } else { //STOP BEFORE GREEN ENDS var css = document.createElement("style"); css.type = "text/css"; css.innerHTML = "#your_meter::-webkit-meter-optimum-value { transition: width 3s; width: "+end+"% !important; }"; document.body.appendChild(css); } }...
has comment: http://stackoverflow.com/comment/39465286
has answer: http://stackoverflow.com/a/25318608

http://stackoverflow.com/a/25263542
type: Answer
has body: Function is a constructor for function. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function When you define a function as an instance of Function constructor, it is not compiled but stored as a runtime string. That's why it shows up as a function definition and not as a function object. They will function the same except because it is compiled at the time of execution, it only has the global closure and has no knowledge of the local closure except for its own local variables.
score: 0
answers question: http://stackoverflow.com/q/25263237

http://stackoverflow.com/q/25343009
has answer: http://stackoverflow.com/a/26411088
upvote count: 1
has comment: http://stackoverflow.com/comment/39511760
score: 1
has comment: http://stackoverflow.com/comment/39513112
has title: jplayer: playing a mp3 from a link on page
type: Question
has comment: http://stackoverflow.com/comment/39514412
has comment: http://stackoverflow.com/comment/40449142
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39528485
favorite count: 0
has comment: http://stackoverflow.com/comment/40448516
tagged with: http://stackoverflow.com/tag/html
has body: I have a Html template which uses jplayer, i know how to add an existing playlist in the player but dont know how to make it play through a link on a page. the theme's link is: http://themeforest.net/item/musik-music-web-application-template/7831557 I tried to contact the developer but he's not active and does not reply. please help,.! also, i checked the comments, there he asked to put a “data-jp-src” attribute on a link. play $(document).on('click', '[data-jp-src]', function(e){ e && e.preventDefault(); var music = {}; music.title = $(this).attr('title'); music.mp3 = $(this).attr('data-jp-src'); myPlaylist.add(music); myPlaylist.play(-1); }); i dont understand this
has comment: http://stackoverflow.com/comment/39514673
type: UnansweredQuestion
tagged with: jplayer

http://stackoverflow.com/q/25383514
upvote count: 2
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25383882
downvote count: 1
has comment: http://stackoverflow.com/comment/39585842
has body: Currently, when the user clicks on a button, several javascript functions get executed. Because every function does some animation (more information on this can be found in the second comment) on the site, I have to execute them one after another so jQuery will not mess up because it started an animation on an element that isn't even loaded / displayed yet. My current solution is to call every function a bit later then the previous one by using setTimeout like this: window.setTimeout(functionA,250); window.setTimeout(functionB,500); This works great in Chrome, but in Firefox things are still executed too fast sometimes. So I'm looking to fix this workaround by telling Javascript to only execute the next function when the previous one has completely finished. I've already read about adding a callback - but I got a lot of functions to call. Do I really have to add a callback to every single function to achieve what I want? Many thanks in advance.
type: Question
score: 1
has answer: http://stackoverflow.com/a/25384126
has answer: http://stackoverflow.com/a/25383959
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: JS/jQuery: Wait for function with animations to be finished
has answer: http://stackoverflow.com/a/25383744
has answer: http://stackoverflow.com/a/25383911
has comment: http://stackoverflow.com/comment/39586018

http://stackoverflow.com/q/25345223
has answer: http://stackoverflow.com/a/42441452
downvote count: 0
tagged with: hapi.js
tagged with: javascript
has answer: http://stackoverflow.com/a/28662857
has answer: http://stackoverflow.com/a/27927850
has answer: http://stackoverflow.com/a/25345674
answer count: 4
possible better answer: http://stackoverflow.com/a/28662857
favorite count: 0
tagged with: plugins
upvote count: 7
has body: I'm approaching to this framework for node.js for several reasons. Simplicity, great modularity and a fast configuration out of the box. I have soon encountered the concept of Pack which I have never seen during my experience in the learning of express.js framework. From the official guide the following example: var Good = require('good'); server.pack.register(Good, function (err) { if (err) { throw err; // something bad happened loading the plugin } server.start(function () { server.log('info', 'Server running at: ' + server.info.uri); }); }); They says about Pack: Packs are a way for hapi to combine multiple servers into a single unit, and are designed to give a unified interface when working with plugins. This concept is weird for me. How many times do we work with different servers in a project? In addition is not clear for me whether I should call pack every time to register a plugins in hapi. Update: This is pre v8 api code, the way to register a plugin has been changed. (call register directly on the server)
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25345674
score: 7
has title: Multiple server instances by using Hapi.js framework
type: Question

http://stackoverflow.com/q/25371748
type: UnansweredQuestion
has body: I created a ng-table like: data = $scope.publications; $scope.tablePublications = new ngTableParams({ page: 1, // show first page count: 20 // count per pages }, { total: data.length, // length of data getData: function($defer, params) { // use build-in angular filter var orderedData = params.sorting() ? $filter('orderBy')(data, params.orderBy()) : data; $defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count())); } }); When searching, a function is called that retrieves info from API and then calls the reloadTable function: $scope.reloadTable = function(publications){ $scope.tablePublications.data = publications; $scope.tablePublications.reload(); $scope.tablePublications.reloadPages(); } Now $scope.tablePublications.data has a new information but .reload() doesn't work and doesn't refresh the table. I change my code for that $scope.search = function(page){ if($scope.searchText!=="" || $scope.searchText !== "undefined") { $scope.isSearch=true; Minisite.searchPublications({search: $scope.searchText, page: page}, function(publications){ $scope.total=publications.total; $scope.publications = publications.publications; $scope.tablePublications.data = {}; $scope.tablePublications.reload(); }); } } Minisite is a factory that retrieve hash from API, and then i reloaded my tablePublications but doesn´t work. I have similar code in other functions and work fine and i dont understand it.
linked to: http://stackoverflow.com/q/23325994
has title: ng-table reload does not work
type: Question
score: 3
tagged with: ngtable
has comment: http://stackoverflow.com/comment/39565426
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25372605
tagged with: module
upvote count: 3

http://stackoverflow.com/q/25280241
has comment: http://stackoverflow.com/comment/39394906
has comment: http://stackoverflow.com/comment/39396416
type: Question
has comment: http://stackoverflow.com/comment/39394875
has comment: http://stackoverflow.com/comment/39395849
has comment: http://stackoverflow.com/comment/39394607
has title: HTML form data to JSON format
has comment: http://stackoverflow.com/comment/39394770
has comment: http://stackoverflow.com/comment/39394612
has comment: http://stackoverflow.com/comment/39395510
tagged with: javascript
has comment: http://stackoverflow.com/comment/39394520
tagged with: jquery
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25280427
has answer: http://stackoverflow.com/a/25280469
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39394460
has comment: http://stackoverflow.com/comment/39394878
has comment: http://stackoverflow.com/comment/39394965
has comment: http://stackoverflow.com/comment/39395448
has body: I am trying to post some data from an HTML form to an webserver. Requirement is, The POST data should be a JSON data. The expected JSON from server is { "version": "1.0.1", "sensors": [ { "sensor": "sensorID", "output": [ { "name": "sensorName", "type": "sensorType" } ] } ] } were sensorID, sensorName, sensorType corresponds to the input fields from HTML form. Others should be as it is. My code is: Create Sensor I am having this output: [{ "name": "version", "value": "1.0.1" }, { "name": "sensors[0][sensor]", "value": "" }, { "name": "sensors[0][output][0][name]", "value": "" }, { "name": "sensors[0][output][0][type]", "value": "" }] Can anyone please Help me out? I am trying hard. But as I am new to this, probably missing something that's why not able to solve this problem. It will be very helpful for me if anyone please guide me regarding this. Thanks in advance.
has comment: http://stackoverflow.com/comment/39394645
has comment: http://stackoverflow.com/comment/39394535
has answer: http://stackoverflow.com/a/25280601
score: 0
has comment: http://stackoverflow.com/comment/39395410
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/25344033
accepted answer of: http://stackoverflow.com/q/25343938
has comment: http://stackoverflow.com/comment/39520576
answers question: http://stackoverflow.com/q/25343938
upvote count: 1
has comment: http://stackoverflow.com/comment/39513194
has body: This is because this has changed context within the _.each. There are a million of posts about it so i won't explain. End you each like this (with a this) to keep context: _.each(this.model.get("library").books, function(book){ var bookView = new BookView({ el: $('#books'), book: book, model: this.model }, this); also look into Underscore's _.bindAll http://underscorejs.org/#bindAll
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39513257
type: Answer

http://stackoverflow.com/a/25389055
has body: Adding newTag.focus() in the "#" handler made it work in Chrome and Firefox (Win) (it didn't before, but did on IE11, just wanted to let you know) Fiddle fork : http://jsfiddle.net/ekxo4ra3/ Does that look OK for what you wanted ?
has comment: http://stackoverflow.com/comment/39597187
has comment: http://stackoverflow.com/comment/39597674
downvote count: 1
score: -1
accepted answer of: http://stackoverflow.com/q/25388735
upvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25388735
type: Answer
has comment: http://stackoverflow.com/comment/39597329

http://stackoverflow.com/q/25363807
has title: FineUploader S3 - Process original + scaled images as group in uploadSuccess endpoint
tagged with: scaling
accepted answer: http://stackoverflow.com/a/25365502
type: Question
has body: I'm using the new FineUploaderS3 scaling functionality, but I have a question about how to handle these (separate upload) results as a group in the uploadSuccess endpoint. After every (scaled) upload of the same file the endPoint gets "called" I know it's possible to set parameters in the uploadSuccess.params like: uploadSuccess: { endpoint: "s3sign.php?success", params: {groupName:"aPerfectGroupName"} }, But there is a problem when a new upload starts. These will get the same groupName at uploadSuccess. Also can't change via $('#element').fineUploaderS3('setUploadSuccessParams', {groupName:"aBetterGroupName"}); callbacks (onComplete, onValidate, ...) because that will also change pending uploads.
answer count: 1
tagged with: javascript
score: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25365502
tagged with: amazon-s3
tagged with: fine-uploader

http://stackoverflow.com/a/25284465
has body: Use type="number" $(this).html("&lt;input type='number' style='width:35px;' value='" + $(this).text() + "' /&gt;"); You can also set restrictions on what numbers are accepted: See Here W3School Input Type: number
score: 0
answers question: http://stackoverflow.com/q/25284327
type: Answer
has comment: http://stackoverflow.com/comment/39402305

http://stackoverflow.com/q/25249154
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/25249305
tagged with: jquery-ui
score: -2
has title: Is it possible to assign a value from local function to a global variable in javascript
tagged with: jquery-mobile
tagged with: javascript
has body: Hey guys I have declared a global variable in my javascript file.Then iam assigning a value to the global variable in a local function.Then when iam trying to access the value of that global variable in other function,damn alert box is showing 'undefined'.Is there any way to access the value of a local variable in other function.I don't want to call the function from another function and send parameters with it.I just want to access the local variable of one function into some another function. Hope someone takes me out of this. Thank you guys and girls. the code var user_glob; var pass_glob; function osmlogin() { var user = document.getElementById('uname').value; var passw = document.getElementById('pwd').value; user_glob = user; pass_glob = passw; if (user == '') { document.getElementById('wrong_pwd').innerHTML = 'Please give your email_id'; } else if (passw == '') { document.getElementById('wrong_pwd').innerHTML = 'Please give your password'; } else { var data = { username: user, pass: passw }; $.getJSON('some url?jsonp=?', data, function (data) { check = JSON.stringify(data['key1']); if (check == 1 &amp;&amp; user != '' &amp;&amp; passw != '') { window.location.href = "#page-dashboard"; } else { // alert(check); document.getElementById('wrong_pwd').innerHTML = 'Wrong Username or Password'; } }); } } now I want to use that global variable in this function function announcement_view() { var user =user_glob; var passw = passw_glob; var data = { username: user, pass:passw }; $.getJSON('some url?jsonp=?', data, function (data) { var check = JSON.stringify(data['key1']); alert(JSON.stringify(data['key1'])); alert(JSON.stringify(data['key2'])); if (check == 0 &amp;&amp; user == '' &amp;&amp; passw == '') { //alert(user_glob); window.location.href = "#page-home"; } }); }
downvote count: 2
has comment: http://stackoverflow.com/comment/39337343
answer count: 1
tagged with: jquery
type: UnansweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/39337444

http://stackoverflow.com/comment/39414672
has text: Yup, I posted that link at the top of my answer ;)
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25290653
score: 1

http://stackoverflow.com/q/25332318
tagged with: javascript
has answer: http://stackoverflow.com/a/25334179
score: 0
possible better answer: http://stackoverflow.com/a/25532948
has comment: http://stackoverflow.com/comment/39492519
has answer: http://stackoverflow.com/a/25532948
tagged with: node.js
has title: NodeJS chat server interacting with non-node hosted html page
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25334179
tagged with: socket.io
tagged with: chat
type: Question
answer count: 2
has body: The node.js chat example is ubiquitous. However, they all serve the static html page with which the chat feature is integrated. What about an html page that is served via apache, php, .net, or other which interacts with a node.js based chat server. How would this be implemented? For instance, the html page contains a form used to login. The form's action points to the node server which provides the authentication and message handling. How does this chat server communicate with the client-side when it is not also providing the static html content?

http://stackoverflow.com/q/25268020
accepted answer: http://stackoverflow.com/a/25268278
score: 0
tagged with: google-chrome-extension
answer count: 1
has title: Show page_action icon always
has body: I'm brand new to Chrome extensions, but I wanted to start messing around with them for the fun of it. I know that it is against convention to always display a page_action icon, however for the purpose of learning I'd like to display it for every tab. I've been doing reading and I'm having a hard time figuring out what's deprecated and what's not. The docs don't seem to note that some methods are deprecated. Here's what I have so far -- it's been a while since I've messed with Javascript so bear with me; this is all very simple stuff. So what would be the easiest way to always show a page_action icon? Am I even close to the right track? Thanks. manifest.json { "manifest_version" : 2, "name": "Hello World", "version": "0.1", "description": "Hello World", "page_action": { "default_icon": "images/blackWhite.jpg", "default_title": "HW!" }, "background": { "scripts": ["scripts/background.js"] } } background.js chrome.tabs.getSelected(null, function(tab { var id = tab.id chrome.pageAction.show(id) }))
has answer: http://stackoverflow.com/a/25268278
type: AnsweredQuestion
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39321957
type: QuestionComment
has text: Why have you chosen to use `this.x` and `this.y` over just using `x` and `y`?
comment on: http://stackoverflow.com/q/25241073
score: 1
type: Comment

http://stackoverflow.com/a/25281625
has body: An alternate way to do this - var myTestDiv = document.createElement('div'); var mystr = '&lt;div id="main"&gt;&lt;/div&gt;'; myTestDiv.innerHTML = mystr; console.log(myTestDiv.querySelector('div#main'));
score: 8
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25281457
upvote count: 8

http://stackoverflow.com/comment/89301120
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/49831124
type: Comment
has text: its working in some case and not working in same case. is anyting I have to care for. although I am using save browser and same version

http://stackoverflow.com/q/25285232
has answer: http://stackoverflow.com/a/68676777
answer count: 7
tagged with: mongoose
tagged with: javascript
linked to: http://stackoverflow.com/q/39988848
has title: Bulk upsert in MongoDB using mongoose
favorite count: 0
has comment: http://stackoverflow.com/comment/39405647
upvote count: 31
linked to: http://stackoverflow.com/q/7934768
has body: Is there any option to perform bulk upserts with mongoose? So basically having an array and insert each element if it not exists or update it if it exists? (I am using customs _ids) When I do use .insert MongoDB returns an error E11000 for duplicate keys (which should be updated). Inserting multiple new document works fine though: var Users = self.db.collection('Users'); Users.insert(data, function(err){ if (err) { callback(err); } else { callback(null); } }); Using .save returns an error that the parameter must be a single document: Users.save(data, function(err){ ... } This answer suggest there is no such option, however it is specific for C# and also already 3 years old. So I was wondering if there is any option to do that using mongoose? Thank you!
has answer: http://stackoverflow.com/a/28081787
tagged with: node.js
tagged with: mongodb-query
has answer: http://stackoverflow.com/a/41907280
has comment: http://stackoverflow.com/comment/39406408
score: 31
has answer: http://stackoverflow.com/a/25286719
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25286719
has answer: http://stackoverflow.com/a/60331010
downvote count: 0
possible better answer: http://stackoverflow.com/a/28081787
has answer: http://stackoverflow.com/a/48360605
type: Question
tagged with: mongodb
has answer: http://stackoverflow.com/a/28180976

http://stackoverflow.com/q/25335776
upvote count: 1
has comment: http://stackoverflow.com/comment/39527779
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has title: jQuery mobile - pagecontainerload event ui parameter empty
has comment: http://stackoverflow.com/comment/39531638
has body: $('body').pagecontainer({ load : function(a,jq){ console.log($.isEmptyObject(jq)) } }); Returns true. That definitely shouldn't be the case, according to the documentation Any ideas what's going on?
answer count: 0
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39531356
tagged with: jquery-mobile
tagged with: javascript
has comment: http://stackoverflow.com/comment/39502688
has comment: http://stackoverflow.com/comment/39524874

http://stackoverflow.com/comment/39585848
comment on: http://stackoverflow.com/q/25383295
score: 0
type: QuestionComment
has text: are you looking for an isolated scope directive?
type: Comment

http://stackoverflow.com/q/25267723
has comment: http://stackoverflow.com/comment/39371789
has title: How to add the image file from the form to the jQuery ajax request
type: UnansweredQuestion
has body: I am working a jQuery file upload helper and I need to understand how can I append the File from the form or the Form data as a whole to the request. I have worked with the ASP.NET code to accept image from the Request and handle the further code, but when I try to use it using jQuery $.ajax() I can't get it to work. I have been though Stack Overflow questions, and I have tried using FormData appending the data from the input[type="file"] (input for the file element). But each time (on the server) the block that is executed that tells me there is no file with the request. Here is the ASP.NET code (UploadFile page) @{ var fileName = "Not running!"; if(IsPost) { if(Request.Files.Count &gt; 0) { var image = WebImage.GetImageFromRequest(); fileName = Path.GetFileName(image.FileName) + " From server"; } else { fileName = "No file attached! From Server"; } } Response.Write(fileName); } The jQuery code is as $(document).ready(function () { $('form input[type=submit]').click(function () { event.preventDefault(); $.ajax({ url: '/UploadFile', data: new FormData().append('file', document.getElementById("image").files[0]), type: 'POST', success: function (data) { $('#result').html('Image uploaded was: ' + data); } }); }); }); I am already scratching my head since I can't get the file content on the serverside. How can I send the file to the server, or the entire form data to the server, anything would be welcome!
type: Question
has answer: http://stackoverflow.com/a/25268003
has comment: http://stackoverflow.com/comment/39371639
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39371615
answer count: 1
tagged with: jquery
tagged with: asp.net
tagged with: ajax

http://stackoverflow.com/comment/72144017
has text: You can omit the delay... `$timeout(function() { console.log($state.current); });`
comment on: http://stackoverflow.com/a/39881860
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/39345657
has text: Great. So this has evolved into a new question, which is how do I send the delete request from jquery haha.
comment on: http://stackoverflow.com/a/25246980
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25268227
has body: You can just put the script into the html. Literally type it there. You don't need js to include js. Also if you do it like that, the script won't actually be run at page load. There are solutions so you can do it (like the one matt r gave), but I strongly suggest avoiding them, unless you have a good reason. If you have any specific reason to do that, specify it so we can take it into consideration.
score: 0
answers question: http://stackoverflow.com/q/25267945
type: Answer

http://stackoverflow.com/comment/39515298
type: QuestionComment
has text: It must work if it is PHP executable file.
score: 0
comment on: http://stackoverflow.com/q/25345308
type: Comment

http://stackoverflow.com/comment/39317856
type: Comment
type: QuestionComment
has text: Why do you need this? `+` is the correct character for spaces in querystring values, when encoded as `application/x-www-form-urlencoded`
comment on: http://stackoverflow.com/q/25238764
score: 0

http://stackoverflow.com/a/25372597
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25372429
upvote count: 1
has body: Demo - The .hidden element is next in the dom, try using next() to select .hidden and toggling it. $('.classclick').click(function(){ $(this).next(".hidden").toggle(400); }); This avoids string concatenation, each loops &amp; extra selectors while making it more readable for you.
type: Answer

http://stackoverflow.com/q/25271967
score: 1
has comment: http://stackoverflow.com/comment/39397810
has comment: http://stackoverflow.com/comment/39418401
downvote count: 0
tagged with: javascript
tagged with: facebook-graph-api
favorite count: 0
tagged with: google-chrome-extension
has body: I'm building a chrome extension that needs to allow user authentication through facebook. I've been following the "manual login flow" since the facebook Javascript SDK doesn't work in extensions. Thus far, I've allowed users to click a link that gets permissions and returns an access token: index.html Sign In with Facebook index.js function onFacebookLogin(){ if (localStorage.getItem('accessToken')) { chrome.tabs.query({}, function(tabs) { // get all tabs from every window for (var i = 0; i < tabs.length; i++) { if (tabs[i].url.indexOf(successURL) !== -1) { // below you get string like this: access_token=...&expires_in=... var params = tabs[i].url.split('#')[1]; // in my extension I have used mootools method: parseQueryString. The following code is just an example ;) var accessToken = params.split('&')[0]; accessToken = accessToken.split('=')[1]; localStorage.setItem('accessToken', accessToken); chrome.tabs.remove(tabs[i].id); console.log(accessToken) userSignedIn = true findFacebookName(); } } }); } } chrome.tabs.onUpdated.addListener(onFacebookLogin); ^ ALL OF THIS WORKS. Everytime a user "logs in" the localstorage.accessToken is updated. Then, I get to the point where I try to retrieve user data by inspecting the token through the api: var client_token = '{MY_CLIENT_TOKEN(NOT CLIENT_ID}' var inspectTokenUrl = 'https://graph.facebook.com/debug_token?input_token=' + localStorage.accessToken + '&access_token=' + client_token function findFacebookName(){ var xhr = new XMLHttpRequest(); xhr.open("GET", inspectTokenUrl, true); xhr.onreadystatechange = function () { if (xhr.readyState == 4) { } } xhr.send(); } But this returns a 190 oauth error. What am I doing wrong? What is the correct way to request the users email address using the access_token?
answer count: 0
type: UnansweredQuestion
upvote count: 1
has title: Getting Facebook to return User Data to Chrome Extension
type: Question

http://stackoverflow.com/a/25281938
type: Answer
has body: Ok, i solved this, by loading a stylesheet right in the beginning setting the sizes of the div, before the stylesheet that set the size of the textarea depending on the div. So i consider this done!
accepted answer of: http://stackoverflow.com/q/25264998
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25264998

http://stackoverflow.com/q/25386965
has body: After setting up the Drupal as this guide says: Drupal-passport I created a simple simple node app to test how it works. It doesn't, I get the InternalOAuthError: Failed to obtain request token error. Going through the strategy.js, I saw that my callbackURL is logging out undefined not exactly sure why. The callbackURL is set in my Drupal app Also preforming a curl -i -XPOST http://extranet.local/rest/system/connect/ gives me exactly what I need Here is my node.js code (keep in mind this is just supposed to test the drupal set up). var express = require('express'); var passport = require('passport'); var dStrategy = require('passport-drupal').DrupalStrategy; var passportDrupal = require('passport-drupal'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser') var session = require('express-session'); var http = require('http'); var app = express(); var server = http.createServer(app); app.use(cookieParser()); app.use(bodyParser()); app.use(session({ secret: 'SECRET' })); app.use(passport.initialize()); app.use(passport.session()); passport.use(new dStrategy({ consumerKey: "emDVp7P2LZFLPcN3cNCjLmrjrhQLnNv6", consumerSecret: "mkbc3UYEuUQLNQRwLWo3B8zEk4ZrErKa", providerURL: "http://extranet.local", resourceEndpoint: "rest/system/connect", // &lt;---- optional. Defaults to `rest/system/connect` callbackURL: 'http://33.33.33.40:8888/auth/drupal/callback' }, function(token, tokenSecret, profile, done) { profile.oauth = { token: token, token_secret: tokenSecret }; done(null, profile); } )); app.get('/', function(req, res) { res.writeHead(200); res.end("This is root"); }); app.get('/auth/drupal', passport.authenticate('drupal'), function(req, res) { // The request will be redirected to the Drupal website for // authentication, so this function will not be called. }); app.get('/auth/drupal/callback', passport.authenticate('drupal', { failureRedirect: '/error' }), function(req, res) { // Successful authentication, redirect home. res.redirect('/s…
accepted answer: http://stackoverflow.com/a/25513500
score: 2
tagged with: drupal-7
downvote count: 0
tagged with: javascript
tagged with: passport.js
has title: Passport.js Module, undefined callbackURL
type: Question
type: AnsweredQuestion
favorite count: 0
has answer: http://stackoverflow.com/a/25513500
upvote count: 2
answer count: 1
tagged with: node.js

http://stackoverflow.com/a/25387154
has body: You are using the same ID for multiple Elements, ID is unique for element on the page. use different IDs. edit: names can be the same. because then the radio buttons are as a group.
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25387081
has comment: http://stackoverflow.com/comment/39593201
has comment: http://stackoverflow.com/comment/39593194
downvote count: 0

http://stackoverflow.com/q/25274896
accepted answer: http://stackoverflow.com/a/25275043
has title: I have a string that needs to be updated with string objects from an array with a varying amount of objects in javascript
type: AnsweredQuestion
has body: So before save I intend to get details of an object and use them in an email that is sent from an app to the customer after they have paid for items. I have an array column in my database that stores strings as objects in the array. Each string object is a bunch of details about a particular item of an order put into one string. This is how I access the array: order.get('fullOrderDetails', [0, 1]) This is fine if my array will always have 2 objects but in this case the amount of objects will always vary. If you look at my code below I have a for loop that loops through objects in the array. I need to some how do this: order.get('fullOrderDetails', [index of objects separated by commas]) dynamically. Parse.Cloud.beforeSave("Dispatch", function(request, response) { // email var order = request.object; mandrill.initialize("API-KEY"); var arrayLength = order.get('fullOrderDetails').length; for (var i = 0; i &lt; arrayLength; i++) { } mandrill.sendEmail({ message: { text: "Your order: " + order.get('fullOrderDetails', [0, 1]) + "has been processed and we will notify you when your order has been dispatched!", subject: "Thank you for your order!", from_email: "order-confirmation@aStore.com", from_name: "aStore.com!", to: [ { email: order.get('email'), name: order.get('name') } ] }, async: true }, { success: function(httpResponse) { response.success(); }, error: function(httpResponse) { response.error("Uh oh, something went wrong"); } }); }); So calling my array objects manually using index numbers is not ideal for me because the amount of objects vary so I need a way to do it dynamically. How do I do this? Thanks for your time.
has comment: http://stackoverflow.com/comment/39385451
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39385297
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25275043

http://stackoverflow.com/comment/39538270
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25272020
has text: @MattDerrick not true see https://github.com/TNT-RoX/android-swipe-shim

http://stackoverflow.com/comment/39376478
score: 1
type: Comment
type: QuestionComment
has text: If you only have to search for specific strings in the URL, you could use `indexOf` instead
comment on: http://stackoverflow.com/q/25270226

http://stackoverflow.com/comment/39592147
score: 0
type: Comment
has text: the biggest problem of all being messing with HTMLElement.prototype,that's a bad practice and there is little reason to do this monkey patching.
type: AnswerComment
comment on: http://stackoverflow.com/a/25379450

http://stackoverflow.com/q/25274410
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39384915
has answer: http://stackoverflow.com/a/25274611
has comment: http://stackoverflow.com/comment/39387379
upvote count: 4
tagged with: css
type: AnsweredQuestion
score: 2
tagged with: video
has comment: http://stackoverflow.com/comment/39384723
has comment: http://stackoverflow.com/comment/39384950
has title: HTML / CSS Video end event issue
downvote count: 2
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39384625
accepted answer: http://stackoverflow.com/a/25274611
has comment: http://stackoverflow.com/comment/39385021
has body: I am currently designing a website. I have everything done but I cannot figure out this last step. Here's the deal: I want to play a video but I want it's z-index to be over the entire website index page. Since the video is not full screen I want the rest of the website to be black. So in a way you could say I want to have an #id that is fully black but has a video playing in the middle and this #id should be over the entire index.html page. After the video is done playing, (maybe 5 seconds), I want it to disappear so that we are back to the index page. I do not want to change the links of my website and have it redirect me to a new page... Can this be done? If you do not understand something please ask and I will clarify. Thanks a lot!!
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39518414
type: QuestionComment
has text: There are a number of projects. https://github.com/paulmillr/es6-shim/ is one of the more popular, and there is of course Traceur if you want any of the language features. es6-shim should have Map.keys()
score: 0
comment on: http://stackoverflow.com/q/25330777
type: Comment

http://stackoverflow.com/comment/39308188
type: Comment
has text: can't seem to get that to work. would you be willing up to update my codepen so i can see what you mean?
type: AnswerComment
comment on: http://stackoverflow.com/a/25233062
score: 0

http://stackoverflow.com/a/25381458
accepted answer of: http://stackoverflow.com/q/25379602
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25379602
score: 0
has body: You are using "onClick" aswell as adding click events with jquery. 1 . I removed the onClick. Your path to the external three.js was wrong and you also told jsfiddle to include it. 2 . I removed the included (framework section) three.js and add the correct github path to the latest three.js (external resources section). 3 . I changed a couple of the class and function calls for the latest three.js. 4 . I changed the way the canvas is being added to the page. 5 . I added cancelAnimationFrame when lightbox is closed. It should now display how you expect. BUT. It will only close the first 'lightbox' as you are creating a new lightbox every time the text is clicked, but only hide it when it is closed. This results in more than 1 lightbox div being in the DOM (but only 1 visible). To correct this I suggest you create the lightbox div when the page loads, hide it, then just add a new scene and show the lighbox when needed and remove the scene and hide the lightbox when appropriate. Here is the JSFIDDLE: http://jsfiddle.net/e72duxwc/4/
type: Answer

http://stackoverflow.com/comment/39594507
has text: Thanks but it should swap always with the first child. fiddle don;t work properly if you click on div_3 it animates well but div_2 goes where div_1 should go. Can u check please
type: Comment
comment on: http://stackoverflow.com/a/25387839
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39316344
type: AnswerComment
type: Comment
has text: Yes I m sorry, this morning is a bit hard :/
comment on: http://stackoverflow.com/a/25237711
score: 0

http://stackoverflow.com/q/25280317
has answer: http://stackoverflow.com/a/25280410
has answer: http://stackoverflow.com/a/25280412
accepted answer: http://stackoverflow.com/a/25280412
has comment: http://stackoverflow.com/comment/39394836
score: 29
has comment: http://stackoverflow.com/comment/39394733
has comment: http://stackoverflow.com/comment/39394706
has comment: http://stackoverflow.com/comment/39394559
type: AnsweredQuestion
duplicate of: http://stackoverflow.com/q/16282879
linked to: http://stackoverflow.com/q/16282879
upvote count: 30
type: Question
has comment: http://stackoverflow.com/comment/39394523
possible better answer: http://stackoverflow.com/a/25280410
tagged with: javascript
has body: 'use strict'; (true, false, 1); Do the parentheses create a single expression out of multiple constituent expressions? I haven't seen this syntax before. Edit: the original code that piqued interest: function AddWatermark(controlName, defaultValue, cssValue) { document.getElementById(controlName).value == "" &amp;&amp; (document.getElementById(controlName).value = defaultValue, document.getElementById(controlName).className = cssValue); //I am interested in this syntax on the RHS of the logical AND operator }
answer count: 3
has comment: http://stackoverflow.com/comment/39394554
has title: JavaScript expressions, comma delimited within parentheses
downvote count: 1
has answer: http://stackoverflow.com/a/25283538
has comment: http://stackoverflow.com/comment/39394623
favorite count: 0

http://stackoverflow.com/comment/39471293
type: QuestionComment
score: 0
has text: that's your problem, you should modify image url with random string, not page.php url, so your page.php should return `<img src="uploads/picture.jpg?r=<?=random()?>"/>`
comment on: http://stackoverflow.com/q/25321175
type: Comment

http://stackoverflow.com/comment/56207092
has text: Oh, wow, that's an awesome idea! Thank you for making it happen - will certainly add it to the toolkit.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/34231620

http://stackoverflow.com/q/25337010
favorite count: 0
has answer: http://stackoverflow.com/a/25337524
type: UnansweredQuestion
upvote count: 1
tagged with: css
downvote count: 2
has answer: http://stackoverflow.com/a/25337417
has body: I want that when I focus on the input tag using tab key, it should not highlight the $ sign and instead keep it static and let the user type the value, and also if user wants to leave it blank then it should show its placeholder along with the static $ sign. This is the markup I'm trying: &lt;div style="width: 40%; float: right;"&gt; &lt;input id="value" type="text" name="value" placeholder="$ Value" value="" required="required" onfocus="this.placeholder = '$ ', this.value='$ '" onblur="this.placeholder = '$ Value'" /&gt; &lt;/div&gt;
type: Question
tagged with: javascript
tagged with: jquery
score: -1
answer count: 3
has title: How to make a static sign of a currency in the input tag
has answer: http://stackoverflow.com/a/25337961
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39345523
comment on: http://stackoverflow.com/q/25253101
score: 1
has text: DOH! missed that. Yes, that should be fine then!
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39396671
type: Comment
type: QuestionComment
score: 0
has text: @pixelbits thx for the link ..I will surely look into it
comment on: http://stackoverflow.com/q/25281090

http://stackoverflow.com/q/25321633
possible better answer: http://stackoverflow.com/a/25321745
has title: Javascript setTimeout and .animate Conflict
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25321745
tagged with: timeout
has body: I am trying to make the page scroll to an image at the bottom, and on the way to scrolling to the bottom, fade in some text. I don't want to fade the text in before the scrolling down, or after the scrolling down (which is what the current code results in). I want a timed event in the middle of an .animate event. HTML loaded with bootstrap A web design demonstration Javascript with jquery $(document).ready(function() { $("body").fadeIn(1000); setTimeout(function(){ $("#text1").fadeIn(2000); },1000); $("html, body, #text1").animate({ scrollTop Here's the fiddle. http://jsfiddle.net/pm27go6s/3/
tagged with: scroll
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25329320
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25329320

http://stackoverflow.com/q/25239675
linked to: http://stackoverflow.com/q/16063394
score: 3
tagged with: oop
has body: I have a class function A() { var that = this; var b = new B(); this.setBSize = function(newSize) { b.setSize(newSize); } }; function B() { var that = this; this.setSize = function(newSize) { ... } } a = new A(); a.setBSize(5); How do I avoid writing the setBSize method? How do I expose the public methods of b automatically? I want to do the call like this a.setSize(5); Also I need a reference to new B(); which is b inside A()
upvote count: 3
has comment: http://stackoverflow.com/comment/39324156
type: Question
has answer: http://stackoverflow.com/a/25239823
tagged with: javascript
has answer: http://stackoverflow.com/a/25239744
has answer: http://stackoverflow.com/a/25239770
downvote count: 0
has answer: http://stackoverflow.com/a/25239715
favorite count: 0
has answer: http://stackoverflow.com/a/25242186
has title: how to expose public methods of member variables in JS
answer count: 5
type: UnansweredQuestion

http://stackoverflow.com/comment/39394447
score: 0
type: Comment
has text: That sounds like a likely explanation. I've already reached out to the creator of the plugin so hopefully he gets back to me. The weird thing is that when I put the video gallery into a regular tab (not a nested tab), it works fine.
type: AnswerComment
comment on: http://stackoverflow.com/a/25277431

http://stackoverflow.com/a/66564476
upvote count: 1
downvote count: 0
score: 1
has body: Try this let oldXHROpen = window.XMLHttpRequest.prototype.open; window.XMLHttpRequest.prototype.open = function(method, url, async, user, password) { console.log({method}); // Show loader this.addEventListener('load', function() { console.log('load: ' + this.responseText); // Hide loader }); return oldXHROpen.apply(this, arguments); }
type: Answer
answers question: http://stackoverflow.com/q/25335648

http://stackoverflow.com/comment/39558626
type: QuestionComment
comment on: http://stackoverflow.com/q/25368799
score: 0
has text: @denisol-jquery is like $.each(results, function (index, items) { var appendData = ""; appendData = appendData + " "; //images are appended using Api // appendData = appendData + " "; $(".mainDiv").append(appendData);
type: Comment

http://stackoverflow.com/comment/39409668
has text: Totally conjecture, but why doesn't `form_before.length` work, where you have your `console.log`?
comment on: http://stackoverflow.com/q/25287723
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25363420
score: 0
has body: I'm answering my own question just to explain that I already have a solution but I'm looking for one using the actual framework, in case that is something I'm missing At the moment I'm doing var containsObject = function ( objectA , objectB) { var _match = true angular.forEach(objectB , function ( value, key ) { //any loop will do if (value !== objectA[key]) _match = false; }); return _match; }; expect( containsObject( newObjectWithMoreGoodies, oldObject ).to.eql(true);
type: Answer
answers question: http://stackoverflow.com/q/25363165

http://stackoverflow.com/q/25233670
upvote count: 2
linked to: http://stackoverflow.com/q/733314
has comment: http://stackoverflow.com/comment/39308191
tagged with: php
score: 2
type: AnsweredQuestion
has body: I am trying to loop through a JSON string that I have gotten from PHP, the problem I am having is that when I try to loop through my string, it doesn't loop through each object instead it loops through each character in the string. I thought the solution to this would be to parse it but no success. var json = JSON.stringify(player.get(url)); console.log(json); json = $.parseJSON(json); for (var key in json) { if (json.hasOwnProperty(key)) { console.log(key + " -&gt; " + json[key]); } } I am getting a perfectly good JSON result, because I have tested it in an online converter - { "id": "1", "username": "Jessica", "password": "password", "age": "100", "size": "100" } However through when I loop through it, the console displays this: 0 -> { index.html:29 1 -> " index.html:29 2 -> 0 index.html:29 3 -> " index.html:29 4 -> : index.html:29 5 -> " index.html:29 6 -> 1 index.html:29 7 -> " index.html:29 8 -> , index.html:29 9 -> " index.html:29 10 -> c index.html:29 11 -> h index.html:29 12 -> a index.html:29 13 -> r Any ideas to why it's not looping through the json object properly?
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/25233780
type: Question
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/20772417
has comment: http://stackoverflow.com/comment/39308196
has title: Looping through json parse loops through each character
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25233780

http://stackoverflow.com/comment/39332719
has text: you can also use ng-if='booleanCheck', the markup wont render if false, thus the validation wont trigger/ form wont submit
type: Comment
comment on: http://stackoverflow.com/a/25246468
type: AnswerComment
score: 0

http://stackoverflow.com/comment/44695834
comment on: http://stackoverflow.com/a/25286719
type: AnswerComment
has text: @zstew The correct place to ask new questions is asking another question rather than commenting on older posts. What you seem to have missed there is the statements made at the end of this answer. If you still don't understand what that means then ask another question.
score: 0
type: Comment

http://stackoverflow.com/q/25324267
tagged with: javascript
has title: I want to show an alert when users close popup
has answer: http://stackoverflow.com/a/25324391
type: Question
has body: I want to show a popup (Google, Twitter etc) and when users close that dialog, I want to show an alert "bye", but that alert does not appear: &lt;script&gt; var openDialog = function(uri, name, options, closeCallback) { var win = window.open(uri, name, options); var interval = window.setInterval(function() { try { if (win == null || win.closed) { window.clearInterval(interval); closeCallback(win); } } catch (e) { } }, 1000); return win; }; var test = function() { alert("bye"); }; openDialog("//google.com", "popup", "scrollbars=no", "test"); &lt;/script&gt;
score: 0
has comment: http://stackoverflow.com/comment/39476962
answer count: 2
tagged with: php
has comment: http://stackoverflow.com/comment/39476769
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39476637
has answer: http://stackoverflow.com/a/25324328

http://stackoverflow.com/comment/39327173
has text: @MattBrowne the OP is using `forEach` and ES6 arrow functions - he has no need for an `indexOf` shim.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25243696
type: Comment

http://stackoverflow.com/q/25354113
has answer: http://stackoverflow.com/a/25354297
possible better answer: http://stackoverflow.com/a/25354450
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25354450
accepted answer: http://stackoverflow.com/a/25354297
tagged with: css
score: 0
answer count: 2
has body: I made a div which has a background image of a face, I have designed div which contains a paragraph, 2 buttons and an input box. I know this question has been asked quite often however my situation is different, I'd like for my div with the background image of a face to be clickable so that the div containing everything else slides out from the left. What is the best method to do this? HTML I like nutella and croissants Send Close CSS div#image { background: url(http://i.imgur.com/PF2qPYL.png) no-repeat; } JQUERY $(document).ready(function(){ $( "#image" ).click(function() { jQuery(this).find("#container").toggle(); }); });
has title: Toggle div on div click horizontally
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39310638
type: AnswerComment
score: 0
type: Comment
has text: @ahaha......never feared the scorpion...Actually one of my favorite delicacy is the scorpion soup...its like eating breaded shrimps.
comment on: http://stackoverflow.com/a/25234774

http://stackoverflow.com/a/25312871
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25312816
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25312816
type: Answer
downvote count: 0
has body: There are many ways for selecting the target element: $(".carouselSelectorRight").click(function() { var select = $(this).prev().children('.carouselSelector'); }); You can also use the closest/parent and find methods: $(this).closest('.carouselBrand').find('.carouselSelector'); If the parent .carouselBrand element have more than 1 .carouselSelector descendant and you want to select the first one of them, you can use the first method: select.first(); // where select is the returned collection by above queries Note that if you want to use the event object you should pass it to your event handler: $(".carouselSelectorRight").click(function(event) {

http://stackoverflow.com/comment/39569027
type: Comment
has text: Sounds fun, but it looks like it might take some work to transfer over the existing databases (I got stuck with a really large project in an area I know nothing about haha). Would it be easier to solve this type of problem/are there any other reasons you'd suggest it?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25373510

http://stackoverflow.com/a/25249407
has comment: http://stackoverflow.com/comment/39338670
has comment: http://stackoverflow.com/comment/39337856
type: Answer
has comment: http://stackoverflow.com/comment/39338234
score: 34
upvote count: 34
has comment: http://stackoverflow.com/comment/39338295
has comment: http://stackoverflow.com/comment/39338099
has comment: http://stackoverflow.com/comment/39338898
has comment: http://stackoverflow.com/comment/39337968
has body: You could just use $index and apply it with ng-if on {{items.currentPoint}}/{{items.endPoint}} Update Based on the comment, you just need css for this just clear the float every nth element. .section > div:nth-of-type(4n+1){ clear:both; } Demo If you are worried about support for older browsers then just add a class on specific condition:- and a rule for .section > div.wrap Demo
has comment: http://stackoverflow.com/comment/39338734
has comment: http://stackoverflow.com/comment/39337991
has comment: http://stackoverflow.com/comment/59585801
has comment: http://stackoverflow.com/comment/39338134
answers question: http://stackoverflow.com/q/25249388
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39338177
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25249388

http://stackoverflow.com/a/25370903
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25356048
type: Answer
accepted answer of: http://stackoverflow.com/q/25356048
has comment: http://stackoverflow.com/comment/54052064
score: 5
upvote count: 5
has body: I resolved this issue. The server I was posting to was apparently expecting a User Agent in the header that I wasn't sending, was throwing a null exception, and returning null. It has since been fixed. Thank you.

http://stackoverflow.com/a/25372518
score: 4
accepted answer of: http://stackoverflow.com/q/25372455
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/25372455
downvote count: 0
type: AcceptedAnswer
has body: Adding [] should allow you to iterate and access the data as parallel arrays. An alternative would be adding and maintaining an index for each "child" and incrementing that. e.g. name="childfirstname[currentIndex]" Each time a row is added, you update and increment a javascript variable containing the current index. &lt;form name="guestform" method="post"&gt; .... &lt;div class="children-part"&gt; &lt;ul&gt; &lt;li&gt;&amp;nbsp;&lt;li&gt; &lt;li&gt; &lt;label&gt;Name:&lt;/label&gt; &lt;input type="text" name="childfirstname[]" /&gt; &lt;li&gt; &lt;li&gt; &lt;label&gt;&amp;nbsp;&lt;/label&gt; &lt;input type="text" name="childlastname[]" /&gt; &lt;li&gt; &lt;li&gt; &lt;label&gt;Gender:&lt;/label&gt; &lt;input type="radio" name="childgender[]" value="M" /&gt; &lt;label&gt;Male&lt;/label&gt; &lt;input type="radio" name="childgender[]" value="F" /&gt; &lt;label&gt;Female&lt;/label&gt; &lt;li&gt; &lt;/ul&gt; &lt;/div&gt; .... &lt;/form&gt;

http://stackoverflow.com/comment/39576769
comment on: http://stackoverflow.com/a/25377560
type: Comment
has text: Cool mate, it works, but i have some small isue, if i dont write anything to input it still throw up some results, i have no idea from where it is it looks like some old catched one but i delete catch and nothing changed, when i press SUBMIT with no input it throw some things Any idea what it can be? p.s. Thumb up for you!
score: 0
type: AnswerComment

jquery-ui
tags question: http://stackoverflow.com/q/25278462
tags question: http://stackoverflow.com/q/25277945
tags question: http://stackoverflow.com/q/25271744
tags question: http://stackoverflow.com/q/25351898
tags question: http://stackoverflow.com/q/25378338
tags question: http://stackoverflow.com/q/25323496
tags question: http://stackoverflow.com/q/25350556
tags question: http://stackoverflow.com/q/25386289
tags question: http://stackoverflow.com/q/25299503
tags question: http://stackoverflow.com/q/25294629
tags question: http://stackoverflow.com/q/25331608
tags question: http://stackoverflow.com/q/25262738
tags question: http://stackoverflow.com/q/25242519
tags question: http://stackoverflow.com/q/25373494
tags question: http://stackoverflow.com/q/25350908
tags question: http://stackoverflow.com/q/25358401
tags question: http://stackoverflow.com/q/25237683
tags question: http://stackoverflow.com/q/25334146
tags question: http://stackoverflow.com/q/25267468
tags question: http://stackoverflow.com/q/25249154
tags question: http://stackoverflow.com/q/25318505
tags question: http://stackoverflow.com/q/25377817
tags question: http://stackoverflow.com/q/25388813
tags question: http://stackoverflow.com/q/25290174
tags question: http://stackoverflow.com/q/25306324
tags question: http://stackoverflow.com/q/25325616
tags question: http://stackoverflow.com/q/25311720
tags question: http://stackoverflow.com/q/25266551
tags question: http://stackoverflow.com/q/25274158
tags question: http://stackoverflow.com/q/25235620
tags question: http://stackoverflow.com/q/25296604
tags question: http://stackoverflow.com/q/25266095
tags question: http://stackoverflow.com/q/25276749
tags question: http://stackoverflow.com/q/25286685
tags question: http://stackoverflow.com/q/25356341
tags question: http://stackoverflow.com/q/25334084
tags question: http://stackoverflow.com/q/25331016
tags question: http://stackoverflow.com/q/25382590
tags question: http://stackoverflow.com/q/25311714
tags question: http://stackoverflow.com/q/25258477
type: Tag
tags question: http://stackoverflow.com/q/25315573
tags question: http://stackoverflow.com/q/25369070
tag name: jquery-ui
tags question: http://stackoverflow.com/q/25302517
tags question: http://stackoverflow.com/q/25366070
tags question: http://stackoverflow.com/q/25240107
tags question: http://stackoverflow.com/q/25262678
tags question: http://stackoverflow.com/q/25388297

http://stackoverflow.com/q/25366018
has body: After getting this answer from aduch: With this regex: /((-|\+)?([0-9]+|)(\.?[0-9]+))/g You can use Array.prototype.reduce like this to sum your numbers up var str = 'Hello +0.50 World Hello 1 World Hello -10 World', re = /((-|\+)?([0-9]+|)(\.?[0-9]+))/g, sum; sum = (str.match(re) || []).reduce(function (prev, current) { if (Object.prototype.toString.call(prev) !== '[object Number]') { prev = parseFloat(prev, 10); } return prev + parseFloat(current, 10); }, 0); // sum should be equal to -8.5 here Note that `str.match(re)` may return `null`, so we just make sure we call `reduce` on an array. I was wondering if it were possible to ignore things in brackets, as well as what is currently there. Here is an example of the strings that will be added together: +0.08 attack damage per level (+1.35 at champion level 18) It current adds everything in the string, which yes - I did ask for, but it doesn't add 0.08 to itself and 1.35 to itself, it merges them together. I'd either like them to be separate, as one is in brackets and one isn't or just to ignore the content within the brackets. (content after "level .." within the brackets should be ignored in all cases)
has title: Further Regex sums
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25366602
linked to: http://stackoverflow.com/q/25362824
score: 0
answer count: 1
tagged with: regex
has comment: http://stackoverflow.com/comment/39552699
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25366602
type: Question

http://stackoverflow.com/comment/39426063
comment on: http://stackoverflow.com/a/25295952
score: 0
type: AnswerComment
type: Comment
has text: You have no explanation here at all.

http://stackoverflow.com/q/25314082
tagged with: css
tagged with: http://stackoverflow.com/tag/svg
type: AnsweredQuestion
has title: How to force child element adherence to `flex: nowrap;` CSS directives
has answer: http://stackoverflow.com/a/25484228
accepted answer: http://stackoverflow.com/a/25484228
has body: I have a couple of d3.js animations on-screen at the same time, each governed by CSS display: flex; and flex: nowrap; directives, the only telling difference between the problematic one (which wraps) and other, correctly-displayed (ie non-wrapping) animations being that: because it has non-svg header and text input elements, it comprises anchoring div or section elements. (As I understand, these, being block-level, theoretically occupy the entire available display width, and so have, in the css file, been 'overridden' with the setting display: inline;. overflowing svg path elements, whose length has now been physically curtailed so as to match the limits of the containing svg:svg element. Frustratingly, the animation steadfastly refuses to be governed by the flex: nowrap; directive. The question: Is there a general approach to ensuring that flex row nowrap behaviour is determined by what is actually visible on-screen, and not by containing (or sibling) block-level elements such as section or div, or wider but overflow: hidden; child svg lines or path content? Note: other questions/answers on this topic relate to text, not section, div or svg. All animations are theoretically governed by the parent flex-flow: row nowrap; setting. The associated widths are such as to allow plenty of free space around each. It would be nice to think the parent flex-flow: row nowrap;, taken together with the svg:svg element's overflow: hidden; and the block-level display: inline; CSS settings would be enough to ensure that no wrapping occurs. I have checked in the inspector, and all dimensions displayed lie within limits required for flex-flow: row nowrap;. The only elements in play are section (or div), text, svg, g, input, ul and li. In practice, something is leading to unwanted wrapping. My feeling is that the block-level elements are the source of the problem. Can you suggest a strategy to avoid this? Failing this, are there alternatives I can use as containers for text input elemen…
type: Question
answer count: 1
tagged with: javascript
score: 0
tagged with: flexbox

http://stackoverflow.com/comment/39421512
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25294564
has text: Synchronous XMLHttpRequest requests should be avoided if at all possible, since they block the UI while waiting for a response (and it is possible to avoid it here, so I would recommend @PitaJ's answer.) Also, if you're going to do it synchronously, you could just use jQuery's `async: false` option.
score: 0

http://stackoverflow.com/q/25234503
has title: jQuery click function not updating
has body: I am trying to create a slideshow plugin, however, when I try to navigate to the left and right the listener's that are attached to the controls aren't updating $.fn.imageOverlay = function () { return this.each(function () { var $this = $(this); $this.click(function () { //load paramters and stuff $.ajax({ //stuff success: function(data) { loadOverlay(data); } }); }); var loadOverlay = function() { jQuery(document).on('click', '.rightCtrl', function () { var id = $(this).data('id'); console.log(id); $.ajax({ type: "POST", url: domain + "loadajax/get_photo_overlay", data: { id: id, type: params.type, criteria: params.criteria }, dataType: 'json', success: function (data) { setData(data); } }); }); }; var setData = function (data) { $('.rightCtrl').attr('data-id', data.controls.right); }; }); })(jQuery); When I click on the div "rightCtrl" it fires but an old data-id is being used. While inspecting the html markup the attribute is updating, but the new values aren't being passed. The issues lies within the function loadOverlay: jQuery(document).on('click', '.rightCtrl', function () { var id = $(this).data('id'); //this is an outdated value }
type: AnsweredQuestion
type: Question
linked to: http://stackoverflow.com/q/7261619
has comment: http://stackoverflow.com/comment/39310026
has comment: http://stackoverflow.com/comment/39310325
upvote count: 1
answer count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25234755
accepted answer: http://stackoverflow.com/a/25234755
tagged with: javascript
favorite count: 0
score: 0

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

http://stackoverflow.com/a/25315868
answers question: http://stackoverflow.com/q/25300034
has comment: http://stackoverflow.com/comment/39464166
upvote count: 33
score: 33
accepted answer of: http://stackoverflow.com/q/25300034
has body: It's perfectly possible in Linux and Windows but not in OSX var elm = element(by.model('myModel')); elm.sendKeys(protractor.Key.chord(protractor.Key.CONTROL, "a")); There is also a non-element variant: browser.actions().keyDown(protractor.Key.CONTROL).sendKeys('a').perform();
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/46753871

http://stackoverflow.com/q/25367820
has comment: http://stackoverflow.com/comment/39556734
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25368161
has comment: http://stackoverflow.com/comment/39556780
has title: HTML is not rendering - Express
type: Question
has comment: http://stackoverflow.com/comment/39556810
has comment: http://stackoverflow.com/comment/39556696
answer count: 1
has body: I'm making a simple blog app for my site and fetching posts from array. When I try to use HTML tags in the posts I'm seeing they are not rendering, rest of page is ok. Posts: {"post_id":1, "post_title":"Title", "post_body":"This is a test text. I'm testing HTML. "} .... Output in the page is : This is a test text. I'm testing HTML. Server-side: var hbs = require('hbs'); // view engine setup app.set('view engine', 'html'); app.engine('html', hbs.__express); app.get('/post/:id', function(req, res) { res.render('post_theme', {post, title etc...}); }); HTML: Page .... {{title}} {{body}} Why HTML is not rendering? (Actually I'm not sure this is Express question, I'm new to Web development.) Solution: Based on Andrew Counts answer I used three brackets and problem is solved. {{{...}}}
has comment: http://stackoverflow.com/comment/39556594
tagged with: javascript
has comment: http://stackoverflow.com/comment/39556598
tagged with: express
score: 0
has comment: http://stackoverflow.com/comment/39556937
has answer: http://stackoverflow.com/a/25368161
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39556556
has comment: http://stackoverflow.com/comment/39556856
tagged with: node.js

http://stackoverflow.com/a/25235082
has comment: http://stackoverflow.com/comment/39311149
type: AcceptedAnswer
downvote count: 0
has body: It's very hard and inefficient to do it by sort alone. You want your frequency counts first. var freq = {}; number.forEach(function(i) { freq[i] = (freq[i] || 0) + 1; }) number.sort(function(a,b) { return (freq[a] - freq[b]) || (a - b); }); // =&gt; [6, 7, 7, 3, 3, 9, 9, 9] If you really, really, really need it in one function call, number.sort(function(a, b) { var afreq = number.filter(function(i) { return i == a; }).length; var bfreq = number.filter(function(i) { return i == b; }).length; return (afreq - bfreq) || (a - b); }); but as I said above, very, very inefficient. EDIT: Thanks to Derek 朕會功夫 for golfing it! EDIT2: Fixed the bug that mixed numbers of same frequency. Thanks again, Derek 朕會功夫!
type: Answer
has comment: http://stackoverflow.com/comment/49918240
has comment: http://stackoverflow.com/comment/39311330
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25235008
has comment: http://stackoverflow.com/comment/39311225
answers question: http://stackoverflow.com/q/25235008
has comment: http://stackoverflow.com/comment/39313918
has comment: http://stackoverflow.com/comment/39334387

http://stackoverflow.com/q/25245370
has comment: http://stackoverflow.com/comment/39330219
type: UnansweredQuestion
tagged with: animation
has answer: http://stackoverflow.com/a/25245556
tagged with: css
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39334980
tagged with: transition
has body: Following advice from this CSS Tricks article, I tried to write some code to induce a CSS transition using JavaScript. (Here's my jsFiddle.) HTML: Play CSS: #button { position: absolute; width: 200px; height: 50px; top: 185px; left: 0px; } .foo { position: absolute; width: 50px; height: 50px; border: 1px dashed black; left: 0px; top: 120px; } .foo.horizTranslate { -webkit-transition: 3s; -moz-transition: 3s; -ms-transition: 3s; -o-transition: 3s; transition: 3s; margin-left: 50% !important; } JavaScript: var foo = document.getElementsByClassName('foo')[0]; function doMove2(){ document.getElementById("button").onclick = function(){ if(this.innerHTML === 'Play'){ this.innerHTML = 'Pause'; foo.classList.add('horizTranslate'); } else { this.innerHTML = 'Play'; var computedStyle = window.getComputedStyle(foo2), marginLeft = computedStyle.getPropertyValue('margin-left'); foo.style.marginLeft = marginLeft; foo.classList.remove('horizTranslate'); } } } Why doesn't this work? Could someone explain the difference between a transition and an animation?
type: Question
has comment: http://stackoverflow.com/comment/39345124
has title: JavaScript induced CSS animation not working
tagged with: javascript
answer count: 2
upvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25245548
has comment: http://stackoverflow.com/comment/39330304

http://stackoverflow.com/comment/70457240
comment on: http://stackoverflow.com/q/25374782
has text: Hi Fhevol, any update for your issue? From my knowledge, your controller constructor should be mark as static or IIS will create new instance of controller per request.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39376272
type: QuestionComment
has text: Yeah Roshan here @ date Picker is there,Itz Working Fine .I want Like From One Date Picker ,if u Select one Date,Automatic it will take up to 7 days,for Getting Week data.i tried this one also takking one date picker, but not able to get...Please suggest me
comment on: http://stackoverflow.com/q/25261730
score: 0
type: Comment

http://stackoverflow.com/q/25332355
has comment: http://stackoverflow.com/comment/39492522
has title: My calculator is not out putting anything and not giving errors in any test?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39492838
has comment: http://stackoverflow.com/comment/39492589
has comment: http://stackoverflow.com/comment/39492679
has comment: http://stackoverflow.com/comment/39492782
type: Question
has comment: http://stackoverflow.com/comment/39493029
tagged with: javascript
has comment: http://stackoverflow.com/comment/39492577
score: 0
upvote count: 1
has body: I have been working on a simple price calculator that determines monthly cost of support based on customer inputs. The customer puts in how many domains and users they have and this tells them our cost. I cannot get it to output a total. http://jsfiddle.net/c8sjadd9/1/ function getUserPrice() { var userPrice = 0; var uPrice = 0; //Get a reference to the form id="users" var theForm = document.forms("priceform"); var useNum = theForm.elements("users"); if (useNum === 1 &amp;&amp; useNum &lt;= 5) { uPrice = 2.00; } else if (useNum &gt;= 6 &amp;&amp; useNum &lt;= 10) { uPrice = 1.75; } else if (useNum &gt;= 11 &amp;&amp; useNum &lt;= 15) { uPrice = 1.50; } else if (useNum &gt;= 16 &amp;&amp; useNum &lt;= 25) { uPrice = 1.25; } else { uPrice = 1.00; } userPrice = theForm() * uPrice(); //finally we return domainPrice return userPrice; } function getDomainPrice() { var domainPrice = 0; var theForm = document.forms("priceform"); var domNum = theForm.elements("domains"); domainPrice = domNum() * 8.00; return domainPrice; } function calculateTotal() { var totPrice = getUserPrice() + getDomainPrice(); //display the result var divobj = document.getElementById('totalPrice'); divobj.style.display = 'block'; divobj.innerHTML = "Your Company's Price is: $" + totPrice; } function hideTotal() { var divobj = document.getElementById('totalPrice'); divobj.style.display = 'none'; } I cannot get it to display the totals and I do not see anhing wrong with it.... Any suggestions?
answer count: 1
downvote count: 1
tagged with: calculator
favorite count: 0
has answer: http://stackoverflow.com/a/25332610
accepted answer: http://stackoverflow.com/a/25332610

http://stackoverflow.com/comment/39428323
score: 0
type: AnswerComment
type: Comment
has text: i thanks u for this script but i don't want this method...i want a simply show button for my background music website, and when i click the image i want to switch to 2nd image and-> mute background music,if i click the 2nd image i want to return showing 1nd image and unmute background music player...
comment on: http://stackoverflow.com/a/25297555

http://stackoverflow.com/q/25273356
has comment: http://stackoverflow.com/comment/39382436
favorite count: 0
tagged with: sketchup
has body: I have an obj file that I would like to try and load using Three.js. I've been trying to get as much information on how to achieve this as possible from the web and my research has led me to utilizing the following script but all I am seeing is a black screen with no error messages in the console. In fact the only output in the console is from the LoaderManager and it seems to be saying that the objects where successfully loaded. (See below:) LoadingManager output: THREE.WebGLRenderer 68 three.min.js:520 Loading: skin.jpg 1 2 app.html:42 Loading: ucd.obj 2 2 app.html:42 This is my app.html file: //Variables var container, stats; var camera, scene, renderer; var mouseX = 0, mouseY = 0; var windowHalfX = window.innerWidth/2; var windowHalfY = window.innerHeight/2; init(); animate(); //Initialisation function init(){ container = document.createElement('div'); document.body.appendChild(container); camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 2000); camera.position.z = 100; //scene scene = new THREE.Scene(); //Light var ambient = new THREE.AmbientLight(0x101030); scene.add(ambient); var directionalLight = new THREE.DirectionalLight(0xffeedd); directionalLight.position.set(0,0,1); scene.add(directionalLight); //Texture var manager = new THREE.LoadingManager(); manager.onProgress = function ( item, loaded, total ) { console.log("Loading: " + item, loaded, total ); }; var texture = new THREE.Texture(); var loader = new THREE.ImageLoader(manager); loader.load('skin.jpg', function(image){ texture.image = image; texture.needsUpdate = true; }); //Model var loader = new THREE.OBJLoader(manager); loader.load('ucd.obj', function(object){ object.traverse(function(child){ if(child instanceof THREE.Mesh){ child.material.map = texture; } }); object.position.y = -80; scene.add(object); }); //Renderer renderer = new THREE.WebGLRenderer(); renderer.setSize(window.innerWidth, window.innerHeight); container.appendChild(renderer.domElement); //Event Li…
has comment: http://stackoverflow.com/comment/39382605
has answer: http://stackoverflow.com/a/25287044
has comment: http://stackoverflow.com/comment/39382399
has comment: http://stackoverflow.com/comment/39382657
tagged with: three.js
has comment: http://stackoverflow.com/comment/39382728
has comment: http://stackoverflow.com/comment/39382830
accepted answer: http://stackoverflow.com/a/25287044
has comment: http://stackoverflow.com/comment/39382548
has comment: http://stackoverflow.com/comment/39382506
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: javascript
has title: OBJ file not appearing in Browser WebGL Three.js
has comment: http://stackoverflow.com/comment/39382589
answer count: 2
possible better answer: http://stackoverflow.com/a/25578155
has comment: http://stackoverflow.com/comment/39382710
has answer: http://stackoverflow.com/a/25578155
downvote count: 0

http://stackoverflow.com/comment/39513811
type: Comment
type: QuestionComment
has text: You are [trying to use Mongo as a relational database](http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/). That way lies madness.
score: 1
comment on: http://stackoverflow.com/q/25344444

http://stackoverflow.com/a/25310582
type: Answer
score: 2
downvote count: 0
has body: I solved my problem using the following script. The trick was to add some tasks to copy object task1: { expand: true, src: ['icons/**'], dest: 'build/' }, module.exports = function (grunt) { // project configuration grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), uglify: { options: { banner: '/* App: &lt;%= pkg.name %&gt; - Date: &lt;%= grunt.template.today("dd-mm-yyyy") %&gt; - Author: &lt;%= pkg.author %&gt; */\n\n' } }, cssmin: { options: { banner: '/* App: &lt;%= pkg.name %&gt; - Date: &lt;%= grunt.template.today("dd-mm-yyyy") %&gt; - Author: &lt;%= pkg.author %&gt; */\n' } }, useminPrepare: { html: 'index.html', options: { dest: 'build' } }, usemin: { html: ['build/index.html'] }, copy: { task0: { src: 'index.html', dest: 'build/index.html' }, task1: { expand: true, src: ['icons/**'], dest: 'build/' }, task2: { expand: true, src: ['img/**'], dest: 'build/' }, task3: { src: 'config.xml', dest: 'build/' }, task4: { src: 'widget.info', dest: 'build/' }, task5: { src: 'config.js', dest: 'build/' }, }, clean: { build: { src: [".tmp"] } } }); // load required modules grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-usemin'); grunt.loadNpmTasks('grunt-contrib-clean'); // task definitions grunt.registerTask('build', [ 'copy:task0', 'copy:task1', 'copy:task2', 'copy:task3', 'copy:task4', 'copy:task5', 'useminPrepare', 'concat', 'cssmin', 'uglify', 'usemin', // build 'clean' // clean temp folders ]); }; Useful resources which help me out: https://www.youtube.com/watch?v=gIbfDxF69c8 grunt-contrib-build&#39; is not in the npm registry How to install grunt and how to build script with it https://github.com/gruntjs/grunt-contrib-copy
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25295678
answers question: http://stackoverflow.com/q/25295678

http://stackoverflow.com/q/25349507
has answer: http://stackoverflow.com/a/25349605
type: UnansweredQuestion
score: 0
linked to: http://stackoverflow.com/q/9009436
tagged with: php
has title: Dynamically Clone DIV based on Select Element
has body: I have a form in which users will be adding passengers to a manifest. Dependent upon how many people may be on a flight, will decide how many DIV's will be displayed to the user (selected from a select element). Sadly, I have browser forums for a few weeks, and tried multiple different ways and adaptations with no avail. Any suggestions? HTML (add_book.php): &lt;?php $status = $data[status]; $hls_num = $data[hls_num]; $hls_id = $data[hls_id]; $hls_name = $data[hls_name]; ?&gt; &lt;script type="text/javascript" src="http://code.jquery.com/jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; var pack_prices = new Array(); &lt;?php $get_packprice = "SELECT * FROM heli_type WHERE type_status = 'active' ORDER BY type_name"; $packprice = mysql_query("$get_packprice"); if ($price = mysql_fetch_array($packprice)) { do { if ($price[type_status] == 'active') {?&gt; pack_prices["&lt;?php echo $price[type_id];?&gt;"]=&lt;?php echo $price[type_cost]?&gt;; &lt;?php } else { } } while ($price = mysql_fetch_array($packprice)); } ?&gt; var num_pass = new Array(); num_pass["1"]=1; num_pass["2"]=2; num_pass["3"]=3; num_pass["4"]=4; num_pass["5"]=5; num_pass["6"]=6; function getPackPrice() { var startPackPrice=0; var theForm = document.forms["book"]; var selectedPack = theForm.elements["bookpack"]; startPackPrice = pack_prices[bookpack.value]; return startPackPrice; } function getNumPass() { var amountOfPass=0; var theForm = document.forms["book"]; var selectedPass = theForm.elements["numpass"]; amountOfPass = num_pass[numpass.value]; return amountOfPass; } function calculateTotal() { var PackPrice = getPackPrice() * getNumPass(); var divobj = document.getElementById('baseamount').value = "$"+PackPrice; divobj.style.display='block'; divobj.innerHTML = "$"+PackPrice; } function hideTotal() { var divobj = document.getElementById('baseamount'); divobj.style.display='none'; } function populate(s1,s2){ var s1 = document.getElementById(s1) var s2 = document.getElementById(s2) …
tagged with: mysql
has comment: http://stackoverflow.com/comment/39522706
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/39565866
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25372458
has text: Well, apart from any other problems, `usersList` is a single element, it's `length` will always be `1` (or `null`, potentially).
type: Comment

http://stackoverflow.com/a/25357633
score: 0
has body: You can use this var getText = $(this).parent().find('td.index'); alert(getText.text()); DEMO
type: Answer
answers question: http://stackoverflow.com/q/25357598

http://stackoverflow.com/comment/39405202
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25285659
score: 0
has text: Nope, didn't try it. I found this: http://stackoverflow.com/questions/17900201/how-to-access-parent-scope-from-within-a-custom-directive-with-own-scope-in-an It's not recommended to access a parent scope directly. Especially regarding scope variable names, generic in directive => should be specific in controller.

http://stackoverflow.com/comment/39455840
comment on: http://stackoverflow.com/a/25313027
has text: So would this technically be a bug in IE 11? It just seems very annoying to have to do this encoding conversion to all these strings just because IE is incompetent.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39555719
comment on: http://stackoverflow.com/q/25367347
has text: Replacing(swap) algorithm is not possible without a placeholder. to swap 2 elements, at least 1 placeholder is a need and a must. However for this example. String it self can be used as a placeholder.(And that is what you did in your edit). Do you need some sort of standalone function? You kinda answered your question with the most basic solution.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25334359
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39497907
has comment: http://stackoverflow.com/comment/39497990
type: Answer
has comment: http://stackoverflow.com/comment/39497857
has body: I believe there are two good ways you can achieve what you want. Use AJAX to load the required options based on user choices (as your second idea suggests) If the list of options is not large you could embed all the options as javascript objects and use javascript to load the appropriate ones based on user choices. ex. http://www.javascriptkit.com/javatutors/selectcontent.shtml The second method has the advantage of faster response from the view point of the user since all the data required is already on the page. You mentioned not being very good with javascript but I don't think there is another way to do what you want except you can live with your first idea.
score: 1
answers question: http://stackoverflow.com/q/25333875

http://stackoverflow.com/a/25374715
has comment: http://stackoverflow.com/comment/39570145
upvote count: 2
has comment: http://stackoverflow.com/comment/39569989
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25374656
answers question: http://stackoverflow.com/q/25374656
has comment: http://stackoverflow.com/comment/39570001
type: Answer
has comment: http://stackoverflow.com/comment/39569972
score: 2
downvote count: 0
has body: Whenever you use Math.random it will make the variable as Number and you trying to have it as a function. Your code should look like this: var userChoice = prompt("Do you choose rock, paper, or scissors?") var computerChoice = Math.random(); if(computerChoice &lt; 0.33) { computerChoice = "Paper"; } else if(0.34 &lt; computerChoice &amp;&amp; computerChoice &lt; 0.66) { computerChoice = "Rock"; } else { computerChoice = "Scissors"; } where now you comparing the random number as A Number and not a function Working Fiddle Updated the code as per @Anthony Forloney

http://stackoverflow.com/q/25348622
upvote count: 1
has title: Use array to show elements
has body: I've got a problem that I can't figure out and was wondering if you good people could help out? I'm building a filter system that uses data options on the tags. The nav elements add to an array when pressed and take that option out of the array when pressed again. You may notice that the first set allows for combination and the date range doesn't. This is intentional. My problem lies with asking the script to show the elements in the #container that match the data tag when pressed - I want to show the li elements within #container that match the data-season="" or the data-date="". in the seasons script this is my problematic piece of script.... if (typeof $("#container li").data('season' == showseason ) ) { $(this).show(); } I've tried various ways but I'm now just going in loops getting more confused with each attempt. HELP :) Jsfiddle Demo
has comment: http://stackoverflow.com/comment/39520797
type: Question
has answer: http://stackoverflow.com/a/25348698
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 1
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39521005
type: UnansweredQuestion

http://stackoverflow.com/a/25287733
upvote count: 4
has body: Your variable in the POST data is defined in formData object with the key of fio. Your PHP to retrieve it should therefore be: $fio = $_POST['fio'];
downvote count: 0
answers question: http://stackoverflow.com/q/25287709
accepted answer of: http://stackoverflow.com/q/25287709
score: 4
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/39313128
type: QuestionComment
has text: judging by the error message, it is obvious that you are running iron-router in your app. Update iron-router and that should work fine.
comment on: http://stackoverflow.com/q/25230924
score: 0
type: Comment

http://stackoverflow.com/q/25353576
has body: i am using a table with different rows and an edit button on each row. This edit button creates a form using ajax / json to fill the form details depending on the row clicked. The problem then comes when creating the ajax for this form. Im using the same method as always, but for some reason the ajax submission is not working on this form and its just going to the process PHP page. Im just wondering if this is because the form is not on the page when the javascript code for the ajax call is loaded? So an example: 1) The page is loaded and included on that page is: 2) I click edit, and the showUserDetailsForm.js creates the form. The form is this: $(' '+ ' Edit User: Close '+ ' '+ ' '+ 'Editing Details for User:'+response.username+' , User ID:'+response.userID+ ' '+ ' '+ ' '+ ' '+ ' '+ ' ').appendTo('body'); 3) I click the submit button, and its correctly returns the JSON i am looking for (updateSuccess). 4) The form is not processed via ajax, its simply going to where its action is. The code for the ajax call on save details is: // JavaScript - Save user details $(document).ready(function(){ // When the form is submitted $(".editUserDetails-form").submit(function(){ $.ajax({ type: "POST", url: "admin/process/saveUserDetails.php", data: $(".editUserDetails-form").serialize(), dataType: "json", success: function(response){ if (response.updateSuccess) { alert('Saved'); } } }); return false; }); }); I cannot see any reasons why that its not working (cant find any errors with class names etc) and there is not errors in the javascript. The only thing i am unsure of is the fact that the form is created AFTER the code is loaded? Thanks!
answer count: 2
possible better answer: http://stackoverflow.com/a/25353628
upvote count: 0
has answer: http://stackoverflow.com/a/25353628
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25353671
type: AnsweredQuestion
has title: Ajax form submission on a form created using jquery
tagged with: http://stackoverflow.com/tag/json
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25353671
tagged with: javascript
score: -1

http://stackoverflow.com/comment/39372428
score: 2
comment on: http://stackoverflow.com/q/25268057
type: Comment
has text: [Convert them into JavaScript date objects](http://stackoverflow.com/questions/8224459/how-to-create-a-date-object-from-string-in-javascript). Then [sort them by date](http://stackoverflow.com/questions/10123953/sort-javascript-object-array-by-date) and [format them as strings again](http://stackoverflow.com/questions/1056728/where-can-i-find-documentation-on-formatting-a-date-in-javascript).
type: QuestionComment

http://stackoverflow.com/q/25315798
accepted answer: http://stackoverflow.com/a/25316024
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25316056
has answer: http://stackoverflow.com/a/25316056
has body: I've developed an anti-spam time trap in my app (yes I know it's not going to be 100% effective, but it's a stopgap measure) that does this: 1) When a page is loaded, populate a hidden input with a timestamp using JavaScript: var timestamp = new Date().getTime() / 1000; 2) When the form is POSTed, use the Python view to check this timestamp against current time -- if it's been less than 5 seconds since the page was loaded, bounce back an exception: import datetime feedback_timestamp = request.POST['feedback_timestamp'].strip() current_timestamp = datetime.datetime.now().timestamp() if current_timestamp - float(feedback_timestamp) &lt; 5: raise Exception("Submitted too quickly after loading!") This works fine on my local development server (i.e. it forces you to wait 5 seconds or else it throws the exception). However, I noticed that once I load it on my production server, the timestamps were about 30 seconds off from one another, even if I submitted the form immediately after loading. It appears that the JavaScript function grabs the time from the local user, while the Python code grabs it from the server so, if they're out of sync, it won't trigger properly. My question is: how do I grab the initial timestamp from the server, instead of the local machine? Is there a JavaScript function that does this? Or do I need to populate the hidden input using the Python backend instead? If the latter, things are a bit complicated because this is all being done in my base.html, which is never loaded directly by any of my views (i.e. it's used to extend numerous other views that I use). How would I pull a value from the Python backend without using a view associated with the page?
tagged with: datetime
tagged with: django
tagged with: python
has answer: http://stackoverflow.com/a/25316024
has title: Loading timestamp upon page load and comparing it to timestamp upon form submit
type: AnsweredQuestion
score: 0
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39461346

http://stackoverflow.com/comment/39337636
comment on: http://stackoverflow.com/q/25249266
has text: P.S. With standards mode, `JSON.parse` works in IE8+ http://caniuse.com/#feat=json
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25269944
score: 1
tagged with: forms
has comment: http://stackoverflow.com/comment/39378002
has comment: http://stackoverflow.com/comment/39377819
upvote count: 1
accepted answer: http://stackoverflow.com/a/25270175
has comment: http://stackoverflow.com/comment/39377509
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25270175
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: JQuery running only on click
downvote count: 0
tagged with: dynamic
has comment: http://stackoverflow.com/comment/39376241
type: Question
has body: I have a question. So my goal is to create a dynamic form and I am using: http://jsfiddle.net/liammccann1992/9jPcP/5/ as a basis for my form. You click on the check box and radio buttons appear. I understand the code - but my issue is, or what I believe it is, is that the hosting service I use for my site runs JRE 1.6. The root issue is when I host on my PC and open my page in IE (yes I know - IE is the worst but I do not have a choice) the query works fine - I select the box the radio buttons appear instantaneously - I deselect and they disappear. BUT. When I run it on my host server the radio buttons only appear once I click off the checkbox. - specifically check the box and click some where else on the screen then the radio buttons appear. I have tried: $(document).ready(function ds() { var displayVariableExhOptions = ""; var displayText = ""; if (document.input.sequenceOP14.checked) { displayText += "Checkbox 1 is checked"; displayVariableExhOptions += "&lt;input type='radio' name='exhOptions' id='sequenceOP15' onChange='displaySequence()' &gt;" + "Radio Box 1&lt;br/&gt;" + "&lt;input type='radio' name='exhOptions' id='sequenceOP16' onChange='displaySequence()' &gt;" + "Radio Box 2&lt;br/&gt;" } document.getElementById("variableSpdExhOptions").innerHTML = displayVariableExhOptions; document.getElementById("displayText").innerHTML = displayText; }); But then it stops working altogether. Any ideas?

http://stackoverflow.com/comment/39523625
comment on: http://stackoverflow.com/q/25348842
type: Comment
type: QuestionComment
score: 1
has text: re `.triggerHandler()` - yes as *undefined* said. Probably not an issue here, but worth bearing in mind, "`.triggerHandler()` only affects the first matched element".

http://stackoverflow.com/q/25344709
score: 1
upvote count: 1
type: Question
has title: thymeleaf js source url
tagged with: javascript
tagged with: thymeleaf
has answer: http://stackoverflow.com/a/25363339
answer count: 1
downvote count: 0
favorite count: 0
has body: I'm trying to develop a web application with Thymeleaf and I've created an html page that uses an external JavaScript file to change an image URL.But the standard syntax URL: document.getElementById("im1").src="images/img1.jpg" ; does not work.Everything else in the JavaScript code works fine.What kind of URL syntax should I use?Thanks in advance.
type: UnansweredQuestion

http://stackoverflow.com/q/25286299
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39411397
tagged with: node.js
has comment: http://stackoverflow.com/comment/39407331
has comment: http://stackoverflow.com/comment/39407289
answer count: 0
has comment: http://stackoverflow.com/comment/39405920
score: 1
type: Question
tagged with: javascript
tagged with: express
has comment: http://stackoverflow.com/comment/39406764
has comment: http://stackoverflow.com/comment/39407201
upvote count: 1
downvote count: 0
has body: When I make an ajax request with POST method and the below route: router.post('/shows', function(req, res){ model.find({}, function(sent, recieved){ res.contentType('json'); res.send({ some: JSON.stringify({response:'json'}) }); }); }); I get error 500, When I use ajax request with GET method and the below route router.get('/shows', function(req, res){ model.find({}, function(sent, recieved){ res.contentType('json'); res.send({ some: JSON.stringify({response:'json'}) }); }); }); it works. I make an ajax request with jQuery: $.ajax({ type: "POST", url: "/shows", dataType:"json" }) .done(function( done ) { console.log(done) }); My console says: express deprecated res.send(status, body): Use res.status(status).send(body) instead node_modules/kraken-js/middleware/500.js:27:17 Any ideas why my post route is not returning data properly?
favorite count: 0
has comment: http://stackoverflow.com/comment/39412000
has title: Ajax request with GET works but not with POST

http://stackoverflow.com/comment/39481623
comment on: http://stackoverflow.com/q/25325181
score: 0
type: Comment
type: QuestionComment
has text: $http returns a promise. You can just use that one instead of making a new one.

http://stackoverflow.com/a/25299162
has comment: http://stackoverflow.com/comment/39488493
score: 2
has comment: http://stackoverflow.com/comment/39430334
downvote count: 0
has comment: http://stackoverflow.com/comment/39430277
has comment: http://stackoverflow.com/comment/39430252
has body: It is complaining that nextSibling does not exist. You must code defensively. $('br').each(function () { if (!this.nextSibling) { return; } var nodeValue = this.nextSibling.nodeValue.trim(); var invalid = ['', '作詞', '作曲', '編曲', '監製']; if (invalid.indexOf(nodeValue) !== -1) { $(this.nextSibling).remove(); $(this).remove(); } }); Note that my usage of Array.indexOf exists for Internet Explorer 9+. So if you need to support IE8 you must use a polyfill or a different implementation.
accepted answer of: http://stackoverflow.com/q/25298629
upvote count: 2
answers question: http://stackoverflow.com/q/25298629
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39502381
has comment: http://stackoverflow.com/comment/39473817
type: Answer
has comment: http://stackoverflow.com/comment/39456208

http://stackoverflow.com/comment/39385903
score: 0
type: AnswerComment
type: Comment
has text: No problem. It's all sorted out now.
comment on: http://stackoverflow.com/a/25255787

http://stackoverflow.com/comment/39386036
type: QuestionComment
comment on: http://stackoverflow.com/q/25275364
score: 2
has text: As soon as you `return` once, that's it - your function stops. You need to remember each word somehow, then return the whole thing at the end.
type: Comment

http://stackoverflow.com/comment/39556910
type: QuestionComment
has text: @tcooc I've considered pagination/infinite scrolling, but how would that work for when I have two tables in parallel for comparing purposes?
comment on: http://stackoverflow.com/q/25367834
score: 0
type: Comment

http://stackoverflow.com/comment/39524915
has text: The users monitor resolution will never change even on resize.
comment on: http://stackoverflow.com/q/25350742
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25310092
has body: I am trying to create a map with angular app of mine to show the coordinates on the map. These coordinates are obtained from my api and is displayed on a detailed page. But the HTML code is giving me error: Uncaught Error: 10 $digest() iterations reached. Aborting! HTML: zoom All of this code is showing the above error. How can I fix this? below is my javascript, overall I have a list of places, then a user clicks on the place and the details of the place. The page also allows user to add a category to the page. So here is the whole Controller linking to the page where this map is located.: $http.get('http://94.125.132.253:8000/getuncategorisedplaces').success(function (data, status, headers) { $scope.places = data; console.log(data); $scope.message = 'Uncategorised places'; }) $scope.id = $routeParams.id; $scope.showplace = function(id) { $http({method: 'GET', url: 'http://94.125.132.253:8000/getitemdata?ID=' + $scope.id}). success(function(data, status, headers, config) { $scope.place = data; //set view model console.log(data); console.log(id); $scope.view = 'templates/detail.html'; }) .error(function(data, status, headers, config) { $scope.place = data || "Request failed"; $scope.status = status; $scope.view = 'templates/detail.html'; }); } $scope.showplace(); $scope.map = function(){ $scope.zoom = 13; } $scope.map(); $scope.meta = function () { $http.get('http://94.125.132.253:8000/getmetas').success(function (data, status, headers) { $scope.metas = data; console.log($scope.category); console.log(data); $scope.message = 'List of Uncategorised places'; }) } $scope.meta(); $scope.meta1 = function (data, status, headers) { var formdata = { 'cat': $scope.cat, } var inserturl = 'http://94.125.132.253:8000/getcategories?meta=' + formdata.cat; return $http.get(inserturl).success(function (data, status, headers) { $scope.categories = data; console.log(formdata.cat); console.log(data); }); }; $scope.$watch('cat', function (newvalue) { $scope.meta1(); }); $scope.meta2 = f…
has title: Google maps showing Uncaught Error: 10 $digest() iterations reached. Aborting!; angular app
has answer: http://stackoverflow.com/a/25310492
type: Question
linked to: http://stackoverflow.com/q/20355968
answer count: 2
tagged with: google-maps
tagged with: javascript
has answer: http://stackoverflow.com/a/25314448
downvote count: 0
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25314448
upvote count: 1
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/25310492

http://stackoverflow.com/q/25292441
score: 0
has body: I use this code in order to GetUserMedia() and take a snapshot. I would like the camera to turn off after the snap-shot is taken, any tips on how to accomplish this? $("#btnSaves").click(function () { var video = document.querySelector('#webcam'); var button = document.querySelector('#screenshot-button'); var canvas = document.querySelector('#screenshot-canvas'); var ctx = canvas.getContext('2d'); navigator.getUserMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia); if (navigator.getUserMedia) { navigator.getUserMedia ( { video: true }, function (localMediaStream) { video.src = window.URL.createObjectURL(localMediaStream); }, onFailure); } else { onFailure(); } button.addEventListener('click', snapshot, false); function snapshot() { canvas.width = video.videoWidth; canvas.height = video.videoHeight; ctx.drawImage(video, 0, 0); } });
answer count: 1
tagged with: getusermedia
has answer: http://stackoverflow.com/a/25292905
accepted answer: http://stackoverflow.com/a/25292905
type: AnsweredQuestion
type: Question
has title: Turn of webcam after snapshot
tagged with: javascript

http://stackoverflow.com/comment/39561470
comment on: http://stackoverflow.com/a/25368944
type: Comment
score: 1
type: AnswerComment
has text: I'm not sure this answers the question exactly. I'm trying to detect blur from a div (which may contain some inputs), onto any other element, text node (click, focus on another input, move to another window, e.t.c.)

http://stackoverflow.com/q/25306249
type: Question
accepted answer: http://stackoverflow.com/a/27023977
tagged with: javascript
tagged with: jquery
downvote count: 0
answer count: 1
tagged with: bpopup
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/27023977
score: 2
type: AnsweredQuestion
has body: Callback event is not beinf triggerd on popup close via either modal ,close button and esc i have tried adding it in document ready and also on click trigger noen of them worked $('.flipvideowrap').bind('click', function(e) { e.preventDefault(); $('#element_to_pop_up').bPopup({ appendTo: 'form' , zIndex: 1001 , easing: 'easeOutBack' , speed: 450 , transition: 'fadeIn' , appendTo:'body' , closeClass: 'b-close' , modalClose: true , modalColor: '#fff' , model: false ,escClose:true , position: ['auto', 42] //x, y }); $("video").trigger("play"); $('#element_to_pop_up').bPopup({ onClose: function(){ console.log('closed'); var myPlayer = videojs('look_video'); myPlayer.pause(); }}); });
has title: bpopup onClose callback event not working

http://stackoverflow.com/q/25316629
has title: How to get data attribute in javascript -- not working on ios safari browser
has comment: http://stackoverflow.com/comment/39464272
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/39495717
upvote count: 2
has body: I'm unsuccessful at extracting a data attribute using javascript jQuery code running under ios safari (on my iPad). The code I have works fine on desktop browsers. HTML &lt;div id="mydiv" data-mine="test"&gt;&lt;/div&gt; Javascript (jQuery) console.log($('#mydiv').data("mine")); the log for my ios Safari shows undefined whereas the log for desktop Chrome says test as it should. I've tried some variations like console.log($('#mydiv').data().mine); and console.log($('#mydiv').dataset.mine); but those have not worked any better.
has answer: http://stackoverflow.com/a/25316693
answer count: 1
tagged with: safari
accepted answer: http://stackoverflow.com/a/25316693
has comment: http://stackoverflow.com/comment/39463974
has comment: http://stackoverflow.com/comment/39462751
has comment: http://stackoverflow.com/comment/39463126
score: 2
downvote count: 0
tagged with: ios
has comment: http://stackoverflow.com/comment/39462503
has comment: http://stackoverflow.com/comment/39462526
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25377771
favorite count: 0
tagged with: page-break
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39575506
answer count: 0
score: 1
upvote count: 1
type: Question
has title: How to detect if a dynamic table overflows in a print page for manual page breaking
tagged with: javascript
has body: I successfully applied page breaks between each table but I want to do it ONLY if the dynamic table overflows the A4 print page. How do I detect if my table has enough height to check when I should apply my page break? This is how I use it: @media all { .pagebreak { display: none; } } @media print { .pagebreak { display: block; page-break-after: always; } } &lt;div class="pagebreak"&gt;
downvote count: 0
has comment: http://stackoverflow.com/comment/39576024
tagged with: jquery

http://stackoverflow.com/a/25354191
has comment: http://stackoverflow.com/comment/39532439
has body: I am guessing your app.js is never included. Guessing it should be added below this:
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25319657

http://stackoverflow.com/comment/39409432
comment on: http://stackoverflow.com/a/25287413
type: Comment
score: 0
type: AnswerComment
has text: @Bhushan....I want that toggle should work on two or more tables here when i click on view more its expanding the both tables. i mean that tables are appearing multiple times on different sections each have seprate view more link..ex http://jsfiddle.net/rnwr07ar/4/ here toggle is not working for second section

http://stackoverflow.com/comment/39477289
score: 2
comment on: http://stackoverflow.com/a/25323169
has text: @Cheejyg What we would like to match is a `aaa.bbb(.ccc.ddd.eee...)` sequence. I did this by quoting the characters as `[\w-]+` (any Word Character or hyphens), having another group as the characters with a dot `(?:[\w-]+\.)`, and quantify it to allow matching more than one time. `+`.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25268297
has comment: http://stackoverflow.com/comment/39372885
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25268402
tagged with: regex
has comment: http://stackoverflow.com/comment/39373177
has comment: http://stackoverflow.com/comment/39372912
has body: I have a website page that we use which tests specific functions across an application of ours. It returns with "Success" on each line item of the site, for example: Server1Name Connection: Success Process 1: Success Process 2: Success Server2Name Connection: Success Process 1: Success Process 2: Success Server3Name Connection: Success Process 1: Success Process 2: Success What i'd like to do is find the word Success, 9 times on the page. What I've found thus far (in JavaScript) is: ((.|\n)*)(Success) That matches the word Success throughout the page, including line breaks, etc however when I add: {9} to the end, to look like: ((.|\n)*)(Success){9} it stops working. Any thoughts? Is there a better way to do this?
has answer: http://stackoverflow.com/a/25268642
type: Question
has title: Regex that matches a word x times on a website
tagged with: javascript
has answer: http://stackoverflow.com/a/25268852
score: 0
answer count: 3

http://stackoverflow.com/a/25249496
has comment: http://stackoverflow.com/comment/39421836
type: Answer
has body: Solution 1 var TodoView = Backbone.View.extend({ tagName: 'span', ...}) var x=new TodoView ({className:'sample'}); Solution 2 Use a template! var TodoView = Backbone.View.extend({ template="&lt;span class=&lt;%-className%&gt;&gt;Some Stuff Goes Here&lt;/span&gt;", ... render:function(){ var $ele=$(_.template(this.template,{className:'sample'})); this.$el.replaceWith($ele); this.$el=$ele; this.delegateEvents(); //inbuilt-method, to re-bind all event handlers });
answers question: http://stackoverflow.com/q/25249046
score: 0

http://stackoverflow.com/q/25337738
type: Question
has comment: http://stackoverflow.com/comment/39502668
has answer: http://stackoverflow.com/a/25337870
tagged with: javascript
has comment: http://stackoverflow.com/comment/39502584
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39502502
has comment: http://stackoverflow.com/comment/39502507
has comment: http://stackoverflow.com/comment/39502583
accepted answer: http://stackoverflow.com/a/25337870
linked to: http://stackoverflow.com/q/750486
type: AnsweredQuestion
has title: Anonymous functions, scope and variables
has body: function UpgradeShop(){ var selectedIndex; var category_btns = []; for(var i = 0; i &lt; 5; i++){ category_btns[i] = new Button(38, 68 + i * 75, 284, 70); category_btns[i].action = function() { selectedIndex = i; // ? draw_ui(); // ? }; } this.draw_ui = function(){ ... } } I have a custom class named Button and I want to create 5 of them. I gave them each an action variable that executes when a click is detected. The variable selectedIndex as well as the method draw_ui are found in the class that I'm declaring these functions in, not the Button class. I noticed that simply calling draw_ui() cannot be found and this.draw_ui() tries to find the method within the Button class. How do I assert that the function calls and variable assignments get directed towards the defining class?

http://stackoverflow.com/q/25319270
upvote count: 1
type: Question
has title: AngularJS Data Binding is not happening
tagged with: javascript
has answer: http://stackoverflow.com/a/25319361
answer count: 2
downvote count: 0
has body: I am just playing around with AngularJS and I wrote a small piece of code which I have shared here. But for some reason, the binding of data doesnt happen. Here is the HTML and JS code for those who do not want to go to the plucker site. first.html First Angular JS Name: Message {{heading + message}} first.js var firstApp = angular.module('firstApp',[]); firstApp.controller = ('FirstController',function($scope) { $scope.first = "Some"; $scope.last = "one"; $scope.heading = "Message: "; $scope.updateMessage = function() { $scope.message = 'Hello' + $scope.first + ' ' + $scope.last + '!'; }; }); In the HTML, I am using express to redirect calls to its appropriate places node_server.js var express = require('express'); var app = express(); app.use('/', express.static('./static')). use('/images',express.static('./images')). use('/lib',express.static('./lib/angular-1.2.22')); app.listen(8080); The output is showing {{message + heading}}. Does anyone have any ideas why this wouldnt work?
favorite count: 0
possible better answer: http://stackoverflow.com/a/25319526
tagged with: angularjs
has answer: http://stackoverflow.com/a/25319526
accepted answer: http://stackoverflow.com/a/25319361
type: AnsweredQuestion
tagged with: data-binding
score: 1

http://stackoverflow.com/comment/39316741
has text: If you want to look at the MailMerge option then I suggest that you start with http://www.gmayor.com/graphics_on_labels.htm (but you already have your graphic, so you can ignore the stuff about WordArt). But it's not easy to get the layout correct, and you will need control over the layout of your first .docx to ensure it can be used as a MailMerge data source.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25231724

http://stackoverflow.com/comment/39311114
type: Comment
score: 0
has text: Why do the 3s come before the 7s in the result? Should numbers that occur the same number of times be sorted in ascending order?
comment on: http://stackoverflow.com/q/25235008
type: QuestionComment

http://stackoverflow.com/comment/39586210
has text: What version of jQuery are you using?
comment on: http://stackoverflow.com/q/25383541
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25252698
score: 0
has body: You have toe escape your characters within the html attributes, you can use somthing like underscores escape or write your own http://underscorejs.org/#escape So what you'll need to do is $('&lt;a href="javascript: void(0)" xml = "' + escape(MapLayerSourceInfo) + '"onclick=" EditXmlDataEditor(this)"&gt;Edit&lt;/a&gt;').appendTo(container); Where escape is something like: function escapeHTML(s) { return s.replace(/&amp;/g, '&amp;amp;') .replace(/"/g, '&amp;quot;') .replace(/&lt;/g, '&amp;lt;') .replace(/&gt;/g, '&amp;gt;'); } Basically any xml characters in the dom will be interpreted as such and the browser will try fix the dom because they are part of it so if you escape them you should be fine. Don't worry any js like $("selector for your link").attr("xml") will return the orginal xml.
type: Answer
answers question: http://stackoverflow.com/q/25252646

facebook
tags question: http://stackoverflow.com/q/25318260
type: Tag
tags question: http://stackoverflow.com/q/25241836
tags question: http://stackoverflow.com/q/25328985
tags question: http://stackoverflow.com/q/25241099
tags question: http://stackoverflow.com/q/25345654
tags question: http://stackoverflow.com/q/25351629
tags question: http://stackoverflow.com/q/25313299
tags question: http://stackoverflow.com/q/25267489
tags question: http://stackoverflow.com/q/25300185
tags question: http://stackoverflow.com/q/25347551
tags question: http://stackoverflow.com/q/25299807
tags question: http://stackoverflow.com/q/25359006
tag name: facebook
tags question: http://stackoverflow.com/q/25282315
tags question: http://stackoverflow.com/q/25244191
tags question: http://stackoverflow.com/q/25267747
tags question: http://stackoverflow.com/q/25232497
tags question: http://stackoverflow.com/q/25336277
tags question: http://stackoverflow.com/q/25373350
tags question: http://stackoverflow.com/q/25330627
tags question: http://stackoverflow.com/q/25319926
tags question: http://stackoverflow.com/q/25377762
tags question: http://stackoverflow.com/q/25232342
tags question: http://stackoverflow.com/q/25257853
tags question: http://stackoverflow.com/q/25318682
tags question: http://stackoverflow.com/q/25373824
tags question: http://stackoverflow.com/q/25320844
tags question: http://stackoverflow.com/q/25315316
tags question: http://stackoverflow.com/q/25356728

http://stackoverflow.com/comment/39519704
type: QuestionComment
comment on: http://stackoverflow.com/q/25347857
has text: @TJ- it is a complicated issue. the client, who will use the application, is in different zone that the server. (there are 1.5 hours different between them). sure I didn't deploy the application yet, it is in the development stage
score: 0
type: Comment

http://stackoverflow.com/a/25266355
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39369172
answers question: http://stackoverflow.com/q/25266303
has body: Horrible code, but put the name in the tr and it will hide everything. HTML Link: JS document.getElementsByName('link')[0].style.display='none' Note: This example uses your code and is not how I would do it. jQuery is your friend. Edit: Reverted back to first version if that's what you need, but I wouldn't put a name attribute in a tr tag, you're better off using ID.
accepted answer of: http://stackoverflow.com/q/25266303

http://stackoverflow.com/comment/39311166
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25234981
has text: i've found that many designers don't realize how much some CSS effects penalize page rendering and scrolling: especially box-shadow, rgba colors, opacity, and text-shadow.
type: Comment

http://stackoverflow.com/comment/39870991
score: 0
type: AnswerComment
has text: @ericmaxfield Awesome, let me know if it worked for you.
type: Comment
comment on: http://stackoverflow.com/a/25439464

jquery-widget-factory
tag name: jquery-widget-factory
type: Tag
tags question: http://stackoverflow.com/q/25388988

http://stackoverflow.com/comment/43053946
type: Comment
has text: If the real ga ever arrives, it will pick things up from this queue, and executes them. If there's no ga planned at all, why are we discussing this code in the first place?
comment on: http://stackoverflow.com/a/25249435
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39323033
has text: There's only one 'tbody' in a table and you are using `each` for that makes no sense for me. (this makes slow too)
score: 1
comment on: http://stackoverflow.com/q/25241724
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25308102
has body: I am using about 10 flexsliders in a page. On loading of page all sliders will be hidden, and it will show on clicking of some element. My problem is the slider is not working. I found an element css on slider ul width: 2000%; transition-duration: 0s; transform: translate3d(-440px, 0px, 0px); If I remove that transform: translate3d(-440px, 0px, 0px); , the slider works fine. for calling slider am using the following code $("#p171 .slider").flexslider({ animation:"slide", slideshow:false, directionNav:false, controlNav:true, animationSpeed:600 });
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/39446435
upvote count: 1
has comment: http://stackoverflow.com/comment/39447097
type: Question
has title: Element css causes hiding slider items in Flexslider
tagged with: javascript
tagged with: jquery
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39446656
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39446544
tagged with: flexslider
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39447028
tagged with: css

http://stackoverflow.com/a/25303441
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39437936
accepted answer of: http://stackoverflow.com/q/25303386
has comment: http://stackoverflow.com/comment/39437884
answers question: http://stackoverflow.com/q/25303386
type: Answer
has body: Instead of sending (invalid) HTML to the client, use a structured data format, such as JSON. &lt;?php header("Content-Type: application/json"); $data = Array($number1, $number2); print json_encode($data); exit; In the JavaScript, jQuery will now populate data with an array.
score: 2

http://stackoverflow.com/comment/39511300
type: Comment
comment on: http://stackoverflow.com/a/25340572
has text: ow! it seems AJAX can't send and recieve data from another server. right? if it is, AJAX approach fails for me.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39422832
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25295087
has text: @n00b I did use JSON.parse but turned out no output was shown

http://stackoverflow.com/q/25264209
tagged with: jquery
type: Question
has answer: http://stackoverflow.com/a/25264593
tagged with: http://stackoverflow.com/tag/html
has title: Fixed column width on Datatables
tagged with: css
has answer: http://stackoverflow.com/a/44649228
has answer: http://stackoverflow.com/a/25264500
score: 0
has body: I have a table that is empty until the user do some actions. The problem is that when the table is empty, the column have one width and when the table has content (some inputs on td) the width changes. What i want is to keep the column size fixed, that is, the same column size when the table is empty and when it has content. The following code shows de Datatable configuration. That widths shown are what i need but, for example, when the table is empty, the first column has width of 114px tabla = $('#tabla').DataTable({ language: { url: '/recursos/estilos/DataTables-1.10.1/js/locale/es_AR.json' }, "bSort": false, "bAutoWidth": false, aoColumns : [ { "sWidth": "104px"}, { "sWidth": "263px"}, { "sWidth": "105px"}, { "sWidth": "105px"}, { "sWidth": "105px"}, { "sWidth": "105px"}, { "sWidth": "33px"}, ] });
answer count: 3
has comment: http://stackoverflow.com/comment/39365377
linked to: http://stackoverflow.com/q/25706537
tagged with: javascript
has comment: http://stackoverflow.com/comment/39365316
type: UnansweredQuestion
tagged with: datatables

http://stackoverflow.com/comment/39303827
score: 0
has text: @Mandeep okay let me put it up on github real quick
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25231527

http://stackoverflow.com/comment/39462946
has text: Regex? I've actually never really heard that term before. How would I go about using a regex?
type: QuestionComment
comment on: http://stackoverflow.com/q/25316858
score: 0
type: Comment

http://stackoverflow.com/q/25290977
accepted answer: http://stackoverflow.com/a/25298777
has comment: http://stackoverflow.com/comment/39422504
answer count: 1
has comment: http://stackoverflow.com/comment/39431272
has comment: http://stackoverflow.com/comment/39417730
upvote count: 1
tagged with: knockout.js
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39416846
has comment: http://stackoverflow.com/comment/39422436
type: AnsweredQuestion
has title: Set drop down value in knockout
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39422001
has answer: http://stackoverflow.com/a/25298777
score: 1
has body: I have a table(two column) to which we can add and remove rows. First column is a dropdown and Second is a textarea. I want to be able to push a new row into the table with values. I tried the below code but only was able to push the comments text but not the selected option how do I get the dropdown to be selected as the value provided(from 'result'). JS:(VM) function RowData1(IDS, Comments) { var self = this; self.Comments = ko.observable(Comments).extend({ required: true }); self.IDS = [{ value: "0", ids: "Choose..." }, { value: "1", ids: "Drip" }, { value: "2", ids: "Flood - Ditch" }, { value: "3", ids: "Flood - Gated Pipe" }, { value: "4", ids: "Pivot" }, { value: "5", ids: "Sprinkler" }, { value: "6", ids: "Other" }]; } //definition for Sec1 self.Sec1 = ko.observableArray([new RowData1()]); //some function which will add the new row with values function addData(){ self.Sec1.push(RowData1(result.IDS, result.Comment));}//result has the IDS value and comment from an ajax call HTML: Add Irrigation Delivery System Comments Remove
favorite count: 0
has comment: http://stackoverflow.com/comment/39419154
has comment: http://stackoverflow.com/comment/39415018
type: Question

http://stackoverflow.com/comment/39383416
type: Comment
comment on: http://stackoverflow.com/a/25273853
has text: won't the element still appear full of its previous contents until the moment immediately after the AJAX content is returned and inserted in its place?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39303509
comment on: http://stackoverflow.com/q/25231156
has text: normally they do have a line associated! but this time it didn't :\
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25318296
accepted answer: http://stackoverflow.com/a/25318434
tagged with: javascript
tagged with: jquery
answer count: 1
has comment: http://stackoverflow.com/comment/39465786
downvote count: 0
favorite count: 0
has body: i'd like to highlight the current menu item via javascript using a div class INSIDE the link. In a first attempt i just added the class "top-bar-underline" to the a-tag, but since the menu items are "display: block;" and this way the underline exceeds the font of the menu item, i put the underline in a div-container inside the a-tag. For the hover-effect this works perfectly fine. The question: How can i add the class "top-bar-underline-current" to the class "top-bar-underline" for the current active menu item? My current code looks like: html menu: LATEST ABOUT js to highlight current a in the menu: css: .top-bar-underline { position: relative; color: #ff3296; } .top-bar-underline:after { display: block; position: absolute; top: 70%; left: 0; width: 100%; height: 2px; background: rgba($body-font-color,0.9); content: ''; opacity: 0; -webkit-transition: opacity 0.2s, -webkit-transform 0.2s; -moz-transition: opacity 0.2s, -moz-transform 0.2s; transition: opacity 0.2s, transform 0.2s; -webkit-transform: translateY(10px); -moz-transform: translateY(10px); transform: translateY(10px); } .top-bar-underline:hover { color: #98004a; } .top-bar-underline:hover:after, .top-bar-underline:focus:after { width: 100%; opacity: 1; -webkit-transform: translateY(0px); -moz-transform: translateY(0px); transform: translateY(0px); } .top-bar-underline-current { position: relative; } .top-bar-underline-current:after { position: absolute; top: 70%; left: 0; width: 100%; height: 2px; background: rgba($body-font-color,0.9); content: ''; opacity: 1; -webkit-transition: opacity 0.2s, -webkit-transform 0.2s; -moz-transition: opacity 0.2s, -moz-transform 0.2s; transition: opacity 0.2s, transform 0.2s; -webkit-transform: translateY(0px); -moz-transform: translateY(0px); transform: translateY(0px); } .top-bar-underline-current:hover:after, .top-bar-underline-current:focus:after { width: 100%; opacity: 1; -webkit-transform: translateY(0px); -moz-transform: translateY(0px); transform: translateY(0px…
has comment: http://stackoverflow.com/comment/39479471
has answer: http://stackoverflow.com/a/25318434
has title: javascript - highlight current menu item via inside
tagged with: css
tagged with: highlight
type: AnsweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39465985
type: Question

http://stackoverflow.com/comment/39508562
score: 1
has text: Take a look at the async section of the Jasmine docs... http://jasmine.github.io/edge/introduction.html
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25341026

http://stackoverflow.com/a/25243251
score: 1
answers question: http://stackoverflow.com/q/25243124
upvote count: 1
has body: $scope is a container that holds the data for a controller. $scope's are not available to other controllers directly so it's useful for keeping separation between your parts of code. Views can only access controller data if it's been added to $scope. var myGreatVariable; not available to view yet... $scope.myVar = myGreatVariable; View can now access variable and display it like this: {{ myVar }} There exists a global scope shared by all controllers that inject it called $rootScope. You should not use $rootScope too often as more likely than not you actually want a service for this. app.controller("SomeController", function( $rootScope ) { $rootScope.userId = 123; }); app.controller("SomeController", function( $scope, UserService ) { $scope.userId = UserService.id; });
type: Answer
downvote count: 0

http://stackoverflow.com/comment/39404250
has text: @meze It looks interesting but I think is it an over kill. If you actually understand the sorting algorithm you will agree with with me that the replace is not required. You can subject it under test then will agree with me that as long as all the list contents has the same prefix. We might not need the replace
comment on: http://stackoverflow.com/a/25285259
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25277585
tagged with: twitter-bootstrap
upvote count: 1
answer count: 1
has title: AngularJs override tooltip bootstrap.css style
tagged with: angularjs-directive
accepted answer: http://stackoverflow.com/a/25277631
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
score: 1
has body: I am using AngularUI Tooltip in a directive as below. app.directive('customTooltip', function($compile) { return { link: function(scope, element, attrs) { var config = scope.$eval(attrs.appsTooltip); var htmlText = '&lt;img src=\'../../../images/help_on.jpg\' tooltip="' + config.message + '" tooltip-placement="' + config.placement + '" /&gt;'; element = element.append(htmlText); $compile(element.children())(scope); } }; }); Instead of modifying the actual bootstrap.css class like .tooltip-inner, .tooltip.top .tooltip-arrow ,etc How can I use the same directive to overwrite with inline tooltip styling?
favorite count: 0
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/25277631
tagged with: css

http://stackoverflow.com/q/25286016
downvote count: 2
has body: I'm using the Magnific popup script. The script is great, but what I'm missing is that the URL (www.mysite.com/?rel=gallery) is not changing, regardless of which image is shown in the popup, so nobody can link to my one image directly, just to my whole gallery. It would be great if every image would append a unique hash (#mypic1 etc., preferably grabbed from the id of the image or its wrapper) to the URL. It should be only a hash so the site is not reloaded each time when browsing the gallery itself. This unique URL (www.mysite.com/?rel=gallery#mypic1), if linked to from an external site, of course, should open the popup with the image#mypic1 directly.
has comment: http://stackoverflow.com/comment/41174207
upvote count: 5
has answer: http://stackoverflow.com/a/26240125
tagged with: javascript
type: UnansweredQuestion
score: 3
answer count: 1
tagged with: jquery
favorite count: 0
has title: Unique URL for each image (preferably with only a hash appended) which shows the popup image directly
type: Question
tagged with: magnific-popup
tagged with: zepto
has comment: http://stackoverflow.com/comment/41147994
has comment: http://stackoverflow.com/comment/41155711

http://stackoverflow.com/comment/39374115
type: QuestionComment
comment on: http://stackoverflow.com/q/25268967
score: 0
type: Comment

http://stackoverflow.com/a/25315545
upvote count: 1
answers question: http://stackoverflow.com/q/25315107
has body: Firstly you don't need two separate forms for this. It sounds like all the data should be sent to the same place, and thus there's no reason to wrap the radio buttons and checkboxes in separate tags. Your markup could look like this: Language options: Single Multi Languages: English French Spanish Russian Arabic Chinese Here is the jQuery code you can use to do what you proposed. The idea is that every time the user clicks a checkbox, we check if multi was selected. If it is, then we don't have to change the behaviour of the checkboxes, but if it is not, then we clear all checkboxes except the one the user actually selected. var $form = $('#form1'); var $checkboxes = $('input[type=checkbox]'); var $selectionType = $('input[type=radio]'); var $output = $('#output'); var isMulti = false; // Listen to change event on the radio buttons and set isMulti $selectionType.on('change', function( e ) { // Check the value of what radio button was clicked isMulti = $( e.target ).val() === 'Multi'; // Clear all selected checkboxes if user clicked "single" if( !isMulti ) { $checkboxes.each( function( idx, item ) { $( item ).prop( 'checked', false ); }); } }); // Listen to clicks on checkboxes $checkboxes.on('change', function( e ) { // Store what was just clicked var $this = $( e.target ); // If Multi is not selected, then remove the check from all other checkboxes if( !isMulti ) { $checkboxes.each( function( idx, item ) { var $item = $( item ); // Do not un check if this is the checkbox the user clicked if( $item.attr('id') === $this.attr('id') ) { return true; } $item.prop('checked', false ); }); } }); Here's a JS fiddle with it working: http://jsfiddle.net/grammar/pdx8gccu/2/ Hope this helps!
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/25343149
has title: Undefined or null variable in function
favorite count: 0
answer count: 3
has comment: http://stackoverflow.com/comment/39511757
has answer: http://stackoverflow.com/a/25343201
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25343178
type: Question
has body: In these example I am ruining a function with conditions; function validPrice(price) { if(price=="" || price==0 || price==null || price==undefined ) { //do something } else { // do something different } } var priceNew = $("li#listedProd").attr("price"); validPrice(priceNew); My question is what are the different in these condition price=="" || price==0 || price==null || price==undefined
possible better answer: http://stackoverflow.com/a/25343184
upvote count: 2
has answer: http://stackoverflow.com/a/25343184
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25343201
tagged with: jquery

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/25278424
tags question: http://stackoverflow.com/q/25383609
tags question: http://stackoverflow.com/q/25247356
tags question: http://stackoverflow.com/q/25295087
tags question: http://stackoverflow.com/q/25321609
tags question: http://stackoverflow.com/q/25332208
tags question: http://stackoverflow.com/q/25271962
tags question: http://stackoverflow.com/q/25281391
tags question: http://stackoverflow.com/q/25320062
tags question: http://stackoverflow.com/q/25334648
tags question: http://stackoverflow.com/q/25378594
tags question: http://stackoverflow.com/q/25346771
tags question: http://stackoverflow.com/q/25333918
tags question: http://stackoverflow.com/q/25353409
tags question: http://stackoverflow.com/q/25353340
tags question: http://stackoverflow.com/q/25249283
tags question: http://stackoverflow.com/q/25278462
tags question: http://stackoverflow.com/q/25349625
tags question: http://stackoverflow.com/q/25272909
tags question: http://stackoverflow.com/q/25272479
tags question: http://stackoverflow.com/q/25320189
tags question: http://stackoverflow.com/q/25353576
tags question: http://stackoverflow.com/q/25260575
tags question: http://stackoverflow.com/q/25346196
tags question: http://stackoverflow.com/q/25254502
tags question: http://stackoverflow.com/q/25361426
tags question: http://stackoverflow.com/q/25362056
tags question: http://stackoverflow.com/q/25255821
tags question: http://stackoverflow.com/q/25361699
tags question: http://stackoverflow.com/q/25342882
tags question: http://stackoverflow.com/q/25335164
tags question: http://stackoverflow.com/q/25271283
tags question: http://stackoverflow.com/q/25283590
tags question: http://stackoverflow.com/q/25318198
tags question: http://stackoverflow.com/q/25239907
tags question: http://stackoverflow.com/q/25343831
tags question: http://stackoverflow.com/q/25354994
tags question: http://stackoverflow.com/q/25344992
tags question: http://stackoverflow.com/q/25234978
tags question: http://stackoverflow.com/q/25271105
tags question: http://stackoverflow.com/q/25231652
tags question: http://stackoverflow.com/q/25249423
tags question: http://stackoverflow.com/q/25252479
tags question: http://stackoverflow.com/q/25247496
tags question: http://stackoverflow.com/q/25257485
tags question: http://stackoverflow.com/q/25348372
tags question: http://stackoverflow.com/q/25249266
tags question: http://stackoverflow.com/q/25302113
tags question: http://stackoverflow.com/q/25313025
tags question: http://stackoverflow.com/q/25250310
tags question: http://stackoverflow.com/q/25341263
tags question: http://stackoverflow.com/q/25240312
tags question: http://stackoverflow.com/q/25264564
tags question: http://stackoverflow.com/q/25280338
tags question: http://stackoverflow.com/q/25317308
tags question: http://stackoverflow.com/q/25306170
tags question: http://stackoverflow.com/q/25288916
tags question: http://stackoverflow.com/q/25339893
tags question: http://stackoverflow.com/q/25257020
tags question: http://stackoverflow.com/q/25284778
tags question: http://stackoverflow.com/q/25332180
tags question: http://stackoverflow.com/q/25294459
tags question: http://stackoverflow.com/q/25318476
tags question: http://stackoverflow.com/q/25290019
tags question: http://stackoverflow.com/q/25288788
tags question: http://stackoverflow.com/q/25358357
tags question: http://stackoverflow.com/q/25233670
tags question: http://stackoverflow.com/q/25312281
tags question: http://stackoverflow.com/q/25262472
tags question: http://stackoverflow.com/q/25291212
tags question: http://stackoverflow.com/q/25283893
tags question: http://stackoverflow.com/q/25296151
tags question: http://stackoverflow.com/q/25303039
tags question: http://stackoverflow.com/q/25344228
tags question: http://stackoverflow.com/q/25385051
tags question: http://stackoverflow.com/q/25315494
tags question: http://stackoverflow.com/q/25367054
type: Tag
tags question: http://stackoverflow.com/q/25364377
tags question: http://stackoverflow.com/q/25232701

http://stackoverflow.com/comment/39496508
comment on: http://stackoverflow.com/q/25334340
has text: Also note that the `.live()` event is deprecated as of jQuery 1.7 – you can replace it with `.on()`
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39366573
type: Comment
comment on: http://stackoverflow.com/a/25265026
has text: I think OP was referring to this extension: https://chrome.google.com/webstore/detail/google-translate/aapbdbdomjkkjkaonfhkkikfgjllcleb As you can see, it has an infobar-like UI in the page.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39311809
comment on: http://stackoverflow.com/a/25235394
has text: #iframetest { display:none; }That is my CSS but its still automatically showing.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25319361
upvote count: 2
has comment: http://stackoverflow.com/comment/39467761
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25319270
has body: The issue is in the way you're declaring your controller. You have: firstApp.controller = ('FirstController',function($scope) ... It should be: firstApp.controller('FirstController', function($scope) ...
accepted answer of: http://stackoverflow.com/q/25319270
type: Answer
score: 2

http://stackoverflow.com/q/25387908
has body: I'm trying to register my first package with Bower. No matter what I do, I get the following error: bower myPackageName#* resolve git://github.com/username/myPackageName.git#* bower myPackageName#* download https://github.com/username/myPackageName/archive/0.1.0.tar.gz bower myPackageName#* extract archive.tar.gz bower myPackageName#* resolved git://github.com/username/myPackageName.git#0.1.0 [?] Registering a package will make it installable via the registry (https://bower.herokuapp.com), continue? Yes bower myPackageName register git://github.com/username/myPackageName.git bower EINVFORMAT Invalid URL format I don't understand why I'm getting this error. Can someone please explain to me what I'm doing wrong?
answer count: 1
accepted answer: http://stackoverflow.com/a/25390078
favorite count: 0
has title: Unable to register Bower package: EINVFORMAT
score: 13
tagged with: bower
upvote count: 13
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25390078
type: Question
downvote count: 0
tagged with: javascript
tagged with: bower-register

http://stackoverflow.com/a/25243128
score: 0
answers question: http://stackoverflow.com/q/25242895
type: Answer
has body: var bgPosYNew = bgPosY - (bgPosY * 0.3); this should work

http://stackoverflow.com/q/25276782
answer count: 2
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39388646
tagged with: ajax
has answer: http://stackoverflow.com/a/25276991
type: UnansweredQuestion
score: 1
upvote count: 1
has title: Ajax auto-load by counter
has comment: http://stackoverflow.com/comment/39388789
type: Question
has answer: http://stackoverflow.com/a/25277054
has comment: http://stackoverflow.com/comment/39388529
has body: I got this code from some template, it gets executed by clicking on the tabs to fetch posts into the page. All I want is to have an edited copy of this code to fetch posts by timer aside from clicking on the tabs. I have tried the setInterval but it didn't work, I appreciate any help I am so new to Ajax and JQuery. jQuery(document).ready(function($) { setInterval(function(){ e.preventDefault(); var bt = $(this); var bts = bt.parent().parent(); var where = $(this).parent().parent().parent().next(); var nbs = bt.parent().parent().data('nbs'); var nop = bt.parent().parent().data('number_of_posts'); cat = bt.data('cat_id'); if (cat === '') { cat = bt.data('parent_cat'); } where.parent().find('.show-more').find('.nomoreposts').remove(); jQuery.ajax({ type: "post", url: nbtabs.url, dataType: 'html', data: "action=nbtabs&nonce="+nbtabs.nonce+"&cat="+cat+"&nbs="+nbs+"&number_of_posts="+nop, cach: false, beforeSend : function () { where.parent().append(''); }, success: function(data){ where.hide().html(data).fadeIn('slow'); bts.find('li').removeClass('active'); bt.parent().addClass('active'); where.parent().find('.nb-load').remove(); } }); }, 5000) })
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39388622

http://stackoverflow.com/comment/39547596
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25362400
has text: @Bergi parse_fun is nothing i removed it.Thanks

http://stackoverflow.com/comment/39311731
comment on: http://stackoverflow.com/a/25235394
type: Comment
score: 0
has text: I've already stated within my framework, it still shows regardless
type: AnswerComment

http://stackoverflow.com/comment/39379760
type: QuestionComment
comment on: http://stackoverflow.com/q/25271938
has text: You have a variable named `esta` and one named `$esta`, are those supposed to be the same thing?
score: 0
type: Comment

http://stackoverflow.com/q/25258773
accepted answer: http://stackoverflow.com/a/26334049
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39355890
upvote count: 2
has comment: http://stackoverflow.com/comment/39355562
has body: I got stuck trying to show a simple jquery modal dialog. The dialog is shown but in a modeless way. I have read other posts and checked: There is a link to jquery-ui.css I've included modal:true parameter. What am I doing wrong? HTML User Pass Javascript $("#userPanelDlg").dialog({ resizable: false, height: 'auto', width: 'auto', modal: true, buttons: { "Ok": function () { $(this).dialog("close"); } } });
type: Question
has comment: http://stackoverflow.com/comment/41280577
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39355714
has answer: http://stackoverflow.com/a/26334049
has comment: http://stackoverflow.com/comment/39356552
score: 2
tagged with: modal-dialog
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has title: jquery modal dialog is laughing at me - dialog shows up modeless
favorite count: 0

http://stackoverflow.com/q/25315531
type: AnsweredQuestion
upvote count: 2
has body: I have a list of data that I'm using to create a Firebase data structure. I got the error Error: Firebase.child failed: First argument was an invalid path: "Bitex.la". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]" I understand the error message. I'm wondering what the cleanest way is to ensure valid child path names? Is there a helper function in the Firebase API or do I just write my own code snippet (probably using replace()) to strip out those characters?
type: Question
tagged with: firebase
has answer: http://stackoverflow.com/a/25321116
has title: How to ensure clean Firebase child paths?
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/24412393
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25321116
favorite count: 0
score: 2

http://stackoverflow.com/comment/39437893
type: QuestionComment
has text: Can you provide a fiddle where this behaviour occurs?
comment on: http://stackoverflow.com/q/25303394
score: 0
type: Comment

http://stackoverflow.com/a/25334390
has comment: http://stackoverflow.com/comment/39496625
has comment: http://stackoverflow.com/comment/39496470
has comment: http://stackoverflow.com/comment/39496582
type: Answer
answers question: http://stackoverflow.com/q/25334340
has comment: http://stackoverflow.com/comment/39496441
score: 3
has comment: http://stackoverflow.com/comment/39497056
upvote count: 3
has body: You can add a timeout before executing your function using this: setTimeout(function(){jQuery('#dailyskins').fadeIn('show')}, 200);
accepted answer of: http://stackoverflow.com/q/25334340
has comment: http://stackoverflow.com/comment/39497070
has comment: http://stackoverflow.com/comment/39496935
has comment: http://stackoverflow.com/comment/39496503
has comment: http://stackoverflow.com/comment/39496431
has comment: http://stackoverflow.com/comment/39496846
has comment: http://stackoverflow.com/comment/39497133
has comment: http://stackoverflow.com/comment/39496601
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39497150

http://stackoverflow.com/comment/39351670
type: QuestionComment
has text: Hi Jonathan, yes its working absolutely fine if we do normally in console.log. But the issue is occurring when we bind it to a div or kendo grid.
comment on: http://stackoverflow.com/q/25256480
score: 0
type: Comment

http://stackoverflow.com/q/25284479
type: Question
has comment: http://stackoverflow.com/comment/39402365
has answer: http://stackoverflow.com/a/25284681
has body: I want to get the page number out if these possible strings: $scope.projects.next can equal... string 1) /api/project/?currentuser=false&amp;page=2 string 2) /api/project/?page=2 I have tried this: $scope.projects.next.split('=')[1].indexOf("page") However, this only works on string 2. How can I change this to make sure it finds the page number no matter what position or future arguments that could be added? I have also tried: $scope.projects.next.indexOf("page") but this gives 52 no idea why.
has comment: http://stackoverflow.com/comment/39402540
tagged with: javascript
has comment: http://stackoverflow.com/comment/39402495
has answer: http://stackoverflow.com/a/25284592
accepted answer: http://stackoverflow.com/a/25284599
downvote count: 4
has comment: http://stackoverflow.com/comment/39402505
has title: indexOf in Javascript not working how it should
linked to: http://stackoverflow.com/q/901115
has comment: http://stackoverflow.com/comment/39402361
favorite count: 0
duplicate of: http://stackoverflow.com/q/901115
tagged with: angularjs
answer count: 5
has comment: http://stackoverflow.com/comment/39402383
possible better answer: http://stackoverflow.com/a/25284717
score: -3
has answer: http://stackoverflow.com/a/25284717
has answer: http://stackoverflow.com/a/25284659
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25284599
upvote count: 1

http://stackoverflow.com/a/25356222
type: Answer
accepted answer of: http://stackoverflow.com/q/25356195
has body: The way you are doing the concatenation is wrong, $.ajax({ type: "POST", data: 'media-select=' + dt, //concatenation using + url: url, success: function (data) { $('#result-media-uploader').load(url); } }); Use + symbol for performing a concatenation, otherwise compiler would throw an error like Uncaught SyntaxError: Unexpected identifier
answers question: http://stackoverflow.com/q/25356195
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/39424562
type: AnswerComment
has text: I'm not used to writing javascript, jquery or php. I just made templates, HTML and CSS. This is something I just tried out, all I want is to have a working cart so I can keep doing designs :) @sulavvr
type: Comment
comment on: http://stackoverflow.com/a/25272467
score: 0

http://stackoverflow.com/comment/39592285
type: Comment
comment on: http://stackoverflow.com/a/25312221
has text: I get it that you didn't really test... Try and write the replace function with your regular expression...
score: 0
type: AnswerComment

http://stackoverflow.com/q/25279785
has comment: http://stackoverflow.com/comment/39393477
type: Question
answer count: 2
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/39393511
accepted answer: http://stackoverflow.com/a/25279938
has comment: http://stackoverflow.com/comment/39393625
tagged with: javascript
has body: I have a form and in this a field is parent keywords as secret key. When i validate this form using javascript it working very well. i also check secret key that i associated with any parent or not. if not then galg set 0. Ajax working ver well and it check also that secret key found or not. if found then it is correct or not, but compiler not wait to ajax complete. it submit the form and don't wait the ajax response. I want while ajax request not complete then it resume for some time and then next check other filed. function PiggyBankValidation() { var flag = 1; var Namepattern = /^[a-zA-Z0-9 ]{1,40}$/; var account_name = $("#account_name"); var holding_terms = $("#holding_terms"); var goal = $("#goal"); var parent_keywords = $("#parent_keywords"); var terms = $("#terms"); //terms.attr("checked",false) if(account_name.val().trim() == ""){ account_name.next('.JErrorMsg').text("Please Enter Account Name !"); flag = 0; }else if(Namepattern.test(account_name.val().trim()) == false){ account_name.next('.JErrorMsg').text("Please Enter Correct Account Name !"); flag = 0; }else{ account_name.next('.JErrorMsg').text(""); } if(holding_terms.val().trim() == ""){ holding_terms.next('.JErrorMsg').text("Please Select Holding Terms !"); flag = 0; }else if(Namepattern.test(holding_terms.val().trim()) == false){ holding_terms.next('.JErrorMsg').text("Please Select Holding Terms !"); flag = 0; }else{ holding_terms.next('.JErrorMsg').text(""); } if(goal.val().trim() == ""){ goal.next('.JErrorMsg').text("Please Enter Goal !"); flag = 0; }else if(Namepattern.test(goal.val().trim()) == false){ goal.next('.JErrorMsg').text("Please Enter Correct Goal !"); flag = 0; }else{ goal.next('.JErrorMsg').text(""); } if(parent_keywords.val().trim() == ""){ parent_keywords.next('.JErrorMsg').text("Please Enter Parent Keywords !"); flag = 0; }else if(Namepattern.test(parent_keywords.val().trim()) == false){ parent_keywords.next('.JErrorMsg').text("Please Enter Correct Parent Keywords !"); flag = 0; }…
tagged with: jquery
tagged with: ajax
has title: How to stop compiler while ajax request not complete?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25279938
possible better answer: http://stackoverflow.com/a/25280107
downvote count: 0
has comment: http://stackoverflow.com/comment/39393556
score: 1
has answer: http://stackoverflow.com/a/25280107
favorite count: 0
linked to: http://stackoverflow.com/q/14220321

http://stackoverflow.com/q/25368930
has answer: http://stackoverflow.com/a/25369342
accepted answer: http://stackoverflow.com/a/25369342
score: 0
answer count: 2
tagged with: timer
has answer: http://stackoverflow.com/a/25369316
has comment: http://stackoverflow.com/comment/39559782
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39559974
has body: I am making a countdown timer that should be reseting and starting anew every 10 seconds. This is the code I came up with by now: function count(){ var end_date = new Date().getTime()+10*1000; setInterval(function(){ var current_date = new Date().getTime(); var seconds_left = parseInt((end_date - current_date) / 1000); document.getElementById("countdown").innerHTML = seconds_left + " seconds "; }, 1000); } setInterval(function(){count()}, 10*1000); It is supposed to function as follows: + I set interval that will restart count() every 10 seconds. + count() defines end_date - a date 10 seconds from now. + then count() sets interval that will restart every 1 second. + every 1 second seconds_left variable is changed according to how current_date changed with respect to end_date. + as soon as seconds_left becomes 0, setInterval from step 1 fires and starts count() anew. Which step am I implementing the wrong way? Do I misunderstand the functioning of setInterval()? Here is my JsFiddle: http://jsfiddle.net/sy5stjun/ .
has comment: http://stackoverflow.com/comment/39559943
type: Question
has comment: http://stackoverflow.com/comment/39559195
has title: Javascript: restarting countdown timer doesn't work as I expect it to
possible better answer: http://stackoverflow.com/a/25369316
tagged with: javascript

http://stackoverflow.com/q/25383855
has answer: http://stackoverflow.com/a/25392593
has title: chrome.app.window.create Incognito Window?
has comment: http://stackoverflow.com/comment/39587428
tagged with: google-chrome-app
has comment: http://stackoverflow.com/comment/39588232
has answer: http://stackoverflow.com/a/25390364
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25390364
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/39586787
has comment: http://stackoverflow.com/comment/39601030
tagged with: javascript
has comment: http://stackoverflow.com/comment/39587393
accepted answer: http://stackoverflow.com/a/25392593
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39587407
has body: I'm working on a Chrome app, and was wondering how to create a fullscreen Incognito window. function openWindow(path){ chrome.system.display.getInfo(function(d){ chrome.app.window.create(path, { 'frame': 'none', 'id': 'browser', 'bounds':{ 'left':0, 'top':0, 'width':d[0].bounds.width, 'height':d[0].bounds.height } },function(w){ w.fullscreen(); }); }); } This creates a regular window. Adding 'incognito': true, didn't work.

http://stackoverflow.com/a/25247362
has body: in parent frame defined function pause, ex: function pauseAudio() { myAudio.pause(); } In child frame call window.parent.pauseAudio()
type: Answer
has comment: http://stackoverflow.com/comment/39336080
answers question: http://stackoverflow.com/q/25247108
score: 0

http://stackoverflow.com/comment/39383272
comment on: http://stackoverflow.com/a/25258554
score: 0
type: AnswerComment
type: Comment
has text: In other words, just type the hyphen and let 'er rip! Thanks, works :)

http://stackoverflow.com/comment/39350967
type: Comment
has text: What does "<?php echo $url; ?>" show? Also, can you post a little bit of what updateTitle.php has?
score: 0
comment on: http://stackoverflow.com/q/25256261
type: QuestionComment

http://stackoverflow.com/a/25365110
type: Answer
score: 1
upvote count: 1
downvote count: 0
has body: For a category chart you can still specify an x-value in your data series. An x-value of N.25, is the right edge of the column, 0.25, 1.25, 2.25, etc... { name: 'indicator', data: [[0.25,5]], type: 'scatter', marker:{ //here you can have your url symbol: 'circle', } } Updated fiddle.
answers question: http://stackoverflow.com/q/25364901

http://stackoverflow.com/comment/39460597
type: AnswerComment
has text: I only have access to django template includes and cannot manipulate the base html directly. Thanks for the help.
type: Comment
comment on: http://stackoverflow.com/a/25315223
score: 0

http://stackoverflow.com/comment/39469239
has text: nope i been meaning to study it though. I'll look into it. Could you make an example utilizing it as an answer to help me get started with it?
score: 0
comment on: http://stackoverflow.com/q/25320112
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25272467
has comment: http://stackoverflow.com/comment/39382907
has comment: http://stackoverflow.com/comment/39410136
has comment: http://stackoverflow.com/comment/39420988
has comment: http://stackoverflow.com/comment/39381028
has comment: http://stackoverflow.com/comment/39423605
has comment: http://stackoverflow.com/comment/39385681
type: Answer
answers question: http://stackoverflow.com/q/25271524
has comment: http://stackoverflow.com/comment/39385300
has comment: http://stackoverflow.com/comment/39420510
has comment: http://stackoverflow.com/comment/39385801
accepted answer of: http://stackoverflow.com/q/25271524
has comment: http://stackoverflow.com/comment/39411773
upvote count: 2
has comment: http://stackoverflow.com/comment/39423760
has comment: http://stackoverflow.com/comment/39416493
has comment: http://stackoverflow.com/comment/39383664
has comment: http://stackoverflow.com/comment/39385478
has comment: http://stackoverflow.com/comment/39387477
has comment: http://stackoverflow.com/comment/39421335
has body: I don't understand your question correctly, but I think you want to add the value for the checkbox when checked using jQuery. $('input[type=checkbox]').click(function(){ if($(this).is(':checked')){ //use this to see if the checkbox is checked or not //do something... } }); I don't know if you wanted something like this. If not, can you clarify more? Thanks! Edit: So, you basically use the same thing, something like this perhaps, if($(this).is(':checked')){ console.log($(this).parent('td').siblings('td').html()); // check this, you'll have the item name. (the first td) console.log($(this).attr('data-val')); // this will have the value on the "data-val" attribute on your checkbox } So, now you have the name of the product (1st log) and the price (2nd log). Now keep in mind that this would work only if the format is going to be consistent, and also instead of doing a generic input[type=checkbox], you might want to give all the product checkboxes a unique class, so it doesn't interfere with other checkboxes you might have. Hope this helps. If not, I'd be happy to answer some more. Thanks!
has comment: http://stackoverflow.com/comment/39424409
has comment: http://stackoverflow.com/comment/39385883
score: 2
has comment: http://stackoverflow.com/comment/39424562
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39386107

http://stackoverflow.com/q/25374693
tagged with: javascript
has body: I need help on how to retrieve a JSON string from a remote server and assign that string to a variable in AngularJS. All I am given is a url to the server where the JSON data is being generated. For example, given the url http://{{remotedomain}}/message/get/zh_cn, the browser will display the JSON message as shown below: {"login":"登入","username":"帐号","password":"密码","enter_username":"输入帐号","enter_password":"输入密码","user-not-found":"帐号不存在","user-banned":"帐号禁用","user-found":"帐号正确","online":"在线","exchange_rate":"汇率","home":"首页","file":"文档","assistant":"帮手","communicate":"交流","personnel":"人事","system":"系统","others":"更多","logout":"登出","shipping":"出货","bom":"BOM","nonbom":"非BOM","producing":"生产","warehouse":"仓库","finance":"财务","audiction":"审核","sales":"业务"} So my question really is, how can I assign the JSON data shown to a "message" variable of the AngularJS provider service shown below? angular.module('myApp', []) .provider('translator', function(){ var messages = //get from the remote defaultLanguage = 'en'; ...
score: 0
tagged with: angularjs
type: UnansweredQuestion
type: Question
tagged with: http://stackoverflow.com/tag/json
has title: Assign a value in AngularJS Provider from a remote server
has answer: http://stackoverflow.com/a/25376853
answer count: 1

http://stackoverflow.com/a/25375999
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25375759
has body: The first thing to determine is which route and controller is associated with your view and then wire up the components accordingly. Here is a simple example in a JSBin. This one uses a separate controller and route for the three properties. And they are rendered into the application outlet when the link is clicked. If you need to use multiple controllers then you can include them in the controller that is associated with your view by using the "needs" dependency injection. Here is another one that just uses the application template and associated controllers etc. It also shows how you can include controllers in other controllers which might be more what you are looking for. It also shows you how to reference them in the template.
answers question: http://stackoverflow.com/q/25375759
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/q/25325037
has answer: http://stackoverflow.com/a/25325085
tagged with: angular-promise
has comment: http://stackoverflow.com/comment/39480137
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39482339
accepted answer: http://stackoverflow.com/a/25325141
has title: How can I store the count of a for loop with promises that return in an arbitrary order?
has comment: http://stackoverflow.com/comment/39479961
type: Question
has answer: http://stackoverflow.com/a/25325113
possible better answer: http://stackoverflow.com/a/25325861
score: 5
linked to: http://stackoverflow.com/q/1451009
has answer: http://stackoverflow.com/a/25325861
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/39482036
has comment: http://stackoverflow.com/comment/39480939
has comment: http://stackoverflow.com/comment/39479429
has comment: http://stackoverflow.com/comment/39482384
downvote count: 0
has body: I am making a series of http requests and I need to file the results into a list object when they return. I'm using angular promises. Because the promises only resolve after the for loop is finished, they all get filed into the last index of list. for (var i = 0;i &lt; list.length; i+=1) { Promise.do(action).then(function(result) { list[i] //i is always at last index because the for loop has already completed } }
has answer: http://stackoverflow.com/a/25325141
favorite count: 0
tagged with: promise
tagged with: angularjs
has answer: http://stackoverflow.com/a/25327067
answer count: 5

http://stackoverflow.com/comment/39475819
comment on: http://stackoverflow.com/q/25323674
type: QuestionComment
has text: If red is selected in 1st list and apple in second list then it should show every result of red as well as apple. Right?
score: 0
type: Comment

http://stackoverflow.com/a/25250819
answers question: http://stackoverflow.com/q/25248154
has body: I know this is already answered, but it's also worth saying that this is the whole point behind ui-sref-active, may not be entirely applicable here because of your nested jquery page integration, but in a typical ui-router state setup, this is the exact purpose of this directive, so I thought I'd leave it here for future readers http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.directive:ui-sref-active
score: 0
type: Answer

http://stackoverflow.com/a/25351926
score: 0
type: Answer
has body: I think problem is because y our contents are dynamically loaded, so they are not present at the time of event binding. That's why it's not firing. You can use delegation like bellow $(document).on("click",'#change-button',function(){})
answers question: http://stackoverflow.com/q/25351884

http://stackoverflow.com/q/25350742
has comment: http://stackoverflow.com/comment/39524915
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25350767
score: 1
tagged with: screen-size
has body: I was wondering if there was a way to show a user's screen information that updates when the user resizes their screen. I've seen javascript that just shows the user's screen but doesn't update in real time. Any one know the script for this? Thanks!
has comment: http://stackoverflow.com/comment/39524734
answer count: 2
tagged with: screen-resolution
upvote count: 1
has answer: http://stackoverflow.com/a/25350765
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25350765
has title: How to display user's monitor resolution even on resize?
favorite count: 0
has answer: http://stackoverflow.com/a/25350767
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/2242086
downvote count: 0
type: Question

http://stackoverflow.com/comment/39470706
type: AnswerComment
has text: I can not figure it out, but I have an idea! try testing a jQuery function like, `alert($('a').eq(0).html())` and see if it works. actually `alert('ok')` is not using jQuery, it is pure JS, so this way we can find out whether jQuery library is loaded or not!
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25316312

http://stackoverflow.com/q/25239348
has comment: http://stackoverflow.com/comment/39319197
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39319035
has answer: http://stackoverflow.com/a/25240400
tagged with: servlets
answer count: 2
has comment: http://stackoverflow.com/comment/39319051
downvote count: 0
score: 1
has body: I am using HTML5 server-sent events and I would like to send random messages to the client from the server. Below is some portion of MessageServlet.java : PrintWriter writer = response.getWriter(); Random rnd1 = new Random(); Random rnd2 = new Random(); for(int i = 0; i &lt; 5; i++) { //each message that we end must end with \n\n writer.flush(); System.out.println("This is i : " + i); if(i == 4) { writer.write("event: close \n"); } if(rnd1.nextInt(100) &lt; 30) writer.write("data: "+"{\"Messages\": [{\"Msg\":\"Success1\"}]}"+"\n\n"); else writer.write("data: "+"{\"Messages\": [{\"Msg\":\"Success2\"}]}"+"\n\n"); try { Thread.sleep(rnd2.nextInt(3000)); } catch (InterruptedException e) { e.printStackTrace(); } } writer.close(); It is supposed to stop once the loop reaches 4 however, it is continuously re-sending again the messages. To prove this I printed the counter, i, so as to see if this is true and in fact it prints like this : THis is i : 0 THis is i : 1 THis is i : 2 THis is i : 3 THis is i : 4 THis is i : 0 THis is i : 1 THis is i : 2 THis is i : 3 THis is i : 4 THis is i : 0 THis is i : 1 THis is i : 2 THis is i : 3 THis is i : 4 Does someone know what I'm doing wrong please? I'm really stuck. Thank you very much.
favorite count: 0
has answer: http://stackoverflow.com/a/25242592
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39319095
has title: Java Servlet keep on sending messages
tagged with: java

http://stackoverflow.com/q/25368851
tagged with: javascript
tagged with: icons
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/75669526
answer count: 2
linked to: http://stackoverflow.com/q/8248077
tagged with: google-maps-markers
has comment: http://stackoverflow.com/comment/39561298
has comment: http://stackoverflow.com/comment/39561457
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/19142242
linked to: http://stackoverflow.com/q/17746740
has title: Google Maps Default Icons
has body: I am trying to get the current default Google Maps Icons. I am making a program with the Google Maps API and have set my DirectionsRenderer to suppress markers so I can make markers to set the specific icon. This is my current result: This is what I had before suppressing the default markers: Later in my program I will be adding waypoints so I would like to set markers like the ones above with the letter A, B, C, etc. with a different color, (like marker "A", which is green). I have visited several sites such as: https://developers.google.com/maps/documentation/javascript/examples/marker-symbol-predefined https://www.google.com/fusiontables/DataSource?dsrcid=308519#map:id=3 google maps v3 standard icon/shadow names (equiv. of G_DEFAULT_ICON in v2) The markers these websites tell you to use, do not look the same as the current markers. I am wondering if there is a way to call the current "green marker a" just like in the fusion tables: If so, how? Thanks!
has answer: http://stackoverflow.com/a/25370529
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/39684027
score: 9
type: Question
tagged with: google-maps
has comment: http://stackoverflow.com/comment/53317408
upvote count: 9
possible better answer: http://stackoverflow.com/a/39684027
accepted answer: http://stackoverflow.com/a/25370529

http://stackoverflow.com/comment/39363356
comment on: http://stackoverflow.com/a/25263161
type: Comment
has text: I tried with this `headers:{'Access-Control-Allow-Origin': '*'}` but it didn't make any changes
score: 0
type: AnswerComment

http://stackoverflow.com/q/25362726
has answer: http://stackoverflow.com/a/25362753
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25362764
tagged with: function
upvote count: 0
has title: make two similar javascript functions work together
favorite count: 0
has answer: http://stackoverflow.com/a/25362751
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has body: I started with Javascript recently. I found a piece of code which changes the class of an object on scroll using pure javascript. Here is that code - window.onscroll = function() { if (window.scrollY &gt; 1) { document.getElementById('nav2').className = "after"; } else { document.getElementById('nav2').className = "before"; }}; window.onscroll = function() { if (window.scrollY &gt; 1) { document.getElementById('list').className = "ul2"; } else { document.getElementById('list').className = "ul"; }}; The problem is that in this code only the second function runs , the first one does not run until i remove the second function. Please suggest any pure javascript method to solve this issue
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39546310
has answer: http://stackoverflow.com/a/25362795
downvote count: 1
type: Question

http://stackoverflow.com/a/25239365
accepted answer of: http://stackoverflow.com/q/25239221
type: Answer
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
has body: There is no problem with razor syntax in Javascript ,you are sending querystring in server.mappath which is wrong :- it should be like this : actions: { listAction: '@(HttpContext.Current.Server.MapPath("~/GetAssetData"))' } instead of actions: { listAction: '@(HttpContext.Current.Server.MapPath("~/GetAssetData?prod=funds"))' } That is why "illegal characters" error is coming. As far as i m understanding your question,i think you want to give path of a action in listAction then do it as : actions: { listAction: '@(Url.Action("action name","controller name",new { prod="funds" }))' }
answers question: http://stackoverflow.com/q/25239221

http://stackoverflow.com/comment/39362784
comment on: http://stackoverflow.com/q/25262944
has text: if you read only the text you have a pretty good summary. Just included the code to make it concrete.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25244300
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/25244395
has comment: http://stackoverflow.com/comment/39328043
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25244851
has answer: http://stackoverflow.com/a/25244359
tagged with: http://stackoverflow.com/tag/svg
linked to: http://stackoverflow.com/q/609273
has title: how to make css filters work in Firefox?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39681731
upvote count: 3
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/156116
has comment: http://stackoverflow.com/comment/39329540
type: Question
score: 3
has comment: http://stackoverflow.com/comment/39328066
tagged with: javascript
has body: I am good with HTML5 and CSS but i've never used filters before. So i was applying some fiters using Jquery and they worked fine with Chrome however nothing happened when i tried to apply them in firefox. Jquery code $('#grayscale').click(function() { $('#uploadedPhoto').css('-webkit-filter', 'grayscale(100%)'); }); $('#sepia').click(function() { $('#uploadedPhoto').css('-webkit-filter', 'sepia(100%)'); }); These are just two examples. I have searched for this and found that Firefox doesnt support simple filter: syntax yet and there is some other way with URL and SVG. Can you please give an example or a link to the library of the specific filter URLs. For this URL method do i have to link some library first like with Jquery? Thank You

http://stackoverflow.com/q/25291249
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25291566
answer count: 2
upvote count: 0
has title: How to fix a button with javascript function in html
favorite count: 0
has body: I'm trying to get all title out of body text. I created a button and linked my function to it. However, when I click on it, it disappears and I want it to stay in the same place because I will add other buttons with other functions. Do you know any idea how I could keep it always in there? I tryed to use fixed position but soon realised that it just fixes the button on top if I scroll down for example. Also, when I get the titles my text is in different shrift, I just wonder why is that? Your guidance will be appreciated. This is what I have at the moment: test This is one title I'm writing here the text that I don't need to get. Other title And so we'll test whether this thing works.
has answer: http://stackoverflow.com/a/25291516
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39415334
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25291516
has answer: http://stackoverflow.com/a/25291566
downvote count: 2
has comment: http://stackoverflow.com/comment/39436840
has comment: http://stackoverflow.com/comment/39415228
type: Question
has comment: http://stackoverflow.com/comment/39415178
score: -2

node.js
tags question: http://stackoverflow.com/q/25267234
tags question: http://stackoverflow.com/q/25368226
tags question: http://stackoverflow.com/q/25329574
tags question: http://stackoverflow.com/q/25252516
tags question: http://stackoverflow.com/q/25302390
tags question: http://stackoverflow.com/q/25334211
tags question: http://stackoverflow.com/q/25335300
tags question: http://stackoverflow.com/q/25243469
tags question: http://stackoverflow.com/q/25312826
tags question: http://stackoverflow.com/q/25235465
tags question: http://stackoverflow.com/q/25233501
tags question: http://stackoverflow.com/q/25320578
tags question: http://stackoverflow.com/q/25328766
tags question: http://stackoverflow.com/q/25295862
tags question: http://stackoverflow.com/q/25365730
tags question: http://stackoverflow.com/q/25282656
tags question: http://stackoverflow.com/q/25356969
tags question: http://stackoverflow.com/q/25318727
tags question: http://stackoverflow.com/q/25316777
tags question: http://stackoverflow.com/q/25244512
tags question: http://stackoverflow.com/q/25314977
tags question: http://stackoverflow.com/q/25385402
tags question: http://stackoverflow.com/q/25253279
tags question: http://stackoverflow.com/q/25271206
tags question: http://stackoverflow.com/q/25276591
tags question: http://stackoverflow.com/q/25311965
tags question: http://stackoverflow.com/q/25304397
tags question: http://stackoverflow.com/q/25357185
tags question: http://stackoverflow.com/q/25338930
tags question: http://stackoverflow.com/q/25361971
tags question: http://stackoverflow.com/q/25249617
tags question: http://stackoverflow.com/q/25336970
tags question: http://stackoverflow.com/q/25251639
tags question: http://stackoverflow.com/q/25292688
tags question: http://stackoverflow.com/q/25270372
tags question: http://stackoverflow.com/q/25373131
tags question: http://stackoverflow.com/q/25239184
tags question: http://stackoverflow.com/q/25247207
tags question: http://stackoverflow.com/q/25323052
tags question: http://stackoverflow.com/q/25337369
tags question: http://stackoverflow.com/q/25299807
tags question: http://stackoverflow.com/q/25274930
tags question: http://stackoverflow.com/q/25366280
tags question: http://stackoverflow.com/q/25298064
tags question: http://stackoverflow.com/q/25322905
tags question: http://stackoverflow.com/q/25233259
tags question: http://stackoverflow.com/q/25300853
tags question: http://stackoverflow.com/q/25320512
tags question: http://stackoverflow.com/q/25344045
tags question: http://stackoverflow.com/q/25341689
tags question: http://stackoverflow.com/q/25275091
tags question: http://stackoverflow.com/q/25285232
tags question: http://stackoverflow.com/q/25367820
tags question: http://stackoverflow.com/q/25310900
tags question: http://stackoverflow.com/q/25374015
tags question: http://stackoverflow.com/q/25335923
tags question: http://stackoverflow.com/q/25265119
tags question: http://stackoverflow.com/q/25280773
tags question: http://stackoverflow.com/q/25342342
tags question: http://stackoverflow.com/q/25269406
tags question: http://stackoverflow.com/q/25286966
tags question: http://stackoverflow.com/q/25249553
tags question: http://stackoverflow.com/q/25235517
tags question: http://stackoverflow.com/q/25336136
tags question: http://stackoverflow.com/q/25233887
tags question: http://stackoverflow.com/q/25382709
tags question: http://stackoverflow.com/q/25319300
tags question: http://stackoverflow.com/q/25350940
tags question: http://stackoverflow.com/q/25351357
tags question: http://stackoverflow.com/q/25331747
tags question: http://stackoverflow.com/q/25372825
tags question: http://stackoverflow.com/q/25249143
tags question: http://stackoverflow.com/q/25387090
tags question: http://stackoverflow.com/q/25245518
tags question: http://stackoverflow.com/q/25311066
tags question: http://stackoverflow.com/q/25369125
tags question: http://stackoverflow.com/q/25344881
tags question: http://stackoverflow.com/q/25285124
tags question: http://stackoverflow.com/q/25234489
tags question: http://stackoverflow.com/q/25265860

http://stackoverflow.com/q/25239934
has body: I Have been trying to use this http://www.gloucesterwebdesign.com/showhidecontent/ but instead of hitting a link I want some JavaScript to call this function like if(input == true){ toggleLayer('id'); } else if(input == false){ toggleLayer('id2'); } the script call the toogleLayer function, but nothing happens, and curse the input value is place within a other script there runs at page load up. I'm been wondering if this is the problem. anyone who like to comment on this? -- Update -- So i was ask for more of the code, http://pastebin.com/UD3tjz1s The value in the localStorage is set on a other page, so you only get this page after that. this is only to show what kind of data im using im a bit of a javaScript noob, so hope it's not to hard to read
has comment: http://stackoverflow.com/comment/39322877
tagged with: javascript
tagged with: show-hide
has comment: http://stackoverflow.com/comment/39323103
score: 0
has comment: http://stackoverflow.com/comment/39321078
answer count: 1
has title: trying to hide div with content on javascript call
has comment: http://stackoverflow.com/comment/39323581
has comment: http://stackoverflow.com/comment/39322240
has answer: http://stackoverflow.com/a/25241990
accepted answer: http://stackoverflow.com/a/25241990
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39320154
has comment: http://stackoverflow.com/comment/39322435
has comment: http://stackoverflow.com/comment/39319934
tagged with: css
has comment: http://stackoverflow.com/comment/39320514
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39320170
has comment: http://stackoverflow.com/comment/39322143
has comment: http://stackoverflow.com/comment/39319869
has comment: http://stackoverflow.com/comment/39322690
has comment: http://stackoverflow.com/comment/39322828
type: Question

http://stackoverflow.com/a/25284185
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25283821
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25283821
has comment: http://stackoverflow.com/comment/39401905
has body: You can define more blocks in your layout to fill. You can even define default values for blocks: see http://jade-lang.com/reference/extends/ layout.jade: html head meta(charset='UTF-8') title MyApplication meta(content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no', name='viewport') link(href='/bootstrap/dist/css//bootstrap.min.css', rel='stylesheet', type='text/css') body block content script(src='http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js') script(src='/bootstrap/dist/js/bootstrap.min.js', type='text/javascript') block script home.jade: extends layout block content // Content Header (Page header) section.content-header h1= title // Main content section.content block script script(type='text/javascript'). $(function() { alert('here!'); } This will render your content, js libraries and your script respectively. In layout.jade, indent script tags inside body.
score: 5

http://stackoverflow.com/comment/39404960
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25285562
has text: well then you use http as the server? Instead of using http just use https.

http://stackoverflow.com/a/25293589
score: 2
upvote count: 2
downvote count: 0
type: Answer
has body: var your_data = {location: {longitude: 50, latitude: 40}}; var location_arr = [your_data[location][longitude], your_data[location][latitude]];
answers question: http://stackoverflow.com/q/25293505

http://stackoverflow.com/q/25340931
accepted answer: http://stackoverflow.com/a/25342142
has comment: http://stackoverflow.com/comment/39508867
downvote count: 2
has comment: http://stackoverflow.com/comment/39508743
type: Question
tagged with: firebase
score: 3
has comment: http://stackoverflow.com/comment/39508761
has comment: http://stackoverflow.com/comment/39508750
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/39508316
has comment: http://stackoverflow.com/comment/39508768
has title: Get length of an array returned by firebase
has comment: http://stackoverflow.com/comment/39510143
has comment: http://stackoverflow.com/comment/39508222
tagged with: arrays
answer count: 1
has answer: http://stackoverflow.com/a/25342142
tagged with: angularfire
favorite count: 0
has body: The usual .length property of the array doesn't work on the arrays returned by firebase. Here is the console.log of the returned array: 0: Object 1: Object 2: Object 3: Object 4: Object $$added: function () { [native code] } $$error: function () { [native code] } $$moved: function () { [native code] } $$removed: function () { [native code] } $$updated: function () { [native code] } $add: function () { [native code] } $destroy: function () { [native code] } $getRecord: function () { [native code] } $indexFor: function () { [native code] } $inst: function () { [native code] } $keyAt: function () { [native code] } $loaded: function () { [native code] } $remove: function () { [native code] } $save: function () { [native code] } $watch: function () { [native code] } length: 5 __proto__: Array[0] concat: function concat() { [native code] } constructor: function Array() { [native code] } every: function every() { [native code] } filter: function filter() { [native code] } findIndex: function (a){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof a)throw new TypeError("predicate must be a function");for(var b,c=Object(this),d=c.length&gt;&gt;&gt;0,e=arguments[1],f=0;d&gt;f;f++)if(f in c&amp;&amp;(b=c[f],a.call(e,b,f,c)))return f;return-1} forEach: function forEach() { [native code] } indexOf: function indexOf() { [native code] } join: function join() { [native code] } lastIndexOf: function lastIndexOf() { [native code] } length: 0 map: function map() { [native code] } pop: function pop() { [native code] } push: function push() { [native code] } reduce: function reduce() { [native code] } reduceRight: function reduceRight() { [native code] } reverse: function reverse() { [native code] } shift: function shift() { [native code] } slice: function slice() { [native code] } some: function some() { [native code] } sort: function sort() { [native code] } splice: function splice() { [native code] } toLocaleString: function toL…
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39522840
has comment: http://stackoverflow.com/comment/39508212
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39508215

http://stackoverflow.com/comment/39446512
comment on: http://stackoverflow.com/q/25307916
has text: @Troy - that does not help.. it turns into an infinite recursive call and Eclipse just crashes..
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25365288
accepted answer: http://stackoverflow.com/a/25366306
has comment: http://stackoverflow.com/comment/39551379
type: AnsweredQuestion
has body: I have a div in the bottom right corner. Clicking to one of the corners, the div should move there through an animation. The problem seems to be that left and top properties are blocking their pairs. I could make it work without animation, but now I am stuck. You can try; it works if you move it to the left or top, but not backward. JSFiddle HTML: &lt;body&gt; &lt;div id="chatdiv" style="width:400px; height:260px; position: fixed; top:auto; left:auto;bottom:0px; right:0px; background-color: #FF9933" &gt; &lt;/div&gt; &lt;input id="chatlefttopbtn" type="button" style="position: fixed; left: 0px; top: 0px"/&gt; &lt;input id="chatrighttopbtn" type="button" style="position: fixed; right: 0px; top: 0px"/&gt; &lt;input id="chatleftbottombtn" type="button" style="position: fixed; left: 0px; bottom: 0px"/&gt; &lt;input id="chatrightbottombtn" type="button" style="position: fixed; right: 0px; bottom: 0px"/&gt; &lt;/body&gt; CSS: #chatdiv { width:400px; height:260px; position: absolute !important; top:auto; left:auto; bottom:0px; right:0px; background-color: #FF9933; } #chatlefttopbtn { position: fixed; left: 0px; top: 0px; } #chatrighttopbtn { position: fixed; top:0; right:0; } #chatleftbottombtn { position: fixed; left: 0px; bottom: 0px; } #chatrightbottombtn { position: fixed; bottom:0; right:0; } JavaScript: var firstMove = true; $(function() { document.getElementById("chatlefttopbtn").addEventListener("click", function() { moveChatWindow("lefttop"); }, false); document.getElementById("chatrighttopbtn").addEventListener("click", function() { moveChatWindow("righttop"); }, false); document.getElementById("chatleftbottombtn").addEventListener("click", function() { moveChatWindow("leftbottom"); }, false); document.getElementById("chatrightbottombtn").addEventListener("click", function() { moveChatWindow("rightbottom"); }, false); }); function moveChatWindow(moveTo) { var chatWindow = $("#chatdiv"); var left = chatWindow.offset().left; var right = ($(window).width() - (chatWi…
has title: Animating a div to the corners of the website
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39551479
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39551519
has answer: http://stackoverflow.com/a/25366306
score: 0
possible better answer: http://stackoverflow.com/a/25365812
has answer: http://stackoverflow.com/a/25365812
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39551641

http://stackoverflow.com/comment/39514235
type: AnswerComment
comment on: http://stackoverflow.com/a/25344554
type: Comment
has text: On the server side i have ActionFilterAttribute which intercepts every request to validate a token which have user id and etc.. and also a base controller that have current user object in the API. so you want me to create another Filter to check if the user id in the token equals user id send from Clint.!
score: 0

http://stackoverflow.com/a/25318949
answers question: http://stackoverflow.com/q/25318128
score: 0
accepted answer of: http://stackoverflow.com/q/25318128
type: AcceptedAnswer
type: Answer
has body: It's more related to the controller that's being created, not the template. And technically I'd say it shouldn't work on either, but it appears there's some route where if you don't define a controller, and that type of controller hasn't been created, create it, and use the current controller/model as the model backing it. Really you should be providing a controller when using render if you're expecting it to have that controller as the backing controller. renderTemplate: function(controller, model){ this.render(); this.render('color-list', { outlet: "named", into: 'colors', controller: controller }); } http://emberjs.jsbin.com/cevagocekofu/3/edit

http://stackoverflow.com/a/25285334
has comment: http://stackoverflow.com/comment/39404482
has body: From what you've posted in the question, your columns theme and username appear to be of varchar type. Try and modify your query to the following: $sql = "UPDATE users SET theme = '".m($theme)."' WHERE username = '".m($user)."'";
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25284887

http://stackoverflow.com/comment/39371066
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25266213
has text: Yes -- the point of the callback in the .load jquery function is that the callback is called after the new content is in the DOM. The source code is just a blueprint for the browser to initialize the DOM. Think of it as a big object in memory that has a lot more to it than the source HTML. Here's a little explanation of it: http://css-tricks.com/dom/

http://stackoverflow.com/comment/39535094
comment on: http://stackoverflow.com/a/25308149
has text: The data I'm passing to my JS script looks like this : [{"ID":"6","Name":"Rotterdam","CountryCode":"NLD","District":"Zuid-Holland","Population":"593321"},{"ID":"7","Name":"Haag","CountryCode":"NLD","District":"Zuid-Holland","Population":"440900"}]
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25274313
favorite count: 0
has answer: http://stackoverflow.com/a/25277414
tagged with: backbone.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39384872
tagged with: requirejs
downvote count: 0
score: 1
has body: I have just upgraded from Backbone 1.0 to Backbone 1.1.2. I use requireJS and I use r.js to optimize the files for production. In my non-optimized environment, everything works great. However, after I use r.js to compress the files, I get the error "Backbone is not defined." From my searches online this seems to have something to do with an AMD implementation that was introduced in Backbone 1.1.1. The recommendation seems to be to set wrapShim: true (https://github.com/jrburke/r.js/issues/623) However, I have tried this, and am still getting the same error. Any suggestions as to how I can fix this? Or should I just stick with the old version of backbone?
has comment: http://stackoverflow.com/comment/39644543
type: Question
has title: "Backbone is not defined" error with Backbone 1.1.2 and RequireJS
tagged with: javascript
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39384750

http://stackoverflow.com/comment/39437526
type: QuestionComment
has text: how i get event button appended
comment on: http://stackoverflow.com/q/25303144
score: 0
type: Comment

http://stackoverflow.com/comment/39337464
comment on: http://stackoverflow.com/a/25248919
score: 0
type: AnswerComment
type: Comment
has text: Your pattern is good. Could You remove &nbsp; (space) from string using regex with your pattern.

http://stackoverflow.com/a/25406613
has comment: http://stackoverflow.com/comment/39637162
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25248493
has body: Reduce the sleeping time and set some priority or timers to the other blocks as well. so that after certain limit of time blocks get displayed according to priority. This is how you can get the output in your desired way.

http://stackoverflow.com/q/25353326
has answer: http://stackoverflow.com/a/25353438
type: AnsweredQuestion
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25353362
type: Question
upvote count: 6
has body: I'm trying to learn JavaScript and the DOM. Based on some examples on the Internet I have created this HTML: &lt;input type="text" id="amount3"&gt; Then later in the JavaScript code I have this line. document.getElementById("amount3").value= x; The code works well. I'm able to change what's shown inside that text input. But now I'm trying to understand the underlying code and how it all works. I looked up some DOM reference in https://developer.mozilla.org/en-US/docs/Web/API/document.getElementById. I can see that the method should return an object Element. However, element does not contain a property called value. But I notice there is a sub-object called HTMLElement which has a sub-object HTMLInputElement. And that object contains a property called value. Is that code above somehow typecast as the child object? Why does the value property work as such?
possible better answer: http://stackoverflow.com/a/25353399
has answer: http://stackoverflow.com/a/25353399
answer count: 3
tagged with: dom
has answer: http://stackoverflow.com/a/25353362
tagged with: javascript
score: 6
has title: Why does document.getElementById return an object that has a property called 'value'?

http://stackoverflow.com/q/25281752
favorite count: 0
has comment: http://stackoverflow.com/comment/39397518
has answer: http://stackoverflow.com/a/25281795
has body: For the following snippet: &lt;body&gt; &lt;p id="demo"&gt;&lt;/p&gt; &lt;script&gt; cars = ("BMW", "Volvo", "Saab", "Ford","Ranjith"); text=""; for(i=0;i&lt;cars.length;i++) { text+=cars[i] +"&lt;br/&gt;" } document.getElementById("demo").innerHTML = text; &lt;/script&gt; &lt;/body&gt; Got the output as : R a n j i t h The expected output was: BMW Volvo Saab Ford Ranjith What do I need change in my code to get the expected output. what is the reason for such output?
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25281905
has answer: http://stackoverflow.com/a/25281905
type: AnsweredQuestion
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25281795
linked to: http://stackoverflow.com/q/931872
tagged with: javascript
has comment: http://stackoverflow.com/comment/39397177
score: 0
answer count: 2
has title: Why the script gives unexpected output
has comment: http://stackoverflow.com/comment/39397408

http://stackoverflow.com/comment/39618032
has text: @wen... window.variable..is just a way to store values global to the page..just like you store in data-attribute=your_values...so you store it in global variable which is available to entire page and then acces it as you do usually.. give it a try...
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25379631
type: AnswerComment

http://stackoverflow.com/comment/64904281
type: Comment
has text: This is not working the way it should. If I zoom in/our and drag to the stage it doesn't go to the right position
comment on: http://stackoverflow.com/a/35930713
type: AnswerComment
score: 0

http://stackoverflow.com/a/25386689
has comment: http://stackoverflow.com/comment/39608381
has comment: http://stackoverflow.com/comment/39650615
downvote count: 0
has comment: http://stackoverflow.com/comment/39636844
has body: The channelInterpretation means the merger node will mix the stereo oscillator connections to two channels each - but then because you have an explicit channelCountMode, it's stacking the two-channels-per-connection to get four channels and (because it's explicit) just dropping the top two channels. Unfortunately the second two channels are the two channels from the second input - so it loses all channels from the second connection. In general, you shouldn't need to mess with the channelCount interpretation stuff, and it will do the right thing for stereo.
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/41702294
has comment: http://stackoverflow.com/comment/39650220
answers question: http://stackoverflow.com/q/25375751

http://stackoverflow.com/q/25357383
tagged with: javascript
favorite count: 0
score: 0
has body: I'm trying to recreate the effect shown in the gif here. It's fine even to have two separate images - I don't need to recreate the greyscale/blur effect (although I can with webkit filters) - it's just the masking that I'm having trouble with. Basically I've got a carousel slider, and as it slides left and right, the background underneath the current slide will be blurred, to make the text on top more visible. I can't manage to keep the background in the same place as the slider moves along as a mask. How can I recreate this? edit: I've managed to figure this out: http://jsfiddle.net/9xk410wk/18/ I used CSS transforms in opposite directions: .tile { -webkit-transform: translate3d(-400px, 0px, 0px); } .blur &gt; div { -webkit-transform: translate3d(400px, 0px, 0px); } .tile:hover { -webkit-transform: translate3d(400px, 0px, 0px); } .tile:hover .blur &gt; div { -webkit-transform: translate3d(-400px, 0px, 0px); }
has comment: http://stackoverflow.com/comment/39569512
tagged with: css
type: UnansweredQuestion
upvote count: 1
downvote count: 1
tagged with: mask
has comment: http://stackoverflow.com/comment/39537350
has answer: http://stackoverflow.com/a/25357826
has title: How can I recreate this masking effect in CSS/JavaScript?
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25358339
tagged with: grayscale

http://stackoverflow.com/comment/39328672
has text: As @sp00m indicates, you'll have to use some sort of asynchronous communications channel like WebSockets, Server-Sent Events or Long Polling to get the notification / data to the other client. Of course you could always poll periodically but that creates all kinds of scale problems. Take a look at Atmosphere (https://github.com/Atmosphere/atmosphere) which provides a solution that abstracts away some of the complexities of building this type of application.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25243816
score: 0

http://stackoverflow.com/q/25245411
has comment: http://stackoverflow.com/comment/39330254
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39330199
has comment: http://stackoverflow.com/comment/39330188
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39330263
tagged with: jquery
has comment: http://stackoverflow.com/comment/39330214
score: 0
has comment: http://stackoverflow.com/comment/39330902
answer count: 1
has comment: http://stackoverflow.com/comment/39330636
has answer: http://stackoverflow.com/a/25245867
accepted answer: http://stackoverflow.com/a/25245867
has title: ajax form is not working how it should
tagged with: ajax
has body: hello i been working on a form using ajax but when it comes down to validating a select box problem 1) every time i leave the job_est value empty the form is still submitted as if it was validated problem 2) can i use async in ajax sorry for my writing skills Thank you ! We have received your message. Basic Contact Details Name Last Name: Phone Number Email Postcode: House Number: Street Name: County: --SELECT-- Bedford Dunstable Luton Job Details You Would Like To Book A: --SELECT--</options> Job Estimation Service Your Booking: --SELECT-- Gardening Landscaping Painting & Decorating Decking & Fencing Any Additional Information
has comment: http://stackoverflow.com/comment/39330988
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39330680
tagged with: php

http://stackoverflow.com/comment/39866745
has text: This does work and does answer the question correctly. In safari, the pdf print dialog will open (tested with gen 1 ipad). And you've earned the bounty. My problem still persists and I should have detailed the exact problem: The web app is being served inside of an ios webview, which I thought would behave the same as plain Safari. So this solution does not work in an ios webview. I know it is possible to write ios code to interact with the iframe and trigger the print. My goal is to do it in javascript, if you know of anything, please help.
score: 0
comment on: http://stackoverflow.com/a/25522653
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25374208
score: 3
type: AcceptedAnswer
has body: From the ECMAScript specification of toString applied to the Number type: 7. If 0 &lt; n ≤ 21, return the String consisting of the most significant n digits of the decimal representation of s, followed by a decimal point ‘.’, followed by the remaining k−n digits of the decimal representation of s. 8. If −6 &lt; n ≤ 0, return the String consisting of the character ‘0’, followed by a decimal point ‘.’, followed by −n occurrences of the character ‘0’, followed by the k digits of the decimal representation of s. 9. Otherwise, if k = 1, return the String consisting of the single digit of s, followed by lowercase character ‘e’, followed by a plus sign ‘+’ or minus sign ‘−’ according to whether n−1 is positive or negative, followed by the decimal representation of the integer abs(n−1) (with no leading zeroes). n is effectively the exponent of the number. So this says that if the exponent is between -7 and 21 the number should be displayed normally, otherwise exponential notation should be used.
downvote count: 0
answers question: http://stackoverflow.com/q/25374051
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25374051

http://stackoverflow.com/comment/39367435
comment on: http://stackoverflow.com/a/25254743
type: AnswerComment
has text: In this parseInt what does the 10 represent?
score: 0
type: Comment

http://stackoverflow.com/q/25296929
score: 2
upvote count: 2
linked to: http://stackoverflow.com/q/17267417
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25298269
has comment: http://stackoverflow.com/comment/39426644
has comment: http://stackoverflow.com/comment/39426310
has title: Prevent race condition when concurrent API calls that write to database occurs (Or when the server is slow)
type: Question
tagged with: upsert
answer count: 1
downvote count: 0
has body: Lets imagine a scenario where you would have an endpoint used to create a user. This would be within a restful application, so lets imagine that a rich client calls this API endpoint. exports.createUser = function(req,res){ if(req.body){ //Check if email has already been used db.User.find({where:{email:req.body.email}}).success(function(user){ if(user === null || user === undefined){ //Create user res.send(201); } else { res.json(409,{error: 'User already exists'}); } }); } else { res.send(400); } }; If I were to call this endpoint multiple time really fast, it would be possible to create multiple records with the same email in the database, even though you queryed the user table to make sure there would be no duplicate. I'm sure this is a common problem, but how would one go about preventing this issue? I tough limiting the number of request to a certain endpoints, but that doesn't seem like a very good solution. Any ideas? Thank you very much!
tagged with: javascript
tagged with: postgresql
has answer: http://stackoverflow.com/a/25298269
tagged with: asynchronous
tagged with: node.js
favorite count: 0

http://stackoverflow.com/q/25262308
has answer: http://stackoverflow.com/a/25263260
has body: I'm using Play framework and trying to send a Json string from the server as a parameter to a Scala template. @(aj: String) @import play.api.libs.json.Json &lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;body&gt; &lt;div id="container"&gt; @aj &lt;/div&gt; &lt;script&gt; var ab=@Json.toJson(aj); var a = JSON.parse(ab); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; I get the Json String displayed inside the container div. But I'm not able to get the Json out of 'aj' into a javascript variable. Please help.
type: Question
tagged with: scala
accepted answer: http://stackoverflow.com/a/25263260
tagged with: http://stackoverflow.com/tag/json
score: 0
answer count: 1
has title: How to get Json into a JS variable out of a Scala Json string?
tagged with: javascript
tagged with: playframework
type: AnsweredQuestion

http://stackoverflow.com/comment/45064776
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25408260
has text: i did but it never got looked at so i ended up just creating my own fork, the original is now getting some attention again, in the past month, but there are quite a few similar pull requests for this so im just going to leave it in my fork and try and keep my fork as much inline, just with any features i think are really useful that aren't present in the original.
score: 0

http://stackoverflow.com/comment/39325617
type: Comment
type: QuestionComment
has text: possible duplicate of [How do I add a class to a given element?](http://stackoverflow.com/questions/507138/how-do-i-add-a-class-to-a-given-element)
score: 0
comment on: http://stackoverflow.com/q/25243058

http://stackoverflow.com/comment/39546738
type: QuestionComment
comment on: http://stackoverflow.com/q/25360633
type: Comment
has text: @user500468 very much so, look at that invalid junk you posted!
score: 0

http://stackoverflow.com/comment/39513194
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25344033
has text: If the context of `this` changed, why would I be able to do `alert(this.book)` on my bookView?

http://stackoverflow.com/comment/39556507
type: QuestionComment
has text: Are you adding elements to the list dynamically with Javascript, e.g. using AJAX? Then you need to use event delegation, see http://stackoverflow.com/questions/203198/event-binding-on-dynamically-created-elements
score: 1
comment on: http://stackoverflow.com/q/25367836
type: Comment

http://stackoverflow.com/q/25298377
type: Question
score: 3
has title: Angularjs how to conditionally check a checkbox based upon existence of repeat element in another list
has answer: http://stackoverflow.com/a/25298454
has body: as a very new angularjs user with a cshtml page, during page load of a modal window, I am trying to check a repeating checkbox if it exists in another list. the code below is conceptual: &lt;li data-ng-repeat="analysisType in analysisTypes|limitTo:12 | limitTo: -6"&gt; &lt;input type="checkbox" ng-class="{'checked' : project.analysisTypes.indexOf(analysisType) != -1}" /&gt; {{analysisType.name}} &lt;/li&gt; specifically, if analysisType is found in project.analysisTypes array, I would like to check the checkbox. I am nearly certain that it is possible, but can't figure out how. analysisTypes and project both exist on the $scope, so that data is available. or maybe the solution is to bind the checkboxes directly to project.analysisTypes, but I still need to be able to dynamically render the domain checkboxes
upvote count: 3
answer count: 2
accepted answer: http://stackoverflow.com/a/25301962
tagged with: javascript
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25301962
possible better answer: http://stackoverflow.com/a/25298454
tagged with: checkbox
tagged with: angularjs-ng-repeat
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/39336138
has text: `:paramID1/:paramID2` can be removed they are just to explain that multiple parameters can be received along with the request but from your sample they are not required. From the client side `param1` and `param2` represents `1` and `abc` in the request `/api/1/abc`
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25248427

http://stackoverflow.com/a/25269030
answers question: http://stackoverflow.com/q/25268938
has comment: http://stackoverflow.com/comment/39398453
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39397110
has comment: http://stackoverflow.com/comment/39374986
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39398099
has comment: http://stackoverflow.com/comment/39397489
has body: setTimeout only executes once after the given interval, what you have / mean is setInterval. The return value of those methods is an identifier. Using this ID you can delete an interval. How you can do this: initial check on document ready + apply setInterval with 1 minute (save the return value in a variable) if the function called every minute has items in the list, remove the 1-minute-interval, setup a new one that checks every 5 seconds . var intervalCall = window.setInterval(function() { }, 60000); window.clearTimeout(intervalCall); This is your reference: https://developer.mozilla.org/en-US/docs/Web/API/Window.setInterval
accepted answer of: http://stackoverflow.com/q/25268938
has comment: http://stackoverflow.com/comment/39375138
type: Answer

http://stackoverflow.com/q/25361548
favorite count: 0
has answer: http://stackoverflow.com/a/25377949
has body: I am trying to add a function to each and every entity on save event. For that I have added a button to application ribbon , so it will be shown on each and every entity and attached my function to it. But now I have to add this function to onsave of form without clicking the button. Here is my function:- function test() { alert("hello"); Xrm.Page.data.entity.addOnSave(addMethod); } function addMethod() { alert("i am added"); }
type: UnansweredQuestion
downvote count: 1
tagged with: dynamics-crm-2013
type: Question
has title: call a function attached to custom button on onload of CRM Form
tagged with: crm
score: -1
upvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/39372972
has text: At least my solution works Blazemonger. Also it was fairly vague what he was asking so this was a solution that worked quickly and effectively (unlike other answer you downvoted)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25268337
type: Comment

http://stackoverflow.com/a/25373777
has comment: http://stackoverflow.com/comment/39594299
accepted answer of: http://stackoverflow.com/q/25373524
type: AcceptedAnswer
has body: since you are using html string forget about the checkboxes array. your form should wrap the table not the other way around. give your form an id &lt;form id="form1"&gt; get the form and find all checkboxes function findCheckedItems() { var checkedItems = []; var form = getElementById('form1'); var inputs = form.getElementsByTagName("input"); var checkboxIndex = 0; for (var i = 0; i &lt; inputs.length; i++) { if (inputs[i].type.toLowerCase() === 'checkbox') { if (inputs[i].checked) { var data = item[checkboxIndex]; checkedItems.push(data); // do whatever you like with the data } checkboxIndex++; } } return checkedItems; }
type: Answer
has comment: http://stackoverflow.com/comment/39599404
answers question: http://stackoverflow.com/q/25373524
score: 0

http://stackoverflow.com/comment/39592642
score: 0
type: Comment
has text: filter output must be the same `filtered` object derived from input.
comment on: http://stackoverflow.com/a/25379318
type: AnswerComment

http://stackoverflow.com/q/25233295
has comment: http://stackoverflow.com/comment/39307452
has comment: http://stackoverflow.com/comment/39308208
score: 0
has comment: http://stackoverflow.com/comment/39307753
tagged with: parsing
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39307302
has comment: http://stackoverflow.com/comment/39307544
has comment: http://stackoverflow.com/comment/39361581
tagged with: http://stackoverflow.com/tag/json
has body: I need to parse a txt file which is stored in a remote server using jquery/Ajax. It is a text file but written in Json format. It looks like this: { "id" : "someId", "title" : "someTitle ", "data" : ["a","b","c"] } I need to get the content of the data array. Can this be done? edit: this is the code im working on. $.ajax({ url : "someURL", type : 'GET', data : "json", success : function(res) { $.each(res, function(i, item) { console.log(item.title); }); }, error : function(data) { console.log("error"); } });
has title: Getting a txt file in json format using ajax and parsing it
type: Question
has comment: http://stackoverflow.com/comment/39307630
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39307487
tagged with: ajax

http://stackoverflow.com/comment/39417338
has text: A couple questions. I want the effect to be done multiple times bound to a checkbox. Do i set the loop attribute to false or true? I was experimenting with changing the loop attribute but I would get weird issues. Another thing. I am using this in conjunction with Backbone/Marionette. I will have multiple boxes. Is there a way to bind one route to all Boxes? Thank you so much for helping me! I'm going to edit my question to include some more examples of what I have done
type: Comment
comment on: http://stackoverflow.com/a/25281151
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39483584
has text: @DeewendraShrestha no it doesn't show up in the network tab, so no server is involved.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25282920

http://stackoverflow.com/comment/39373929
type: AnswerComment
has text: Is this ok to inject in the header via javascript as I am trying to do in the question? This is a script that runs over others' websites, and not ones I have control over.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25268833

http://stackoverflow.com/a/25277021
score: 1
upvote count: 1
downvote count: 0
type: Answer
has body: Try using setTimeout(). It can take a function and a time as arguments: setTimeout(function(){alert("Hello")}, 3000);
answers question: http://stackoverflow.com/q/25276998

http://stackoverflow.com/comment/39365968
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25264449
has text: All the rows of the table would be `table.rows.length`. The above will only get those in the first *tbody* element and not count those in other table sections or in header or footer setions.
type: AnswerComment

http://stackoverflow.com/comment/39348342
score: 0
has text: Inorder for a click to happen, mousedown and mouseup must happen on the same element. In your case as mousedown happens it just hides.. You can see it here http://jsfiddle.net/aktobc0p/
type: Comment
comment on: http://stackoverflow.com/q/25254778
type: QuestionComment

http://stackoverflow.com/q/25357102
tagged with: dojo
has comment: http://stackoverflow.com/comment/39536270
tagged with: dgrid
answer count: 0
tagged with: http://stackoverflow.com/tag/json
has body: I am currently working on a project in DOJO and struck at this point. I am using dgrid in dojo to generate table and I need to have checkbox in the first column. Here is Code that is working fine but my requirement is different. I am taking values for headers and data from a JSON file Here is the Json file ABC.JSON : { "properties": { "dataLoading": "full", "classNames": ["abc"], "autoRefresh": 60, "sort" : [ {"attribute":"raiseTime", "decending":true} ] }, "columns": [ [[ { "field":"abc","label":"my label","sortable":true }, { "field":"def","label":"second label","sortable":true } ]], [[ { "field":"fgh", "label":"third label","sortable":true }, { "field":"ijk", "label":"fourth label","sortable":true } ]]] } But to have checkbox feature in table we should have : var grid = new SelectionGrid({ columns: [ selector({ label: '' }), { field: 'firstName', label: 'First Name', sortable: false }, { field: 'lastName', label: 'Last Name', sortable: false } ], selectionMode: 'none' }, 'grid'); So, In my JSON I need to call selector() on label. How can I do that in JSON ? Is there any way?
type: Question
has comment: http://stackoverflow.com/comment/39567026
has comment: http://stackoverflow.com/comment/71563272
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39545683
has comment: http://stackoverflow.com/comment/39578077
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/24265557
linked to: http://stackoverflow.com/q/22428307
has title: How to call dojo function on JSON object

http://stackoverflow.com/a/55349879
type: Answer
has comment: http://stackoverflow.com/comment/115676257
upvote count: 1
score: 1
downvote count: 0
has body: Yeah, sorry I'm kind-of late to this question. But I have figured it out on my own... You can clone this repository or follow the instructions down below: Or you can set things up like this: In your index.html put source to all 3 of these files: Processing.js: https://raw.githubusercontent.com/Khan/processing-js/66bec3a3ae88262fcb8e420f7fa581b46f91a052/processing.js loadKa.js: This is production code to load multiple separate files together: !(function(window, JSON, localStorage) { function createProcessing() { var args = Array.prototype.slice.call(arguments); args.push({ beginCode: "with(processing)\n{", endCode: "}"}); var any = combine.apply(this, args); this.cache = window.cache = {}; this.cache.loadedImages = window.cache.loadedImages = {}; this.cache.imageNames = window.cache.imageNames = [ "avatars/aqualine-sapling", "avatars/aqualine-seed", "avatars/aqualine-seedling", "avatars/aqualine-tree", "avatars/aqualine-ultimate", "avatars/avatar-team", "avatars/duskpin-sapling", "avatars/duskpin-seed", "avatars/duskpin-tree", "avatars/duskpin-ultimate", "avatars/leaf-blue", "avatars/leaf-green", "avatars/leaf-grey", "avatars/leaf-orange", "avatars/leaf-red", "avatars/leaf-yellow", "avatars/leafers-sapling", "avatars/leafers-seed", "avatars/leafers-seedling", "avatars/leafers-tree", "avatars/leafers-ultimate", "avatars/marcimus", "avatars/marcimus-orange", "avatars/marcimus-purple", "avatars/marcimus-red", "avatars/mr-pants", "avatars/mr-pants-green", "avatars/mr-pants-orange", "avatars/mr-pants-pink", "avatars/mr-pants-purple", "avatars/mr-pants-with-hat", "avatars/mr-pink", "avatars/mr-pink-green", "avatars/mr-pink-orange", "avatars/old-spice-man", "avatars/old-spice-man-blue", "avatars/orange-juice-squid", "avatars/piceratops-sapling", "avatars/piceratops-seed", "avatars/piceratops-seedling", "avatars/piceratops-tree", "avatars/piceratops-ultimate", "avatars/primosaur-sapling", "avatars/primosaur-seed", "avatars/primosaur-seedling", "avatars/primosaur-tree", "avat…
answers question: http://stackoverflow.com/q/25341597

http://stackoverflow.com/comment/39587428
has text: I'm trying to make a kiosk browser that has zero caching, history, etc.
comment on: http://stackoverflow.com/q/25383855
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25354927
tagged with: canvas
tagged with: graphics2d
answer count: 1
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25355400
type: Question
has title: multiple canvas as buttons with onclick event
tagged with: javascript
has body: I'm having really big problems with canvas code that I'm using only 1 time in the page (in logo) working fine, and that I'm trying to use it as buttons for menu and here is the problem, I don't know really what's im doing wrong, hope some of u help me. it's the code that I'm using for the logo and is working fine: HTML CODE: canvas Canvas and it's CSS CODE: #broken-glass { position: absolute; left: 0px; top: 0px; width: 100%; } #logo h1 { text-align: center; font-weight: 700; width: 100%; color: #000; position: absolute; left: 0px; -moz-user-select: none; cursor: pointer; margin-top: 27px; font-size: 63px; line-height: 1.4; top: 0px; margin-bottom: 5px; text-rendering: optimizelegibility; font-family: Calibri,"PT Sans","Trebuchet MS","Helvetica Neue",Arial; } the big problem comes when i change the id's (#) to classes (.) and the "id" tag to "class" tag in the html, the canvas is overlapped... the text of h1 tag is out of the canvas... and just the hell of problems, can someone tell me what I'm doing wrong?, how to fix it, I'm trying it during hours... too much thanks in advance!.
score: 0

http://stackoverflow.com/a/25611016
accepted answer of: http://stackoverflow.com/q/25276000
has body: It turns out my issue was with the $('input[type="text"]').keyup(function(){, specifically 'keyup'. Keyup would clear my searchbox content by default before sending the data which appended to the url. I merely changed it to keydown and everything worked perfectly. Thanks for all your suggestions.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25276000
type: Answer
score: 0

http://stackoverflow.com/a/25277007
answers question: http://stackoverflow.com/q/25276762
upvote count: 5
has comment: http://stackoverflow.com/comment/39415047
score: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/39414973
type: Answer
has body: Primitive types In javascript number, strings, boolean fall under the category of primitives. And whenever such types are passed as arguments to a function, a separate copy is created inside the function scope which has no impact on the outer scope for e.g var number_1 = 32; var number_2 = 43; addition(32,43); //number_1 is 32 here //number_2 is 43 here function addition(number_1,number_2) { number_1 += 1; // number_1 is 33 number_2 += 1; // number_2 is 44 } Reference types Reference types are slightly different Take the following example var obj = new Object(); fn(obj); function fn(object){ object.property = "test"; //obj.property is "test" object = new Object(); object.property = "test 2"; //obj.property is still "test" //obj.property should have changed to "test 2", //if it had been passed by reference } if it had been passed by reference , obj.property should have got changed to "test 2" after the last statement inside fn, but it didnt. so when passing reference values to functions, a separate copy of the pointer to the object is passed.

http://stackoverflow.com/comment/39358789
type: QuestionComment
has text: @EoiFirst correct! Sorry, didn't read properly :-(
score: 0
comment on: http://stackoverflow.com/q/25260752
type: Comment

http://stackoverflow.com/comment/39577868
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25374112
has text: How about instead of just posting code you actually explain what the `<%= %>` means and why `<% %>` wouldn't work?
score: 0

http://stackoverflow.com/a/25352984
upvote count: 1
answers question: http://stackoverflow.com/q/25340923
type: Answer
downvote count: 0
score: 1
has body: Yes, your own answer is correct. But you may be interested in using a more data-driven and declarative approach, as follows: And var items_tmpl = $.templates("#items_template"); var items = []; items_tmpl.link('#view', {items: items}, { insert: function(ev) { if (ev.which === 13) { // 'this' is the data item $.observable(items).insert({name: this.newName}); $.observable(this).setProperty('newName', ''); } }, remove: function() { // 'this' is the data item $.observable(items).remove($.inArray(this, items)); } }); Alternatives for remove would be: remove: function(ev) { var view = $.view(ev.target); $.observable(items).remove(view.index); } Or: remove: function(ev, eventArgs) { var view = $.view(eventArgs.linkCtx.elem); $.observable(items).remove(view.index); } http://jsfiddle.net/BorisMoore/f90vn4mg/ BTW new documentation for {on ... event binding coming soon on http://jsviews.com

http://stackoverflow.com/a/25357777
has body: If you provide sample HTML it will be better, but maybe in the page DOM after each question there is a input with corresponding labels? If not try with your own algorithm that will pair question-answer fields. As to store last word you ca try with storeText or store commands.
type: Answer
answers question: http://stackoverflow.com/q/25248601
score: 0

http://stackoverflow.com/comment/39338275
type: Comment
comment on: http://stackoverflow.com/q/25249617
type: QuestionComment
has text: http://dailyjs.com/2012/10/15/preparing-for-esnext/
score: 1

http://stackoverflow.com/q/25286049
favorite count: 0
has comment: http://stackoverflow.com/comment/39405477
has comment: http://stackoverflow.com/comment/39405515
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39405499
score: 2
has comment: http://stackoverflow.com/comment/39405517
has answer: http://stackoverflow.com/a/25286228
has title: How to delay form submit?
tagged with: forms
type: Question
has comment: http://stackoverflow.com/comment/39405279
answer count: 2
has comment: http://stackoverflow.com/comment/39406255
has comment: http://stackoverflow.com/comment/39405392
has body: I have a form that once the user clicks the Submit button - it runs 2 functions - (1) it pops up with a div that says 'Item added successfully to basket' then (2) a prefill function that sends the selected options to a Mals-E cart. It works, but what i need to do is not let the form submit until the popup has shown for around 5 seconds - currently it flashes for a split second as the form is submitted immediately with the prefill function. Can anyone help with this please? Script Below: function showDiv(f) { document.getElementById('basket-center').style.display='block'; } function prefill(f) { var val = document.forms["basket"].elements["product[2]"].value; val = val + gettext(document.forms["form"].elements['users']); document.forms["basket"].elements["product[2]"].value = val; document.forms["basket"].elements["price"].value = document.forms["form"].elements['sum'].value; return false; } Form Script Here: &lt;form id="basket" name="basket" action="http://ww8.aitsafe.com/cf/add.cfm" method="post" onsubmit="showDiv(); prefill();"&gt; &lt;input name="userid" type="hidden" value="A1251773"/&gt; &lt;input type="hidden" name="nocart"/&gt; &lt;input name="product[]" type="hidden" value="{b}Sage 50 Accounts (The VAT Edition) 2014{/b}"/&gt; &lt;input name="product[2]" type="hidden" value="{br}"/&gt; &lt;input name="product[3]" type="hidden" value="{br}FREE Installation onto 1 Server/PC &amp; Same Day Download when ordered before 3pm"/&gt; &lt;input name="price" type="hidden" value=""/&gt; &lt;input name="noqty" type="hidden" value="1"/&gt; &lt;input name="thumb" type="hidden" value="sage50-thumb.png"/&gt; &lt;input name="return" type="hidden" value="http://10.10.0.195/reality-solutions-development/sage-50-accounts.php"/&gt; &lt;input type="image" src="img/buynow-button-green.jpg" border="0" alt="Buy Now" style="float:right; margin-top:-24px"/&gt; &lt;/form&gt;
downvote count: 0
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/951021
has comment: http://stackoverflow.com/comment/39405448
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25286238

http://stackoverflow.com/a/25262316
upvote count: 1
has body: Initialize everything else and then set status in an if statement: var p={'revEv':[{'EventsId':rand, 'core':Ext.fly('coreVal_'+id).dom.innerHTML, 'transactionType':{'transactionTypeId':Ext.fly('oppVal_'+id).dom.innerHTML,'description':Ext.fly("oppDesc_"+id).dom.innerHTML}, 'timing':Ext.getCmp('quarter_'+id).getValue()},]} if (Ext.getCmp('Val_'+id).getValue()!='E') { p.revEv[0].Status = Ext.getCmp('Val_'+id).getValue(), }
accepted answer of: http://stackoverflow.com/q/25262271
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25262271
type: Answer
score: 1

http://stackoverflow.com/q/25343831
possible better answer: http://stackoverflow.com/a/41453563
tagged with: php
type: AnsweredQuestion
score: 2
upvote count: 3
tagged with: http://stackoverflow.com/tag/json
downvote count: 1
tagged with: post
linked to: http://stackoverflow.com/q/35329384
type: Question
has answer: http://stackoverflow.com/a/25343848
has title: Undefined function: .succes in $http.post (angular.js)
has answer: http://stackoverflow.com/a/25343854
has comment: http://stackoverflow.com/comment/39512902
tagged with: javascript
has comment: http://stackoverflow.com/comment/39512895
answer count: 3
has comment: http://stackoverflow.com/comment/70113575
accepted answer: http://stackoverflow.com/a/25343848
favorite count: 0
has answer: http://stackoverflow.com/a/41453563
tagged with: angularjs
has body: I've been trying to make a search with Angular JS but I get this weird error: TypeError: undefined is not a function and it is on the .success Here is my code: Can anyone tell my why it gives me an error on the .succes? Am I not allowed to call it there? Thanks in advance!

http://stackoverflow.com/comment/39497527
has text: The answer is "yes". I think 2013 is better but still not ideal with Razor syntax when switching between C# and HTML mode. Not sure how this would be helpful...
comment on: http://stackoverflow.com/q/25334986
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25318868
has answer: http://stackoverflow.com/a/25319280
has comment: http://stackoverflow.com/comment/39466753
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25319280
has comment: http://stackoverflow.com/comment/39466866
type: Question
score: 0
has title: Javascript dynamic function
tagged with: function
answer count: 1
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/39466843
has body: I have associative arrays within an array that is created and passed as an argument within an object method like so: myObject.method([ { id: "mystring", myfun: function(g) { return 'Value: ' + g.value + g.rows[0]['value']; }, a: "mysecondstring" }, id: "mystring_a", myfun: function(g) { return 'Value: ' + g.value + g.rows[0]['value']; }, a: "mysecondstring_a" }]); I have plenty of instances of this throughout my code and this works fine. The value of g is not declared beforehand. Now I want to change the myfun: function(g)... at run time, which requires that I declare my associative array before calling myObject.method(). Here is what I have tried: myfun: new Function("g", "return 'Value: ' + g.value + " + my_dynamic_variable) no good, then tried: var fn = new Function("g", "return 'Value: ' + g.value + " + my_dynamic_variable) with myfun: fn(g) and this myfun: function(g) { return fn } and this var fn = function(g) { return eval('Value: ' + g.value + my_dynamic_variable) } with myfun: fn Everything I have tried turns up null for g once the myfun code is executed. I'm guessing that variable g must be bound within the scope of myObject, and that I cannot define it outside of the myObject scope, but I am not certain. Anyone know of a way to do this? Am I missing the mark here? Thanks!
tagged with: dynamic
has comment: http://stackoverflow.com/comment/39467164

http://stackoverflow.com/comment/39357580
score: 0
type: Comment
has text: @Dennis: faster? You must be kidding.
comment on: http://stackoverflow.com/a/25260022
type: AnswerComment

http://stackoverflow.com/comment/39410209
type: AnswerComment
comment on: http://stackoverflow.com/a/25288073
type: Comment
has text: `would be leaking memory, unless you provide a mechanism to destroy the cached`. Well even with `WeakMap` it still leaks for the same reason why jQuery can cause leaks. See this [demo](http://jsfiddle.net/dfsq/6v4379r9/1/).
score: 0

http://stackoverflow.com/a/25284240
score: 1
upvote count: 1
type: AcceptedAnswer
has body: An ng-hide expressions gets executed in every $digest loop. In the function in your ng-hide expression, you're pulling data from your database, which triggers a $digest. This causes the infinite $digest loop. If you decouple the hiding and the data fetching this should work as intended.
type: Answer
accepted answer of: http://stackoverflow.com/q/25283778
answers question: http://stackoverflow.com/q/25283778
downvote count: 0

http://stackoverflow.com/q/25342949
score: 1
type: Question
has title: How to disable overriding of cookies?
tagged with: asp.net-web-api
tagged with: javascript
has comment: http://stackoverflow.com/comment/39511780
has comment: http://stackoverflow.com/comment/39511691
upvote count: 1
has body: I am new to web development. I am using asp.net web API and angular i am using token authentication when a user logged in i set the token in a cookie and send it with every request till now every thing is working fine but if the user duplicates tab in the same browser and logged in with two different account the cookie is set to the last logged in account so the token for the two accounts became the same. how can i separate between them
answer count: 1
tagged with: asp.net
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25344554
downvote count: 0

http://stackoverflow.com/comment/39572195
has text: post the code along with our html @user3221714
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25374209

http://stackoverflow.com/comment/39405699
has text: Thanks. It seems to work. Can you recommend a good link/text/tutorial on regular expressions? I seem to have just jumped into it and it gets quite messy sometimes.
score: 0
comment on: http://stackoverflow.com/q/25286239
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39415484
has text: Thank you Ruben Serrate - this makes much more sense than creating unique classes. I will apply this to the rest of my code, also. You've been a great help.
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25291354

http://stackoverflow.com/a/25298843
has comment: http://stackoverflow.com/comment/129125876
downvote count: 1
has comment: http://stackoverflow.com/comment/135786273
has comment: http://stackoverflow.com/comment/81010585
has comment: http://stackoverflow.com/comment/129082276
upvote count: 7
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25298063
accepted answer of: http://stackoverflow.com/q/25298063
type: Answer
has body: According to Mozilla Developer Docs encodeURICompoent() uses UTF-8 to encode. When I run this on your string I get tester%C3%A6%C3%B8%C3%A5 as expected. When i run the following Java code: System.out.println(URLEncoder.encode("testeræøå", "UTF-8")); It also prints tester%C3%A6%C3%B8%C3%A5. I also ran your test and got: ------ START TESTING WITH USER ID = 'dummy' ---------------------- Test URLEncoder.encode(userId): dummy Test URLEncoder.encode(userId,"UTF-8"): dummy Test URLEncoder.encode(userId,"UTF-16"): dummy Test URLEncoder.encode(userId,"UTF-16LE"): dummy Test URLEncoder.encode(userId,"UTF-16BE"): dummy Test engine.eval("encodeURIComponent(\""+userId+"\")"): dummy Test encodeURIComponent(userId): dummy TEST new URI(userId).toASCIIString(): dummy ------ END TESTING WITH USER ID = 'dummy' ---------------------- ------ START TESTING WITH USER ID = 'testeræøå' ---------------------- Test URLEncoder.encode(userId): tester%C3%A6%C3%B8%C3%A5 Test URLEncoder.encode(userId,"UTF-8"): tester%C3%A6%C3%B8%C3%A5 Test URLEncoder.encode(userId,"UTF-16"): tester%FE%FF%00%E6%00%F8%00%E5 Test URLEncoder.encode(userId,"UTF-16LE"): tester%E6%00%F8%00%E5%00 Test URLEncoder.encode(userId,"UTF-16BE"): tester%00%E6%00%F8%00%E5 Test engine.eval("encodeURIComponent(\""+userId+"\")"): tester%C3%A6%C3%B8%C3%A5 Test encodeURIComponent(userId): tester%C3%A6%C3%B8%C3%A5 TEST new URI(userId).toASCIIString(): tester%C3%A6%C3%B8%C3%A5 ------ END TESTING WITH USER ID = 'testeræøå' ---------------------- ------ START TESTING WITH USER ID = 'tester%C3%A6%C3%B8%C3%A5' ---------------------- Test URLEncoder.encode(userId): tester%25C3%25A6%25C3%25B8%25C3%25A5 Test URLEncoder.encode(userId,"UTF-8"): tester%25C3%25A6%25C3%25B8%25C3%25A5 Test URLEncoder.encode(userId,"UTF-16"): tester%FE%FF%00%25C3%FE%FF%00%25A6%FE%FF%00%25C3%FE%FF%00%25B8%FE%FF%00%25C3%FE%FF%00%25A5 Test URLEncoder.encode(userId,"UTF-16LE"): tester%25%00C3%25%00A6%25%00C3%25%00B8%25%00C3%25%00A5 Test URLEncoder.encode(userId,"UTF-16BE…
has comment: http://stackoverflow.com/comment/135781173
has comment: http://stackoverflow.com/comment/39506019
score: 6
has comment: http://stackoverflow.com/comment/81013430

http://stackoverflow.com/q/25233259
has answer: http://stackoverflow.com/a/25238968
tagged with: ember.js
accepted answer: http://stackoverflow.com/a/25278213
tagged with: node.js
linked to: http://stackoverflow.com/q/14320925
upvote count: 1
tagged with: ruby-on-rails
downvote count: 1
type: AnsweredQuestion
has body: How do i make this work with ember-data? {"poll":{"id":1,"question":"lym features", "choices":[{"id":1,"text":"Improve AI", "PollId":1}, {"id":2,"text":"Multiplayer","PollId":1}, {"id":3,"text":"Modern Art","PollId":1}]}} That's my json response from the server. I need ember data RESTAdapter to parse it.
tagged with: ember-data
has title: Ember data RestAdapter embedded hasMany
has answer: http://stackoverflow.com/a/25278213
type: Question
answer count: 2
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/25238968
score: 0

http://stackoverflow.com/comment/42737583
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25327711
score: 0
has text: @Austin and the problem was?

http://stackoverflow.com/a/25290476
has body: If you already know the value to append when loading the page then you can add this when the document is ready : If you're using JQuery use this: $( 'class' ).attr( 'href', function(index, value) { return value + '?item=myValue'; }); Otherwise (plain Javascript): var link = document.getElementById("mylink"); link.setAttribute('href', 'http://www.johndoeslink.com'+'?item=myValue');
has comment: http://stackoverflow.com/comment/39413567
has comment: http://stackoverflow.com/comment/64925447
answers question: http://stackoverflow.com/q/25290299
score: 4
type: Answer
upvote count: 4
downvote count: 0

http://stackoverflow.com/comment/39440559
type: Comment
has text: you can build a house with a hammer, wood and some nails. this works too! but the op's question was: How to remove `element` and not how to remove `class`. what is if he changes the image name ? than he have to search his source for the image name and change it. in case that hes coding nice, logic and display source is separated. so this solution isn't very nice
comment on: http://stackoverflow.com/a/25303519
score: 0
type: AnswerComment

http://stackoverflow.com/q/25255484
has comment: http://stackoverflow.com/comment/39349614
tagged with: ajax
has comment: http://stackoverflow.com/comment/39349545
score: 0
has comment: http://stackoverflow.com/comment/39349734
has answer: http://stackoverflow.com/a/25255664
has comment: http://stackoverflow.com/comment/39349710
has comment: http://stackoverflow.com/comment/39349748
answer count: 1
has comment: http://stackoverflow.com/comment/39349765
has comment: http://stackoverflow.com/comment/39349786
favorite count: 0
has comment: http://stackoverflow.com/comment/39349686
has comment: http://stackoverflow.com/comment/39349721
has comment: http://stackoverflow.com/comment/39349866
has comment: http://stackoverflow.com/comment/39349783
has comment: http://stackoverflow.com/comment/39349623
has comment: http://stackoverflow.com/comment/39349777
accepted answer: http://stackoverflow.com/a/25255664
type: AnsweredQuestion
has body: Okay so I have a function "deactivate" which passes in 3 parameters to it. getRoleName() }}', '{{ $user->getFullName() }}', {{ $user->id }}); return false;" role="button" data-toggle="modal" class="btn btn-danger btn-small delete"> Deactivate User Here is my function: function deactivate(title, name, id) { $('#modal-user-role').html(title); $('#modal-user').html(name); $('#confirm').click(function() { $.ajax({ url: '/user/' + id + '/', type: 'PUT', success: function (data) { $('#alerts').html(' Successfully deactivated ' + title + ': ' + name + ' ' + $('#alerts').html()); $('#r' + id).hide(); }, error: function (jqXHR, textStatus, errorThrown) { $('#alerts').html(' A problem occured while deactivating ' + title + ': ' + name + ' ' + $('#alerts').html()); $('#r' + id).hide(); } }); }); } Here is my HTML that goes with the function: Deactivate User Are you sure you want to deactivate user : ? This action cannot be undone. Cancel Confirm Deactivation Does anyone know why my cancel button is not working? I believe it has something to do with the onclick I am using but not quite sure how to fix it. So, basically if I click the deactivate user button and than cancel and click another user and then cancel and then click another user and than confirm the deactivation it will delete each user from the DB. Which I do not want. I have the button type="button" which I thought would fix it. But it is not. Any ideas at all would be greatly appreciated.
has comment: http://stackoverflow.com/comment/39349745
has comment: http://stackoverflow.com/comment/39349590
has comment: http://stackoverflow.com/comment/39349739
upvote count: 1
has comment: http://stackoverflow.com/comment/39349813
downvote count: 1
has comment: http://stackoverflow.com/comment/39349663
type: Question
has comment: http://stackoverflow.com/comment/39349694
has comment: http://stackoverflow.com/comment/39349791
tagged with: javascript
has title: Code is getting executed even when hitting cancel button (ajax)
tagged with: jquery

http://stackoverflow.com/q/25307166
accepted answer: http://stackoverflow.com/a/25307268
favorite count: 0
has body: I'm using a 3rd party javascript library which requires a nested array to be passed to a function. I'm using this function several times, and so storing the array in a variable and passing it to the functions. However, part of the string of 1 element of the array needs to be the current id of the thing I'm passing; I've got something that works that looks a bit like: myArray = [["foo bar id","some data"],["foo2 bar2 id","some other data"]] func1(($m1 = myArray.slice(0), $.each($m1, function(i){ $m1[0] = myArray[i][0].replace("id","1"); }))) Is it really necessary to make a copy of the array; is there a way of doing it via the $(this) object, or would that not work because that's only in the scope of the .each loop, and doesn't get passed back to func1? Update The original answer below doesn't seem to work - the values of the array the 2nd time I reference it are the values given in the first instance: myArray = [["foo bar id","some data"],["foo2 bar2 id","some other data"]] func1( myArray = myArray.map(function(value) { value[0] = value[0].replace(/\bid\b/gi, '1'); console.log(value[0]); //returns "foo bar 1" as expected return value; }); ) func1( myArray = myArray.map(function(value) { value[0] = value[0].replace(/\bid\b/gi, '2'); console.log(value[0]); //This returns "foo bar 1", not "foo bar 2"! return value; }); ) Update (full proper code!) To put it all into context, the 3rd party library is jsmol, which allows molecular graphics to be displayed. jsmol includes some convenience functions for simple html elements, the one I'm using is Jmol.jmolMenu() - the nested array I've actually got is arr = [ ["select model=id; color blue", "colour this model blue"], ["select model=id; color green", "colour this model green"] ] and then I have n molecular models displayed in the same applet, which jsmol references as 1.1, 2.1, 3.1, ... etc I have n Jmol.jmolMenus (which just create html select lists); the 1st one to change the colour of 1.1, the second one to change the col…
type: Question
has title: Modifying an element of array $(this)
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/25307268
tagged with: javascript
linked to: http://stackoverflow.com/q/16472577
tagged with: jquery
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/a/25384550
has comment: http://stackoverflow.com/comment/39610252
accepted answer of: http://stackoverflow.com/q/25383340
answers question: http://stackoverflow.com/q/25383340
type: AcceptedAnswer
score: 0
type: Answer
has body: Replacing a browser engine from a webpage is a ridiculously dangerous thing even if it was possible. This would open up various security risks because it would allow the engine to be changed to a modified one that contains malicious code, for example, or outdated security technologies. It is recommended that you actually bother to code with standards rather than just for a specific browser to avoid compatibility issues or broken pages on other browsers. Providing all the vendor-specific prefixes as well as the standardized version in CSS instead of just one vendor-specific prefix in CSS will ensure greater compatibility across a wider range of web browser engines. For HTML, ensure that your code is validated properly and closes all tags. Doing this will help improve compatibility on other browsers, as every browser engine uses a slightly different way of interpreting the code.

http://stackoverflow.com/q/25282474
possible better answer: http://stackoverflow.com/a/25282568
has title: Cannot move "div" on handling "onclick" event
upvote count: 2
tagged with: css
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/25282524
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I would like to click on a div and that div would be moved and the div should follow my mouse. What I have: &lt;div onclick="myFunction()" id="move"&gt;&lt;/div&gt; &lt;script&gt; function myFunction(){ var div = document.getElementById('move'); document.addEventListener('mousemove', function (e){ div.style.left=e.pageX+"px"; div.style.top=e.pageY+"px"; });} &lt;/script&gt;
answer count: 2
has answer: http://stackoverflow.com/a/25282568
accepted answer: http://stackoverflow.com/a/25282524
tagged with: http://stackoverflow.com/tag/html
favorite count: 0

http://stackoverflow.com/a/25289347
has comment: http://stackoverflow.com/comment/39506407
score: 0
has comment: http://stackoverflow.com/comment/39419441
type: Answer
answers question: http://stackoverflow.com/q/25288808
has comment: http://stackoverflow.com/comment/39418657
has body: If you want to remove all filters from your isotope container you have to set the filter to '*' so instead of: filter: selector in your "ul.filteroption li.turnoff" click binding, you need to change that to: filter: '*' and this will basically tell isotope to remove any filters that it had and display all elements of your container.

http://stackoverflow.com/q/25348160
answer count: 1
has comment: http://stackoverflow.com/comment/39520008
tagged with: jquery
has answer: http://stackoverflow.com/a/25348206
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25348206
tagged with: css
has title: Colors shown differently in different browsers
type: AnsweredQuestion
has body: I have a input text box of #c7e296 color and when in focus then color changes to #668933 but when I test this in different browser they show some different colors on focus. Can someone explain why? Below is my code, .after input[type="text"]:focus { border: 2px solid #668933; } .before input[type="text"] { border: 2px solid #c7e296; color: #000000; font-size: 1em; }
type: Question
has comment: http://stackoverflow.com/comment/39520014
tagged with: javascript
score: 0

http://stackoverflow.com/a/25246955
has comment: http://stackoverflow.com/comment/39334388
answers question: http://stackoverflow.com/q/25246317
type: Answer
has body: Simplifying the directive results in what I think you're going for: app.directive('panel', function(){ return { restrict: 'E', template:'&lt;div&gt;&lt;h1&gt;{{panel.title}}&lt;/h1&gt;&lt;div ng-transclude&gt;&lt;/div&gt;&lt;/div&gt;', scope: {}, transclude: true, controller: 'PanelCtrl', link: function(scope, element, attrs, panelCtrl) { panelCtrl.setTitle(attrs.title); } } }) Here's a plunkr.
score: 0
has comment: http://stackoverflow.com/comment/39334101

http://stackoverflow.com/q/25273368
has comment: http://stackoverflow.com/comment/39382662
has comment: http://stackoverflow.com/comment/39385389
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39385935
type: Question
has answer: http://stackoverflow.com/a/25276115
has body: I'm trying to draw an arc element using numbers (or coordinates) coming from a 2D array. Imagine that the arc is like a clock that supposed to show up only in times of the day I declare. For example: imagine "1" turns the arc on, and "0" turns it off. So you get this array: 1 | 16:00 0 | 16:45 in these example i would like to see the arc "paints" the circle only for 45 minutes of the day. Can someone please show me any example of how to do that????
has title: How to draw an arc element using a 2D array in HTML5?
tagged with: canvas
tagged with: javascript
score: 0
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/119969

http://stackoverflow.com/comment/39545909
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25361989
type: Comment
has text: It is returning a value

http://stackoverflow.com/q/25276408
tagged with: javascript
linked to: http://stackoverflow.com/q/24977141
score: 0
tagged with: chaining
has comment: http://stackoverflow.com/comment/39438201
has comment: http://stackoverflow.com/comment/39421697
tagged with: parse-platform
tagged with: rest
tagged with: typeerror
has comment: http://stackoverflow.com/comment/39399377
has comment: http://stackoverflow.com/comment/39438623
type: UnansweredQuestion
answer count: 0
has title: Parse .then method and chaining | Syntax eludes me | TypeError error (ParseCDN)
has body: Previous post: Parse .then method and chaining | Syntax eludes me My original question was well answered by Nath. However I'm currently experiencing a TypeError which I am yet unable to resolve. TypeError message: TypeError: e is undefined ...arse.Object");return{__type:"Pointer",className:this.className,obj My current code (updated 2014-08-14 18:44): function harness(){ try{ console.log("harness function"); Parse.initialize("*key1*", "*key2*"); //Note: I do have the keys set properly var query = new Parse.Query("Users"); var userEmail = app.getValue("txtEmail"); console.log("userEmail: "+userEmail); //Note: Using Application Craft hence the use of 'app.getValue' and other custom JS functions query.equalTo("email", userEmail); console.log(query); query.find().then( function(results) { console.log("Within the Then!"); console.log(results); return query.find(); }, function(error){ console.log("Could be an error"+error); return; } ); console.log("END harness function"); } catch(err){ errorHandler("harness ERROR", err.message); console.log(err); } } Having read various forum posts I've investigated the stack trace and given the variable 'e' am fairly certain it's the ParseCDN I'm not calling correctly. I suspect my inexperience with returning promises is the source of the issue (tried to follow Nath's advice). The commented code block at the top was one of my variations of a promise to be returned; having read through the Parse API Docs it seemed that .then inherently returned a promise anyway so 'settled' on simply returning my results, and then the queryObject again (per their samples). The DOM upon error is interesting because it lists find(e) as a method, yet not then(). Not sure if I'm referring to an outdated js library perhaps (don't think so). If anyone can assist, or potentially expand upon Nath's work so far (copy below) I would greatly appreciate it. Many thanks -James Amended code snippet from Nath query.find().then(function(result){ doSomethingAsync(); //mu…
type: Question
has comment: http://stackoverflow.com/comment/39438248

http://stackoverflow.com/q/25299777
tagged with: javascript
has comment: http://stackoverflow.com/comment/39433905
has title: Triggering css animate class on scroll
has answer: http://stackoverflow.com/a/25302717
tagged with: animation
tagged with: css
linked to: http://stackoverflow.com/q/5672320
type: AnsweredQuestion
tagged with: scroll
has comment: http://stackoverflow.com/comment/39433201
type: Question
accepted answer: http://stackoverflow.com/a/25302717
has comment: http://stackoverflow.com/comment/39431817
has body: I am using the animate.css classes on my page. Currently I have all animations built on hover function. For example: #folder:hover .middle-button{ animation-name: slideRight; animation-duration: 1s; animation-timing-function: ease-in-out; visibility: visible !important; } I would like to activate these animation classes on scroll and my question is: What would be the easiest way to trigger this class using a Javascript function?
tagged with: class
score: 0
answer count: 1

http://stackoverflow.com/q/25324465
has body: This has been asked before, obviously, but I need some fresh information on the topic. I found a few articles and blog posts on the extension of DOM elements, and the most prominent arguments were browser incompatibilities. With IE11 doing surprisingly well.. is that even still an issue? Are there any other huge issues that prevent me from extending DOM elements directly, instead of through a wrapper? Edit: To clarify, I'm talking about adding methods to DOM elements via existing JavaScript prototypes (most likely Element).
answer count: 3
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39477966
has answer: http://stackoverflow.com/a/25324549
has answer: http://stackoverflow.com/a/25325036
has answer: http://stackoverflow.com/a/25324840
downvote count: 3
upvote count: 1
type: Question
has title: Is extending DOM elements via JavaScript still a bad idea?
has comment: http://stackoverflow.com/comment/39477108
score: -2
tagged with: javascript

http://stackoverflow.com/comment/39516888
has text: I was kind of hoping to have it in one route especially since I am using a few node modules to get the multiple sources but your saying that if I don't want to deal with a bunch of perfectly stringed together callbacks that I will have to build out separate routes for each JSON object that I am calling asynchronously? P.S Thank you for the ideas and quick responses, much appreciated!
comment on: http://stackoverflow.com/a/25344658
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40000786
score: 1
has text: @sorry, but i still don't understand why it can't just call `JSON.stringify` (without previously enforcing the data to be string by call `''+data`) on data you pass into `sockjs_instance.send`.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25606362

http://stackoverflow.com/a/25381683
has comment: http://stackoverflow.com/comment/39586081
downvote count: 0
has body: I have not had any issues with Traceur. You will not have access to the whole ES6 specification in Traceur (some features such as 'let' are missing) and some experimental features should be disabled for now. The usual considerations when switching languages apply. ES6 feels a little bit like CoffeeScript in the sense that the language is not backward compatible. You can't just take a piece of uncompiled ES6 and pass it to someone running ES5 because you'll be using arrow functions and other unsupported syntax. Traceur compiles to ES5, so IE8 is not supported.
accepted answer of: http://stackoverflow.com/q/25381394
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25381394
has comment: http://stackoverflow.com/comment/39586365
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/39305065
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25231375
has text: @DanielRoseman Thanks for the constructive advice, I have added the necessary (I believe), so I hope this is now presentable for some help...

http://stackoverflow.com/a/32971718
downvote count: 0
has body: With upcoming Angular2, the usage of polymer as webcomponents is going to be smoother and easier than with Angular1. Please refer to the References section of this answer. This contains how can a project take best out of Angular2 &amp; Polymer both at the same time.
score: 3
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/25383292

http://stackoverflow.com/q/25300853
type: Question
has comment: http://stackoverflow.com/comment/39433689
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39433465
tagged with: javascript
tagged with: express
has title: Cant redirect to jade page node js
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25301344
accepted answer: http://stackoverflow.com/a/25301344
has body: I just started working in node js for last few days. On an onclick ,I am calling this function which has an ajax call here. function goToUser(){ $.ajax({ url:"/users/UserPage", type:'get', async:false, success:function(data){ alert("working") } }) } In the users.js I have given like this var express = require('express'); var router = express.Router(); router.get('/UserPage',function(req,res){ res.render("/users/UserPage"); }) in the UserPage.jade file, it is like this h3#getHeader Helooooo But its not working is there any mistake in this? What I just want to redirect to another jade page, I used both render and redirect here.But both are not working. My Package .json dependencies "dependencies": { "express": "~4.2.0", "static-favicon": "~1.0.0", "morgan": "~1.0.0", "cookie-parser": "~1.0.1", "body-parser": "~1.0.0", "debug": "~0.7.4", "jade": "*", "mongodb": "*", "mongoskin": "*" } In app.js var app = express(); // view engine setup 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(function(req,res,next){ req.db = db; next(); }); This is the Part where i have given those details

http://stackoverflow.com/comment/67454129
score: 1
type: AnswerComment
has text: Sorry if this is a silly question, but where would you add that line?
comment on: http://stackoverflow.com/a/33196075
type: Comment

http://stackoverflow.com/q/25239478
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/csv
has comment: http://stackoverflow.com/comment/39319266
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25239710
downvote count: 2
has comment: http://stackoverflow.com/comment/39319239
upvote count: 1
type: Question
tagged with: javascript
score: -1
has body: Assuming that I have this kind of CSV file which looks like: age 1 gender 2 location 3 address 4 How do I retrieve all the strings from the first column? Thanks.
accepted answer: http://stackoverflow.com/a/25239710
has comment: http://stackoverflow.com/comment/39319385
has title: How to read the first column of csv file?

http://stackoverflow.com/comment/39573928
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25373648
has text: [Using Kadira](https://kadira.io/)

http://stackoverflow.com/q/25383357
tagged with: javascript
score: 4
upvote count: 4
answer count: 1
downvote count: 0
has body: I've an eventlistener registred on a section HTML tag which embedded various dropdowns: function dropdownChange(e) { window.console.log("The event is detected"); if (e.target.tagName === "SELECT") window.console.log("The event's target is a dropdown"); // Some jobs else window.console.log("The event's target is NOT a dropdown"); // Some jobs } document.getElementById("filterSection").addEventListener("change", dropdownChange); It works fine. That I want to do is to trigger once a change event when my page is loaded. As far as I understand the Mozilla documentation I should perform when my DOM is ready the following action: document.getElementById("periode").dispatchEvent(new Event("change")); But the event is not trigger (I get no trace into my console). I thought that the event propagation would make the job... If I execute: document.getElementById("filterSection").dispatchEvent(new Event("change")); The event is well triggered but the target is not the good one. What am I doing wrong? Dropdowns' HTML code: Période 2014 Août 2014 Juillet 2014 Juin 2014 Mai 2014 Avril 2014 Mars 2014 Février 2014 Janvier 2013 Décembre 2013 Novembre 2013 Octobre 2013 Septembre 2013 Août 2013 Juillet 2013 Juin My main browser target is Firefox.17
favorite count: 0
has title: How to trigger a change event with a custom HTMLElement as the target?
has comment: http://stackoverflow.com/comment/39585716
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25383578

http://stackoverflow.com/comment/39420389
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25293865
has text: If you look at the code you will see that I increase the date by 1 day.
type: AnswerComment

http://stackoverflow.com/comment/39331087
type: AnswerComment
type: Comment
has text: thank you very much that worked very well is it wrong to use ajax in a html form like i have or it better to have it in a different page
comment on: http://stackoverflow.com/a/25245867
score: 0

http://stackoverflow.com/comment/39376127
score: 0
has text: I did Like this But Still Itz not working,i am acalling aDates.changeDateFormat(date)...@ rupalli
comment on: http://stackoverflow.com/a/25261936
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/39777825
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25387644
has text: Can you check in the emulator the method from the question I provided? And also, are you using PhoneGap 3.5?
score: 0

http://stackoverflow.com/a/25274116
has comment: http://stackoverflow.com/comment/39384893
type: Answer
answers question: http://stackoverflow.com/q/25273519
accepted answer of: http://stackoverflow.com/q/25273519
score: 1
has comment: http://stackoverflow.com/comment/39395092
has comment: http://stackoverflow.com/comment/39399679
has body: New Edit from OP's comments : The only way I can see to resolve this is using javascript, I made a uggly and probably overkilling snippet which does the work : It creates a clone of the node, set it as inline with white-space: nowrap and then add each word one at a time, compare the clone width with parent's width. If it's larger, then it assigns display: table-caption to the orginal div, else it adds the next word. CSS div { display: inline-block; background-color:pink; margin-bottom:5px; } .caption { display : table-caption; } .cloned { visibility : hidden; white-space : nowrap; } Javascript var clone, el,w; (cloneIt)(); function cloneIt(){ el = document.getElementById('3'); clone = el.cloneNode(true); clone.className = "cloned"; el.parentNode.appendChild(clone); w = clone.innerHTML.split(' '); wrapIt(); } window.onresize = wrapIt; function wrapIt(){ clone.innerHTML = w[0]; //minimum content is first word for(i=1; i&lt;w.length; i++){ clone.innerHTML += w[i]+' ';//add next word if(i==w.length-1 &amp;&amp; clone.offsetWidth &lt;= el.parentNode.offsetWidth){ //we're at the end and it's still smaller than parent width? el.style.width = clone.offsetWidth+ 1 + 'px'; return; } if(clone.offsetWidth &lt;= el.parentNode.offsetWidth){ //add a new word continue; } //Gone too far? remove last word clone.innerHTML = clone.innerHTML.replace(w[i], ''); el.style.width = clone.offsetWidth+ 1 + 'px'; return; } } Here is Fiddle
upvote count: 2
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/39388144

http://stackoverflow.com/q/25241932
answer count: 3
upvote count: 3
accepted answer: http://stackoverflow.com/a/25242139
tagged with: safari
type: AnsweredQuestion
score: 3
has title: Detect if the user is navigating through the safari mobile browser on iphone
has answer: http://stackoverflow.com/a/69116279
type: Question
possible better answer: http://stackoverflow.com/a/39209257
tagged with: iphone
has body: I am trying to detect if the user is navigating my website from safari browser on the iphone using jquery / javascript. I am able to detect the IOS Environment using the user agent string /iphone/i.test(navigator.userAgent.toLowerCase()) But this detects the Apple Webkit Environment i.e. it is same for all the browsers on the device. Can anyone suggest any different approach.
has answer: http://stackoverflow.com/a/39209257
downvote count: 0
tagged with: ios
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25242139

http://stackoverflow.com/q/25273764
has comment: http://stackoverflow.com/comment/39383162
possible better answer: http://stackoverflow.com/a/25274077
has answer: http://stackoverflow.com/a/25274077
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39383209
score: 1
has comment: http://stackoverflow.com/comment/39383121
upvote count: 1
has comment: http://stackoverflow.com/comment/39383486
type: Question
has comment: http://stackoverflow.com/comment/39383514
has answer: http://stackoverflow.com/a/25273853
has title: Check if an element and its children have been loaded
tagged with: javascript
has body: I know the .load() function in jQuery, and how to use the callback function with that... but is there a way to check if an element has been loaded using an if statement? My reasoning... I want to set an interval and check if an element and all it's children have been fully loaded. var load-interval = setInterval(function(){ if($('#content').hasBeenLoaded){ //do stuff } }, 1000);
has comment: http://stackoverflow.com/comment/39383646
has comment: http://stackoverflow.com/comment/39383803
has comment: http://stackoverflow.com/comment/39383367
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39383420
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25273853
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25278875
answers question: http://stackoverflow.com/q/25277919
type: AcceptedAnswer
type: Answer
has body: I think your code should look something like this: // backup original rotation var startRotation = new THREE.Euler().copy( camera.rotation ); // final rotation (with lookAt) camera.lookAt( object.position ); var endRotation = new THREE.Euler().copy( camera.rotation ); // revert to original rotation camera.rotation.copy( startRotation ); // Tween new TWEEN.Tween( camera ).to( { rotation: endRotation }, 600 ).start();
score: 14
downvote count: 0
has comment: http://stackoverflow.com/comment/74185117
upvote count: 14
accepted answer of: http://stackoverflow.com/q/25277919
has comment: http://stackoverflow.com/comment/39398512

http://stackoverflow.com/comment/39469347
has text: The second pattern does allow this as well. The private variables would even be accessible to the static `Stuff.create` method!
type: AnswerComment
score: 1
comment on: http://stackoverflow.com/a/25320316
type: Comment

http://stackoverflow.com/q/25354123
has answer: http://stackoverflow.com/a/25354390
has comment: http://stackoverflow.com/comment/39530855
type: UnansweredQuestion
tagged with: php
linked to: http://stackoverflow.com/q/6862735
has comment: http://stackoverflow.com/comment/39531938
has title: Reloading a page include every 30 seconds or when user submits form
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25355738
tagged with: javascript
has body: I have a PHP page with a lot of includes which make up various parts of the page for a video website. I have a comments section which submits information into a database (Which works fine). But I need to make it so when this is done only the included page/div refreshes. This is the PHP: <input type="hidden" value="<?=$rSong->id?>" class="song-id"> <?php $showComments?> Here is my attempt at doing it with Javascript: This should reload just the comments section but instead, everything from this point onwards goes blank. How it looks now when I press submit: When I reload that page manually: I don't want the whole page to refresh because it contains a video. How can I make just that Refresh after submit is pressed OR every 30 seconds? UPDATE: I have tried using JQuery to execute this. I'm getting an error: Fatal error: Call to a member function query() on a non-object in /home/content/58/12052758/html/template/sections/header.php on line 42 For those interested. Here is the whole page: http://pastebin.com/c0kQ3tGp
tagged with: jquery
has comment: http://stackoverflow.com/comment/39531006
has comment: http://stackoverflow.com/comment/39530980
score: 0

http://stackoverflow.com/a/25334492
answers question: http://stackoverflow.com/q/25334282
score: 0
has comment: http://stackoverflow.com/comment/39496711
has comment: http://stackoverflow.com/comment/39496619
type: Answer
has body: Here you have a tutorial to do this, and works like a charm, you only need to adapt it to Foundation tutorial In your particular case, since you want to have teh icons always visible, just open components.css and replace .gn-menu-wrapper { position: fixed; top: 60px; bottom: 0px; left: 0px; overflow: hidden; width: 60px; border-top: 1px solid #C6D0DA; background: none repeat scroll 0% 0% #FFF; transform: translateX(-60px); transition: transform 0.3s ease 0s, width 0.3s ease 0s; } with .gn-menu-wrapper { position: fixed; top: 60px; bottom: 0px; left: 60px; overflow: hidden; width: 60px; border-top: 1px solid #C6D0DA; background: none repeat scroll 0% 0% #FFF; transform: translateX(-60px); transition: transform 0.3s ease 0s, width 0.3s ease 0s; }
has comment: http://stackoverflow.com/comment/39496606

http://stackoverflow.com/q/25248868
tagged with: function
downvote count: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39337383
favorite count: 0
has answer: http://stackoverflow.com/a/25250011
tagged with: checkbox
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39337020
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25250011
tagged with: arrays
tagged with: javascript
has body: I have a form with checkboxes. The javascript function allPosPlayersCheckboxes utilizes a "Check All" Checkbox that controls the others. The other functions (getPosAllFilterOptions & getPosPlayersFilterOptions) push the "name" properties into an array. This all is triggered when anything is changed on the form. Suppose that all checkboxes are unchecked. If the user checks the "nonP_all" checkbox, it will automatically check the other checkboxes with class="nonP". Unfortunately, when the "name" properties are pushed into the array, it will not include any with class="nonP". I"m unsure why they are not included in the array. Are the functions (getPosAllFilterOptions & getPosPlayersFilterOptions) not waiting for allPosPlayersCheckboxes to complete? Is there a way to have the secondary checkboxes included in the arrays? Thanks for any help! Filter options Position Players C 1B 2B 3B SS LF CF RF DH function allPosPlayersCheckboxes(){ $("#nonP_all").click(function(){ // When it is clicked.... $('.nonP').prop('checked', this.checked); // Sets all to reflect "All" }); $(".nonP").click(function(){ // When any are clicked.... if($(".nonP").length == $(".nonP:checked").length){ // If all are checked... $("#nonP_all").prop("checked", true); // Sets "All" to "checked" }else{ $("#nonP_all").prop("checked", false); // Sets "All" to "unchecked" } }); }; function getPosAllFilterOptions(){ var pos_all_opts = new Array(); $(".Pos_all:checked").each(function(){ pos_all_opts.push($(this).attr('name')); // places names into array }); return pos_all_opts; } function getPosPlayersFilterOptions(){ var nonP_opts = new Array(); $(".nonP:checked").each(function(){ nonP_opts.push($(this).attr('name')); // places names into array }); return nonP_opts; } var $formFilter = $("#formFilter"); $formFilter.change(function(){ allPosPlayersCheckboxes(); var pos_all_opts = getPosAllFilterOptions(); var nonP_opts = getPosPlayersFilterOptions(); console.log("pos_all_opts = " + pos_all_opts); console.log("n…
has comment: http://stackoverflow.com/comment/39337133
has title: Check All checkboxes not pushing names into array

http://stackoverflow.com/comment/39457640
has text: Do you have a JSFiddle so to show your entire code? The data is in the wrong format, but it doesn't match with how I'd expect your graph to look (I'd expect it to zig-zag, but yours is a linear increase).
comment on: http://stackoverflow.com/q/25313735
type: QuestionComment
score: 0
type: Comment

video
tags question: http://stackoverflow.com/q/25325724
type: Tag
tags question: http://stackoverflow.com/q/25238088
tags question: http://stackoverflow.com/q/25386203
tags question: http://stackoverflow.com/q/25274410
tags question: http://stackoverflow.com/q/25346009
tags question: http://stackoverflow.com/q/25365479
tags question: http://stackoverflow.com/q/25241836
tags question: http://stackoverflow.com/q/25382025
tags question: http://stackoverflow.com/q/25285167
tag name: video

http://stackoverflow.com/comment/39588292
score: 0
type: Comment
type: QuestionComment
has text: As an extreme hack (just for testing!) does `* { border: none !important; outline: none !important; }` have any affect?
comment on: http://stackoverflow.com/q/25380553

http://stackoverflow.com/q/25283145
has body: I have a list with jQuery sortable on asp.net. I want to get the id of the target list. When I drag and drop an item to the target UL it is giving me an id which I get it from. JavaScript code &lt;script type="text/javascript"&gt; function textUl() { $('ul').bind('mouseup',function() { $('#REL_UL').val($(this).attr('id')); } } &lt;/script&gt; How to obtain target UL's id.
tagged with: asp.net
type: UnansweredQuestion
has title: JQuery/Sortable - Drag and Drop Target List's Id
tagged with: jquery-ui-sortable
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25301836
tagged with: droppable
score: 0
tagged with: drag-and-drop

http://stackoverflow.com/comment/39343925
type: Comment
has text: I should have read question better, I took your question title at its word. Since those variable declarations are *inside* a function, then they are not -- by their very definition -- global. You're better off doing what I said in the "cleaner" way and replace the 'var one;' and 'var two;' with the 'counts' object.
comment on: http://stackoverflow.com/a/25252403
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39324400
type: QuestionComment
type: Comment
has text: [NewFiddle](http://jsfiddle.net/89ks6mjm/4/). In edit(4) u can read about fail i found. Now I'm working on the solution that let me prevent losing focus from input element when list is clicked(but it cant be prevented). Then I bind events to delegate to set order of triggering events(but it also dont give me results). U can read about my new problem here : [Link](http://stackoverflow.com/questions/25240101/real-preventing-an-element-from-losing-focus/25240252?noredirect=1#comment39324140_25240252)
score: 0
comment on: http://stackoverflow.com/q/25237929

http://stackoverflow.com/a/25346365
has comment: http://stackoverflow.com/comment/39517136
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39520530
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25346339
has body: next() is trying to find the sibling of your div, not the first child (button) you are expecting. You can instead use this.el as context, and select within it: $(this.el).children(":first") should give you the button
score: 2
answers question: http://stackoverflow.com/q/25346339
upvote count: 2
has comment: http://stackoverflow.com/comment/39517142
has comment: http://stackoverflow.com/comment/39517125

http://stackoverflow.com/q/25302000
has answer: http://stackoverflow.com/a/78931030
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/78931030
has title: Is there a need to use hasOwnProperty with Object.keys?
upvote count: 2
has body: if I iterate over an object, I need to check whether it is not a prototype object I loop over. (with hasOwnProperty) If I collect the keys with Object.keys, I always just get the "real keys" back. Is this correct?
tagged with: hasownproperty
tagged with: properties
accepted answer: http://stackoverflow.com/a/25302020
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25302020
type: Question

http://stackoverflow.com/comment/39467574
type: QuestionComment
comment on: http://stackoverflow.com/q/25319196
score: 0
has text: @PadraicCunningham you mean in the group of files I am working with? .py, .js, and .html
type: Comment

http://stackoverflow.com/q/25304120
favorite count: 0
tagged with: css
has comment: http://stackoverflow.com/comment/39439995
score: 2
upvote count: 2
accepted answer: http://stackoverflow.com/a/25304410
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39439404
has title: efficient way to look for all css uses of a color
has body: What is the most efficient way to look for all uses of a css color in the "current page" ? For me a use of a color appear as color-background, font color, border color. In table TDs, Divs, Span, paragraph (P), etc.... I think to do a similar "loop" to this one is overkill for a full page, and this one is just searching a specific HTML tag (DIV) and verifying only the "color", not the other properties.... $("div").each(function () { var color = $(this).css("color"); if (color == "#F1F2F3") { console.log('found it!'); } }); Isn't there a easiest way to simple say: "replace all HEX color #XXXXXX value for #YYYYYY ????? In css I might even represent the color in different ways (at least 5 ways): background-color: #000000; color: #000; border: 1px solid rgb(0,0,0); border-bottom-color: rgb(0%,0%,0%); outline-color: black; Update 1 I took Garath sugestion and I worked a little on it (all selector with exclusion, etc), but I am still not so happy about it..... I am still trying to identify all different properties where the color might exist, and I am not even paying attention to the way the browser will return me the color..... $('*:not(head, script,link, meta, title)').filter(function() { var replace = 'rgb(0, 0, 0)'; var replaceFor = '#FF0000'; if( $(this).css('color') == replace) $(this).css('color', replaceFor); if( $(this).css('background-color') == replace) $(this).css('background-color', replaceFor); if( $(this).css('border-color') == replace) $(this).css('border-color', replaceFor); }); It would be so great to have a similar way to this one Attribute Equals Selector [name="value"], but where I would not need to specify the attribute type...
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39440269
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39439629
has answer: http://stackoverflow.com/a/25304410

http://stackoverflow.com/comment/39342763
type: AnswerComment
has text: still not working. i guess it's a config error. none of my actions are working on my local machine, on the servers are all good.
comment on: http://stackoverflow.com/a/25251807
score: 0
type: Comment

http://stackoverflow.com/a/25375371
type: AcceptedAnswer
upvote count: 5
type: Answer
answers question: http://stackoverflow.com/q/25375350
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25375350
has body: Since a is a function, you have to call it: a().done(function(data) { console.log(data); });
score: 5

http://stackoverflow.com/q/25309242
has comment: http://stackoverflow.com/comment/39448833
has comment: http://stackoverflow.com/comment/39448993
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39482488
answer count: 0
has comment: http://stackoverflow.com/comment/39449306
type: Question
has body: I'm making a parallax website and I have a menu on the top. The thing is, on touch screen devices when I click on a menu item it scroll to the page but when I scroll with my finger to another page the clicked button stay active!! function redrawDotNav(){ var section1Top = 0; // The top of each section is offset by half the distance to the previous section. var section2Top = $('#Slide2').offset().top - (($('#Slide3').offset().top - $('#Slide2').offset().top) / 4); var section3Top = $('#Slide3').offset().top - (($('#Slide4').offset().top - $('#Slide3').offset().top) / 2); var section4Top = $('#Slide4').offset().top - (($('#Slide5').offset().top - $('#Slide4').offset().top) / 2); var section5Top = $('#Slide5').offset().top - (($(document).height() - $('#Slide5').offset().top) / 2);; $('.link1').removeClass('active'); $('.link2').removeClass('active'); $('.link3').removeClass('active'); $('.link4').removeClass('active'); $('.link5').removeClass('active'); $('.link1').removeClass('hover'); $('.link2').removeClass('hover'); $('.link3').removeClass('hover'); $('.link4').removeClass('hover'); $('.link5').removeClass('hover'); if($('html').hasClass('no-touch')){ if($(document).scrollTop() &gt;= section1Top &amp;&amp; $(document).scrollTop() &lt; section2Top){ $('.link1').addClass('active'); } else if ($(document).scrollTop() &gt;= section2Top &amp;&amp; $(document).scrollTop() &lt; section3Top){ $('.link2').addClass('active'); } else if ($(document).scrollTop() &gt;= section3Top &amp;&amp; $(document).scrollTop() &lt; section4Top){ $('.link3').addClass('active'); } else if ($(document).scrollTop() &gt;= section4Top &amp;&amp; $(document).scrollTop() &lt; section5Top){ $('.link4').addClass('active'); } else if ($(document).scrollTop() &gt;= section5Top){ $('.link5').addClass('active'); } } }
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39471543
has title: jquery touch screen menu
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25329550
has title: I can't get hover or mouseenter to unbind and rebind again
has body: I have tried sooooo many different methods of this that others have suggested, but I don't understand what i'm doing wrong and really need some help. I have tried using various combinations of hover, mouseenter/mouseleave, on/off, bind/unbind. Basically, I can get things to unbind, but I can't get them to bind again afterwards. I put together a jsfiddle with a basic example. If you click the "Hover Off" button, mouseenter is disabled like intended. But then if you click the "Hover On" button after, mouseenter does not enable again. http://jsfiddle.net/770b5p8q/3/ Here is "hover" functionality: $('.square').each(function(){ $(this).bind("mouseenter", function(){ $(this).addClass('active'); }); $(this).bind("mouseleave", function(){ $(this).removeClass('active'); }); }); Here is what should enable/disable it: $('.hover_enabled').click(function(){ $('.square').each(function(){ $(this).bind("mouseenter"); $(this).bind("mouseleave"); }); }); $('.hover_disabled').click(function(){ $('.square').each(function(){ $(this).unbind("mouseenter"); $(this).unbind("mouseleave"); }); });
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25329669
possible better answer: http://stackoverflow.com/a/25329669
type: Question
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/25329619
accepted answer: http://stackoverflow.com/a/25329619

http://stackoverflow.com/comment/39355915
has text: Hello Prateik! I have edited my question so if you can take a look at it! Thx!
comment on: http://stackoverflow.com/a/25239990
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25366390
has answer: http://stackoverflow.com/a/25383237
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39554669
answer count: 1
has comment: http://stackoverflow.com/comment/39555532
tagged with: jquery
tagged with: drag-and-drop
type: UnansweredQuestion
has title: Drop Files Into Dynamically Generated Content
has body: I'm trying to change the src of a dynamically generated placeholder image by dropping another image on it, but I can't get data from the dropped image. I've tried a couple ways and neither works. Method 1: console.log(e.dataTransfer); Returns undefined Method 2: console.log(e.originalEvent.dataTransfer.files.length); Returns no files. Here's a working sample of my probem: JSFiddle. What am I missing? Update: As @Marcel points out, the drop event receives data when users drag it from their computer, but doesn't get any data from images loaded in the browser. My end goal is to have users drag images from another browser tab or window and update the placeholder URL with the dropped image's URL.

http://stackoverflow.com/a/25298514
upvote count: 1
has comment: http://stackoverflow.com/comment/39430063
has comment: http://stackoverflow.com/comment/39464481
type: Answer
has comment: http://stackoverflow.com/comment/39448236
has comment: http://stackoverflow.com/comment/39429217
answers question: http://stackoverflow.com/q/25298314
has body: Fix with jQuery: Rather than the more traditional serialize on an entire form. According to jQuery you can serialize individual form elements to. So with that, I found the input selector. From there, all I had to do then was use the form id as part of the selector and everything works great. $(':input[form="foo"]').serialize(); // returns cat=cat Tested: ie8-11
downvote count: 0
score: 1

http://stackoverflow.com/a/25277652
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25269507
type: Answer
accepted answer of: http://stackoverflow.com/q/25269507
has body: Refer to this fiddle: http://jsfiddle.net/jjbdrzp5/4/ The main reason your code isn't working is sytax errors. Here it is cleaned up: $(document).ready(function() { var setActive = document.getElementById('setActive'), anchor = setActive.getElementsByTagName('a'); for (i = 0; i &lt; anchor.length; i++) { anchor[i].className = "list-item"; } }); However you can do this all with jQuery: $(document).ready(function() { $('#setActive a').addClass('list-item'); }); Also make sure you're correctly mapping the $ sign to jQuery in your JS file: (function($) { // docready etc etc here }(jQuery)); Hope that helps.
has comment: http://stackoverflow.com/comment/39549809
score: 0

http://stackoverflow.com/q/25367183
tagged with: http://stackoverflow.com/tag/html
has title: Feeding a PHP array into a Javascript Array/Drop Down
score: -1
type: UnansweredQuestion
tagged with: php
downvote count: 1
has body: I'm trying to create a webpage that has drop downs populated by values supplied by an Oracle database query. The code I'm using is what has worked for me before when querying Sql Server, but modified for Oracle. This is really outside of my skillset - I'm more of a Sys Admin than developer: but it's just one of those cases where there is no one else to do it. This is the PHP code that queries Oracle (the var_dump was to erify that the array is populated with values form Oracle): **<?php // Create connection to Oracle $conn = oci_pconnect("user", "password", "//oracleserver/prod"); $query = 'SELECT DISTINCT terms_cd from terms ORDER BY terms_cd'; $stid = oci_parse($conn, $query); $r = oci_execute($stid); $j = 0; while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS+OCI_ASSOC)) { foreach ($row as $item) { $termscode[] = array("id" => $j, "val" => $item); $j++; } } //Verify Array //var_dump($termscode); $jsonTermsCode = json_encode($termscode); ?>** This is the JavaScript: And this is the HTML: Terms Code: The drop down does not populate - I've been beating my head on this and just can't figure out why. Any insight?
has answer: http://stackoverflow.com/a/25367453
type: Question
has comment: http://stackoverflow.com/comment/39555059
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39555132
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39555104
has comment: http://stackoverflow.com/comment/39555172

http://stackoverflow.com/comment/39497869
type: QuestionComment
comment on: http://stackoverflow.com/q/25335099
score: 0
has text: Do you update an existing collapsible?
type: Comment

http://stackoverflow.com/comment/39505145
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25339044
type: Comment
has text: Wouldn't `ng-if` or `ng-show` work for that?

http://stackoverflow.com/comment/39483051
has text: Yeah, I'll break the drag functionality out into a separate little module so I can post it on fiddle and then I'll update the question with a link.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25320119
score: 0

http://stackoverflow.com/a/25325300
answers question: http://stackoverflow.com/q/25325267
has body: It is mostly that because of you forgot to include the poshytip JS file: &lt;script type="text/javascript" src="src/jquery.poshytip.js"&gt;&lt;/script&gt; Check if you have added that! If you are getting this issue only in IE, then you have to check your conditional comments: &lt;!--[IF IE]&gt; Only IE can parse this. Make sure you include the script here! &lt;![ENDIF]--&gt; My best guess is that you are including the script inside a Non-IE conditional comment like this: &lt;!--[if !IE]&gt; --&gt; &lt;script type="text/javascript" src="src/jquery.poshytip.js"&gt;&lt;/script&gt; &lt;!-- &lt;![endif]--&gt; The above code will be readable by all the browsers, except IE! And since that IE couldn't load the JS, it would throw the error which you got!
type: Answer
score: 0

http://stackoverflow.com/comment/39511699
has text: What do you mean by "*replaces any existing variables*"? It's just the standard coffeescript scoping rules. [Your posted example](http://coffeescript.org/#try:getSumAndDiff%20%3D%20(firstNumber%2C%20secondNumber)%20-%3E%0A%20%20sum%20%3D%20firstNumber%20%2B%20secondNumber%0A%20%20difference%20%3D%20firstNumber%20-%20secondNumber%0A%0A%20%20%7Bsum%2C%20difference%7D%0A%0A%7Bsum%2C%20difference%7D%20%3D%20getSumAndDiff(10%2C%205)) works well.
score: 1
comment on: http://stackoverflow.com/q/25342760
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39419737
type: QuestionComment
score: 0
has text: Please provide a couple code examples of what you want to do.
comment on: http://stackoverflow.com/q/25293176
type: Comment

http://stackoverflow.com/comment/39485309
has text: Updated so the image is visible at the start
type: AnswerComment
comment on: http://stackoverflow.com/a/25328269
score: 0
type: Comment

http://stackoverflow.com/q/25290017
tagged with: appendchild
has answer: http://stackoverflow.com/a/25290208
answer count: 2
tagged with: for-loop
upvote count: 0
tagged with: javascript
has body: My code was working fine moments ago (counting how many times it found your word inside a text box), and now it's not anymore. I might have removed or added something by accident. Looked thoroughly and couldn't spot why it's not working: Edit: Added CSS and here's the demo. HTML: Find JavaScript: function count() { //I define both word and text here based on the input boxes. var word = document.getElementById("box_top").value; var text = document.getElementById("textBox").value; var hits = []; //Then I push the word to an array everytime I find it: for (var x = 0; x < text.length; x++) { if (text.substr(x, word.length) === word) { hits.push(word); } } //Here I define what the paragraphs will look like so later I can append them on conditions var p0 = document.createElement("p"); var n0 = document.createTextNode("You didn't type a word!"); p0.appendChild(n0); var pt = document.createElement("p"); var nt = document.createTextNode("You didn't insert a text!"); pt.appendChild(nt); var p1 = document.createElement("p"); var n1 = document.createTextNode(word + " wasn't found!"); p1.appendChild(n1); var p2 = document.createElement("p"); var n2 = document.createTextNode(word + " was found once."); p2.appendChild(n2); var p3 = document.createElement("p"); var n3 = document.createTextNode(word + " was found " + hits.length + " times!"); p3.appendChild(n3); var rightDiv = document.getElementById("right"); //Below, before I appending something, I remove anything that is in it. rightDiv.removeChild(rightDiv.firstChild); //My condition: depending on the array length, I'll append a different paragraph to my div. if (!word) { rightDiv.appendChild(p0); } else if (!text) { rightDiv.appendChild(pt); } else { if (hits.length === 0) { rightDiv.appendChild(p1); } else if (hits.length === 1) { rightDiv.appendChild(p2); } else { rightDiv.appendChild(p3); } } } CSS #outer{ display: table; position: absolute; height: 100%; width: 100%; } #table{ display: table-cell; vertical-align: middle } #…
has comment: http://stackoverflow.com/comment/39413107
has comment: http://stackoverflow.com/comment/39412919
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25290208
has answer: http://stackoverflow.com/a/25290266
favorite count: 0
score: -1
has comment: http://stackoverflow.com/comment/39413259
has comment: http://stackoverflow.com/comment/39413071
possible better answer: http://stackoverflow.com/a/25290266
has title: Why isn't my function working?
downvote count: 1
type: Question
tagged with: debugging
type: AnsweredQuestion

http://stackoverflow.com/comment/39502162
has text: the sform is created dynamically so field names are not static. i need the entire array to printed in servlet.
type: AnswerComment
comment on: http://stackoverflow.com/a/25306506
score: 0
type: Comment

http://stackoverflow.com/q/25280168
type: Question
has comment: http://stackoverflow.com/comment/39395048
tagged with: javascript
tagged with: forms
tagged with: post
score: 0
has comment: http://stackoverflow.com/comment/39406120
has title: angular ajax post form without binding
has body: I have form with directive for createing google catptcha (ReCaptcha). I want to post this form via ajax to a web api hosted to another server. There are two thing which i tried with no success. The first one have the following code: &lt;form class="form-horizontal" ng-submit="sendMail()"&gt;...&lt;/form&gt; js: ngApp.controller('ContactsController', function ContactsController($scope) { $scope.recaptchamodel = ""; $scope.sendMail = function () { var x = $scope.recaptchamodel; } }); directive: ngApp.directive('recaptcha', function () { return { restrict: 'A', transclude: true, compile: function (element, attributes) { return { pre: function (scope, element, attributes, controller, transcludeFn) { Recaptcha.create("_Private_Key_", attributes.id, { theme: "clean", callback: function () { $("#recaptcha_response_field").attr("ng-model", "recaptchamodel"); Recaptcha.focus_response_field; } }); }, post: function (scope, element, attributes, controller, transcludeFn) { } } } } }) So the thing i am trying to accomplish is to put data-ng-model attr to the recapthca html which is dynamically created. When I inspect the element after rendering the page, the attribute is on it's place. But when i submit the form "var x" is empty. It looks like the binding is not working... Any help would be appreciated!
tagged with: ajax
has comment: http://stackoverflow.com/comment/39394317
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39394839
answer count: 0

http://stackoverflow.com/a/25394261
accepted answer of: http://stackoverflow.com/q/25378594
type: AcceptedAnswer
has body: When you are running the setState call you are overriding your newState object with the newItems array newState = newItems; and thus you are passing the function an array instead of an object. If you use something like this.setState({ data: newState });, the setState call should work correctly. This should solve the second problem as well.
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25378594
upvote count: 2

http://stackoverflow.com/q/25366038
downvote count: 0
has answer: http://stackoverflow.com/a/37255082
tagged with: javascript
has comment: http://stackoverflow.com/comment/39569563
answer count: 3
accepted answer: http://stackoverflow.com/a/25374643
tagged with: http://stackoverflow.com/tag/html
has title: how to keep web page displayed during JavaScript alert in Chrome & FireFox for a VB ASP.NET web app
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/39552967
linked to: http://stackoverflow.com/q/1926449
has body: Is there a way to keep page displayed in background while alert popup is displayed? (IE keeps it displayed) In my VB ASP.NET web app, I popup an alert by using JavaScript alert(). (see code below) But when alert pops up, Chrome and FF web page goes blank until user hits OK, then it is re-displayed. (IE doesn't have problem) ' Shows javascript alert_message at browser, because MsgBox doesn't work there. Private Sub alert(ByVal alert_message As String) Dim msg As String msg = "&lt;script language='javascript'&gt;" msg += "alert('" &amp; POPUP_ALERT_TITLE &amp; "\n\n" &amp; alert_message &amp; "');" msg += "&lt;" &amp; "/script&gt;" Response.Write(msg) End Sub SAMPLE USAGE WITHIN MY VISUAL BASIC 2013 ASP.NET WEB APP.......... Function sample_usage() alert("INTERNAL ERROR 111.") End Function
tagged with: vb.net
has comment: http://stackoverflow.com/comment/39569721
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25366246
score: 1
has answer: http://stackoverflow.com/a/25374643
upvote count: 1
possible better answer: http://stackoverflow.com/a/25366246
type: Question

http://stackoverflow.com/a/25363612
upvote count: 3
answers question: http://stackoverflow.com/q/25363487
has body: If your string is: var src="http://localhost:200/assets/images/eyecatcher/6/black6.png" Use the following: var parts = src.split('/'); var img = parts.pop(); //black6.png var flder = parts.pop(); //6 var sflder = parts.pop(); //eveatcher
type: Answer
score: 3
downvote count: 0

http://stackoverflow.com/a/25233399
downvote count: 0
has comment: http://stackoverflow.com/comment/39307713
answers question: http://stackoverflow.com/q/25233347
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25233347
type: Answer
has body: Your method call should look like this: source = source.replace(/.*"/, ""); Regular expression in javascript are written between /.../ and not "/.../" like they are in many other languages. If your string is always structured like that and it does not contain any more characters, your regex should do the trick. That's because the * quantifier acts greedy by default, thus always matching the last " in the string.
score: 2

http://stackoverflow.com/q/25366891
has comment: http://stackoverflow.com/comment/39554490
tagged with: asp.net
linked to: http://stackoverflow.com/q/104601
linked to: http://stackoverflow.com/q/22236816
has comment: http://stackoverflow.com/comment/39554623
linked to: http://stackoverflow.com/q/11888892
has comment: http://stackoverflow.com/comment/39554733
has comment: http://stackoverflow.com/comment/61124317
type: AnsweredQuestion
has body: I have a aspx page that needs to be open in new TAB in Internet Explorer (Request from firm. They're using only IE). My problem is all I've tried open NEW WINDOW, but not Tab. Here What I've done: protected void btnPracGr_Click(object sender, EventArgs e) { ScriptManager.RegisterStartupScript(this, this.GetType(), "newPage", String.Format("window.open({0});", "'pgPracGr.aspx'"), true); } One more: protected void btnPracGr_Click(object sender, EventArgs e) { ScriptManager.RegisterStartupScript(this, this.GetType(), "newTab", String.Format("window.open({0});", "'pgPracGr.aspx'"), true); } One more: &lt;asp:LinkButton ID="btnPracGr" runat="server" OnClientClick ="document.forms[0].target = '_blank';" onclick="btnPracGr_Click"&gt;Practice Group Reports&lt;/asp:LinkButton&gt; One More: protected void Page_Load(object sender, EventArgs e) { btnPracGr.OnClientClick = String.Format("window.open({0});return false;", "'pgPracGr.aspx'"); } Nothing works for me... All ways it open new window... Any help, please!
possible better answer: http://stackoverflow.com/a/32331298
has comment: http://stackoverflow.com/comment/39554438
has comment: http://stackoverflow.com/comment/39554478
type: Question
has answer: http://stackoverflow.com/a/32331298
tagged with: c#
tagged with: javascript
has comment: http://stackoverflow.com/comment/39554507
has answer: http://stackoverflow.com/a/25367052
accepted answer: http://stackoverflow.com/a/25367052
has title: How to open page in new Tab (NOT WINDOW) in ASP.NET C#?
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/5530274

http://stackoverflow.com/comment/39311721
type: QuestionComment
comment on: http://stackoverflow.com/q/25235389
score: 1
has text: the `#` is used to specify a id selector, but `document.getElementById()` does not accept a selector, it expects an id to be passed to it
type: Comment

http://stackoverflow.com/comment/39491327
type: Comment
comment on: http://stackoverflow.com/a/25315076
type: AnswerComment
has text: @dmidz see addition above. Why isn't "2020.pdf" a string?
score: 0

http://stackoverflow.com/a/25287496
has body: You can show the images in new window. Then If the window already opened you can access it and change its href. Here is the html part &lt;img src="http://puu.sh/aQHbz/911cfd78b8.png" onclick = "newImage(this.src)"/&gt; &lt;img src="http://puu.sh/aQHpR/dd5625150e.jpg" onclick = "newImage(this.src)"/&gt; Here is the javascript part. var win = false; //window exist variable function newImage(e){ if(win.open){ win.focus() //Focus to map window win.location.href=e; //Change to new image }else{ win = open(e, 'example', 'width=300,height=300'); //Open a new window with the image url } } You can see the solution on fiddle. You must put javascript part to head or before your images.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25287126

http://stackoverflow.com/a/25292254
score: 0
answers question: http://stackoverflow.com/q/25291060
has comment: http://stackoverflow.com/comment/39419950
has comment: http://stackoverflow.com/comment/39419929
has comment: http://stackoverflow.com/comment/39419320
type: Answer
has comment: http://stackoverflow.com/comment/39419835
has comment: http://stackoverflow.com/comment/39419872
has body: You can change the class which is being used to select date that is 'ui-state-active' and then have your desired color and formatting over there .ui-state-active { background: red !important; } JSFiddle Demo As per the comment here is the updated answer: JSFiddle Demo Code snippet: var SelectedDates = {}; SelectedDates[new Date('08/08/2014')] = new Date('08/08/2014'); SelectedDates[new Date('08/09/2014')] = new Date('08/09/2014'); SelectedDates[new Date('08/10/2014')] = new Date('08/10/2014'); $(function() { $("#datepicker").datepicker({ beforeShowDay: function(date) { var Highlight = SelectedDates[date]; if (Highlight) { return [true, "Highlighted", Highlight]; } else { return [true, '', '']; } } }); });
has comment: http://stackoverflow.com/comment/39419791
has comment: http://stackoverflow.com/comment/39420118

http://stackoverflow.com/a/25327230
answers question: http://stackoverflow.com/q/25327120
type: Answer
has body: Cannot You check whether any class of that sort exists or not .. eg:- if($('.'+className).length &gt;0) { window.scroll(0,findPos(className)); } I hope i got your problem ...
score: 0

http://stackoverflow.com/q/25337509
accepted answer: http://stackoverflow.com/a/25337669
has comment: http://stackoverflow.com/comment/44701917
has answer: http://stackoverflow.com/a/41642476
upvote count: 24
tagged with: jquery
favorite count: 0
tagged with: kendo-ui
has answer: http://stackoverflow.com/a/25337904
has answer: http://stackoverflow.com/a/34804782
possible better answer: http://stackoverflow.com/a/25337548
type: AnsweredQuestion
downvote count: 0
score: 24
has answer: http://stackoverflow.com/a/37131942
type: Question
tagged with: kendo-datepicker
tagged with: javascript
has title: Set Today date to kendo datepicker
has answer: http://stackoverflow.com/a/25337548
answer count: 6
has body: I want to set today date to Kendo DatePicker on clear button click. I tried following but it is not working. $('#btnClear').click(function () { $("#StartDate").data("kendoDatePicker").value(new Date()); }); Above code don't give any error and don't set today date. It clears kendo DatePicker's textbox value. Note: Kendo DatePicker format is MM/dd/yyyy.
has answer: http://stackoverflow.com/a/25337669

http://stackoverflow.com/comment/39578568
score: 1
has text: You might be confusing 'variables that contain keys' with 'strings that are keys'.
comment on: http://stackoverflow.com/q/25379226
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39480312
comment on: http://stackoverflow.com/q/25325633
score: 0
type: Comment
type: QuestionComment
has text: what if you replace with `ng-href` (which is the proper way to go) ?

http://stackoverflow.com/q/25378419
tagged with: date
type: Question
has title: HighCharts Date Formatting
tagged with: highcharts
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25379780
score: 0
tagged with: sql
has body: Have started playing with HiagCharts to produce some charts from XML data, however the dates/times simply will not render at all. The XML file that is produced directly from an 'FOR XML AUTO' query on SQL Server 2012 is as below: &lt;tbldashboardgroups dashboard_group_name="Hard Drive Space"&gt; &lt;tblnodesensors id="4" deviceid="C:"&gt; &lt;tblsensordata sensordata="36006309888" dtetme="2014-08-12T19:27:13"/&gt; &lt;tblsensordata sensordata="33623793664" dtetme="2014-08-13T06:52:17"/&gt; &lt;tblsensordata sensordata="33979367424" dtetme="2014-08-14T14:42:23"/&gt; &lt;tblsensordata sensordata="34030342144" dtetme="2014-08-15T07:48:21"/&gt; &lt;tblsensordata sensordata="34024259584" dtetme="2014-08-15T07:49:07"/&gt; &lt;tblsensordata sensordata="33818914816" dtetme="2014-08-15T09:07:56"/&gt; &lt;tblsensordata sensordata="33818447872" dtetme="2014-08-15T09:08:10"/&gt; &lt;tblsensordata sensordata="33817014272" dtetme="2014-08-15T09:08:20"/&gt; &lt;tblsensordata sensordata="33682038784" dtetme="2014-08-15T09:16:29"/&gt; &lt;tblsensordata sensordata="33684578304" dtetme="2014-08-15T09:18:47"/&gt; &lt;tblsensordata sensordata="33611354112" dtetme="2014-08-15T10:02:31"/&gt; &lt;tblsensordata sensordata="33579536384" dtetme="2014-08-16T12:43:09"/&gt; &lt;tblsensordata sensordata="30933770240" dtetme="2014-08-17T11:08:00"/&gt; &lt;tblsensordata sensordata="29468946432" dtetme="2014-08-18T12:13:41"/&gt; &lt;tblsensordata sensordata="29465878528" dtetme="2014-08-18T18:05:15"/&gt; &lt;tblsensordata sensordata="29467230208" dtetme="2014-08-18T18:05:28"/&gt; &lt;tblsensordata sensordata="29462601728" dtetme="2014-08-18T18:10:24"/&gt; &lt;tblsensordata sensordata="29104414720" dtetme="2014-08-18T22:48:49"/&gt; &lt;tblsensordata sensordata="29104013312" dtetme="2014-08-18T22:49:08"/&gt; &lt;tblsensordata sensordata="29102968832" dtetme="2014-08-18T22:49:16"/&gt; &lt;/tblnodesensors&gt;&lt;tblnodesensors id="5" deviceid="E:"&gt; &lt;tblsensordata sensordata="62401007616" dtetme="2…
accepted answer: http://stackoverflow.com/a/25379780
type: AnsweredQuestion

http://stackoverflow.com/q/25344377
score: 1
accepted answer: http://stackoverflow.com/a/25344409
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: Embedding jquery calendar plugin--nothing showing up?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25344409
upvote count: 1
tagged with: calendar
tagged with: embed
type: Question
has body: I am attempting to embed this jquery calendar into my webpage http://www.jplugins.net/pretty-calendar/?demo I am following the directions listed here: https://www.apptic.me/blog/making-pretty-calendars-with-jquery.php While I have pasted everything listed here for the basic functioning into my document (including the sample script) nothing is showing up. Any insights? Here is the relevant code:

http://stackoverflow.com/a/25759300
score: 1
has body: I'm not sure if I understand you question correctly, but when writing docs for my services I dicovered that to link to docs in other section of the docs, one needs to use this format: @ngdoc service @name app.module.servicename @requires app.module.anotherService @requires app.module2.anotherServiceInApp @requires ./api/api.serviceModule.serviceInApiModule note how you need to use relative paths to get from the app documentation to the api documentation
upvote count: 1
answers question: http://stackoverflow.com/q/25328886
type: Answer
downvote count: 0

http://stackoverflow.com/q/25355022
answer count: 3
has comment: http://stackoverflow.com/comment/39549009
score: 3
has answer: http://stackoverflow.com/a/25359140
has body: I am new to selenium. My application is only IE compatible. I know that we can run test cases in any any browsers using respective drivers but is there any way that we can use to record test case using selenium IDE in Internet Explorer ??
favorite count: 0
tagged with: selenium-webdriver
type: UnansweredQuestion
tagged with: selenium
tagged with: internet-explorer
has answer: http://stackoverflow.com/a/25355292
upvote count: 3
tagged with: java
has answer: http://stackoverflow.com/a/25356798
type: Question
has title: how to record testcase using selenium in IE
has comment: http://stackoverflow.com/comment/39533674
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/25378581
has title: Add a class to the html element using angular js dynamically on the basis of If condition
has answer: http://stackoverflow.com/a/25378633
type: Question
accepted answer: http://stackoverflow.com/a/25378633
tagged with: javascript
tagged with: jquery
score: 0
linked to: http://stackoverflow.com/q/195951
has body: I am implementing some default styles for a div for a "condition id" as (id="default") &lt;div id="student" class="student"&gt; /* if(id == "default") */ I need to set some other styles (class="changeStyle"), if the "condition id" is changed i.e. (id != "default") &lt;div id="student" class="changeStyle"&gt; /*if(id != "default") */ which should be added dynamically, if it's finding the (id != "default"). Any suggesstion/example would be highly appreciated.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/q/25290923
tagged with: unit-testing
type: Question
tagged with: istanbul
has answer: http://stackoverflow.com/a/73495090
tagged with: javascript
linked to: http://stackoverflow.com/q/44995252
score: 15
tagged with: test-coverage
answer count: 3
has answer: http://stackoverflow.com/a/75541009
has answer: http://stackoverflow.com/a/51046851
favorite count: 0
has body: The unit test coverage report from Istanbul in HTML format displays every single folder of the project in the index.html. It actually flattens the directory structure. Is there an option to render the html report with nested folders?
upvote count: 15
has title: Istanbul coverage nested directories in HTML report
downvote count: 0
tagged with: code-coverage
type: UnansweredQuestion

http://stackoverflow.com/comment/39313379
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25235635
type: Comment
has text: It's hard to say without seeing some code. Can you edit your post to provide some context? And no custom library needed for JSON -- it's a global object. You can read more about it [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON)

http://stackoverflow.com/comment/39308425
has text: http://es5.github.io/x12.html#x12.6.3
score: 1
comment on: http://stackoverflow.com/q/25233782
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25281519
has answer: http://stackoverflow.com/a/25281665
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25281914
accepted answer: http://stackoverflow.com/a/25281914
has title: Show more than one div onclick show javascript
has comment: http://stackoverflow.com/comment/39396973
type: AnsweredQuestion
has body: I'm using a simple div onclick show using javascript and at the moment when you click on each div it shows the next one in the line. How could I make it possible to make more than one div show at a time? In the HTML I tried changing the div name onclick to more than one such as (when you click it shows div q1/q2/q3):- But the above didn't work. Here's my code as it is at the moment:- JS function showdiv(id){ document.getElementById(id).style.display = "table"; } HTML ENABLER: Internal risk management capability Are you concerned about suppliers' capability to meet outcomes? Are you concerned about financial risks associated with this project?
type: Question
score: 0
has answer: http://stackoverflow.com/a/25281766
tagged with: javascript
has comment: http://stackoverflow.com/comment/39396969
possible better answer: http://stackoverflow.com/a/25281665
has comment: http://stackoverflow.com/comment/39396874
answer count: 3

http://stackoverflow.com/a/25252699
has comment: http://stackoverflow.com/comment/39355283
has comment: http://stackoverflow.com/comment/39365685
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25252111
has body: Just move collage var out of if statement because when you declare it into if statement this variable only will exist in this scope. And I don't know why it don't work with bool that's why I change it to number :P I hope someone else can answer that. var myImg = document.getElementById("mainImage"); var imgIndex = 0; var status = 1; var collage; myImg.onclick = function () { if(status == 1) { collage = setInterval(changeSrc,1500); status = 0; } else { clearInterval(collage); status = 1; } }
score: 1
has comment: http://stackoverflow.com/comment/39366180
has comment: http://stackoverflow.com/comment/39359370
downvote count: 0

http://stackoverflow.com/a/25317824
answers question: http://stackoverflow.com/q/25317306
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39465543
has body: @Html.Raw(Model.Code) Or actually, since you have a list: @foreach (var item in Model) { @Html.Raw(item.Code) }
has comment: http://stackoverflow.com/comment/39464939
has comment: http://stackoverflow.com/comment/39465466
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25317306
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39465375
has comment: http://stackoverflow.com/comment/39491586

http://stackoverflow.com/comment/39329916
comment on: http://stackoverflow.com/q/25244333
has text: it is interesting for a strong API like Angularjs :(
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39325866
comment on: http://stackoverflow.com/a/25238389
type: Comment
has text: This works but puts both issues as only one String in the list like this: [No address provided., No telephone number provided.]. But these should be two separate Strings in the list.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39369685
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25257670
has text: It seems like `io.sockets.on('connection', ...` should be something more specific to socket associated with `req`, not something global for all sockets.
score: 0

http://stackoverflow.com/comment/39471186
comment on: http://stackoverflow.com/a/25321109
has text: Ok i got this , i had echo data in chunk , how to grab all data in Response text , it seems that in response Header all content is there but complete :function( ResponseText, textStatus, jqXHR ){ alert(ResponseText); } this give [object , object]
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39567667
comment on: http://stackoverflow.com/a/25373418
type: AnswerComment
score: 0
type: Comment
has text: only part that feels weird is that we're forcing the getPages(true) in the OtherCtrl. What if the RandomeCtrl and OtherCtrl fire at the same time?

http://stackoverflow.com/a/34804782
upvote count: 3
answers question: http://stackoverflow.com/q/25337509
score: 3
downvote count: 0
type: Answer
has body: I have use it like - @(Html.Kendo().DatePicker() .Name("customerOrderDate") .Min(DateTime.Today) .Value(Model.CustomerOrderDate) .HtmlAttributes(new {style = "width:120px"})) It is good part that Kendo have DateTime struct in their api.

http://stackoverflow.com/comment/39597801
comment on: http://stackoverflow.com/q/25389342
has text: there you are.. place script at the end of file... please look at my answer below
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39376907
has text: your code is asynchronous, probably you check jsonArray before the success function is executed
comment on: http://stackoverflow.com/q/25267788
type: Comment
score: 1
type: QuestionComment

angularjs-scope
tags question: http://stackoverflow.com/q/25332820
tags question: http://stackoverflow.com/q/25272261
tags question: http://stackoverflow.com/q/25388249
tags question: http://stackoverflow.com/q/25314493
tags question: http://stackoverflow.com/q/25280689
tags question: http://stackoverflow.com/q/25337528
tags question: http://stackoverflow.com/q/25275270
tags question: http://stackoverflow.com/q/25308637
tags question: http://stackoverflow.com/q/25280206
tags question: http://stackoverflow.com/q/25331608
tags question: http://stackoverflow.com/q/25239819
tags question: http://stackoverflow.com/q/25369599
tags question: http://stackoverflow.com/q/25275840
tags question: http://stackoverflow.com/q/25311780
tags question: http://stackoverflow.com/q/25270767
tags question: http://stackoverflow.com/q/25309698
tags question: http://stackoverflow.com/q/25285659
tag name: angularjs-scope
tags question: http://stackoverflow.com/q/25291581
tags question: http://stackoverflow.com/q/25327136
tags question: http://stackoverflow.com/q/25338035
tags question: http://stackoverflow.com/q/25343729
tags question: http://stackoverflow.com/q/25274449
tags question: http://stackoverflow.com/q/25266555
type: Tag

http://stackoverflow.com/q/25315897
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25315928
type: Question
tagged with: canvas
has title: How to move the square to the destination?
downvote count: 0
has body: How to move the square to the destination? Square moves one pixel only when click the mouse? Sorry for my english. window.onload = function(){ var x = 50; var y = 50; var c = document.getElementById("game"); var ctx = c.getContext("2d"); init(); draw(); function init() { document.addEventListener("click",paint,false); } function paint(e) { if(x&lt;e.clientX) x++; } function draw() { ctx.clearRect(x-1,y,1,15); ctx.fillStyle = "blue"; ctx.fillRect(x,y,15,15); window.requestAnimationFrame(draw); } }
tagged with: javascript
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25315928
favorite count: 0
upvote count: 1

http://stackoverflow.com/q/25321901
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/39472321
type: Question
has body: I saw this code in this forum described to do that job as follows I run a radio station & my server gave me this code to show my songs played history but it only updates on a page refresh. Last 5 plays on Boss 1 - Loading... I couldn't get the code posted from here (up top) to work. Could anyone possibly assemble a proper construction where it would update the data about every minute?
score: -1
has answer: http://stackoverflow.com/a/25321948
upvote count: 0
answer count: 1
has title: External JS to reload itself automatically?

http://stackoverflow.com/comment/39310325
has text: sorry when I was editting the code I subconsciously added it
score: 0
comment on: http://stackoverflow.com/q/25234503
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25357635
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39537109
answer count: 2
has comment: http://stackoverflow.com/comment/39537113
downvote count: 0
tagged with: javascript
favorite count: 0
has title: "Cannot read property .. of null" after checking for undefined object
accepted answer: http://stackoverflow.com/a/25357695
possible better answer: http://stackoverflow.com/a/77350621
has answer: http://stackoverflow.com/a/77350621
has body: I have an object that I need to check if it is defined. Also, I also want to check if a property of that object is true or false. So what I want is if ((typeof myVar !== 'undefined') &amp;&amp; (myVar.isMale === false)) { // Do something 1 } else{ // Do something 2 } But this logic gives me error Uncaught TypeError: Cannot read property 'isMale' of null What will be the best login to handle this condition ? Thanks !
has comment: http://stackoverflow.com/comment/39537004
has comment: http://stackoverflow.com/comment/39536997
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25357695

http://stackoverflow.com/q/25316004
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25316052
accepted answer: http://stackoverflow.com/a/25316052
type: Question
tagged with: javascript
score: 0
has body: I have a form with with a simple input field and I have a button that will allow me to add another input field via javascript using the same name(eg: name="list[]"). When I click the 'add' button to enter multiple email addresses it dynamically adds the new input field but the problem I'm having is when I send it to the PHP script the script only returns the first e-mail and not the others. Any ideas what I could be doing wrong? -javascript below- function preparePage() { var addEmail = document.getElementById("add_email"); var putEmail = document.getElementById("put_email"); addEmail.onclick = function() { putEmail.innerHTML += '&lt;input type="text" name="names_list[]"&gt;&lt;br /&gt;'; }; } window.onload = function() { preparePage(); }; -html below- &lt;form action="email_names.php" method="post"&gt; &lt;div id="put_email"&gt; &lt;input type="text" name="names_list[]"&gt;&lt;br /&gt; &lt;/div&gt; &lt;div&gt; &lt;div id="add_email"&gt; + &lt;/div&gt; &lt;input id="email_btn" type="submit" name="email_submit" value="E-mail List"&gt; &lt;/div&gt; &lt;/form&gt; -php script below- if(isset($_POST['email_submit'])) { $names_list = $_POST['names_list']; echo '&lt;pre&gt;'; print_r($names_list); echo '&lt;pre&gt;'; } //This returns Array ( [0] =&gt; test@email1.com ) // instead of Array ( [0] =&gt; test@email1.com [1] =&gt; test@email2.com [2] =&gt; test@email3.com )
answer count: 1
has title: Having trouble sending form field with same names using Javascript to PHP script
tagged with: php

http://stackoverflow.com/comment/39405632
type: AnswerComment
type: Comment
has text: Can't believe I forgot to send data in! Regardless - I tried both adding my object 'toupdate' and adding an empty object, yet I still receive the same error message.
comment on: http://stackoverflow.com/a/25276863
score: 0

http://stackoverflow.com/comment/39581253
type: Comment
type: QuestionComment
has text: Can't you just try and see? ) Actually, it depends on that function's implementation - one can check arguments `typeof`, for example.
score: 0
comment on: http://stackoverflow.com/q/25381159

http://stackoverflow.com/q/25324418
has comment: http://stackoverflow.com/comment/39478748
has comment: http://stackoverflow.com/comment/39478838
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39478575
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/39478510
has comment: http://stackoverflow.com/comment/39479132
tagged with: session
has comment: http://stackoverflow.com/comment/39477615
has title: ajax not receiving session values
has comment: http://stackoverflow.com/comment/39477340
tagged with: javascript
tagged with: jquery
has body: I am trying to update a progress bar from dynamic value($done) generated by f_backup.php and storing it in a session variable and caling it with ajax. Now i am not sure whether the call i am making is correct or not. I am also getting an error: Undefined index: progress in C:\wamp\www\SDBMS\get_live_val.php on line 3 I would also like to show some animation in the progress bar but i dont know how to. P.S: It would be very helpful for me if someone can show me some code snnipets of the places where i should edit. I tried searching everywhere for my problem but nothing has come to my rescue. Here is my code: PHP (f_backup.php) <?php $total_tables=0; $table_no=1; $done=0; $return=''; . . foreach($allTables as $table){ . . . for($i=0; $i<$num_fields; $i++){ while($row = mysql_fetch_row($result)){ $return.='INSERT INTO '.$table.' VALUES('; for($j=0; $j<$num_fields; $j++){ . . . } $return.=");\n"; } } $return.="\n\n"; //calculating progress $done=($table_no/$total_tables)*100; session_start(); $_SESSION['progress']=$done; session_write_close(); sleep(1); $table_no=$table_no+1; } . . ?> PHP (get_live_val.php) <?php session_start(); echo $_SESSION['progress']; exit(); ?> JAVASCRIPT
has comment: http://stackoverflow.com/comment/39477141
tagged with: ajax
score: 0

http://stackoverflow.com/a/25279406
answers question: http://stackoverflow.com/q/25232798
score: 0
has body: I tried retrieving all day events with singleEvents = true in the API explorer (https://developers.google.com/apis-explorer/#p/calendar/v3/calendar.events.list): GET https://www.googleapis.com/calendar/v3/calendars/primary/events?singleEvents=true&amp;timeMax=2014-08-15T00%3A00%3A00Z&amp;timeMin=2014-08-10T00%3A00%3A00Z and correctly got back an all-day event with: "start": { "date": "2014-08-08" }, "end": { "date": "2014-08-11" }, My proposal would be instead of your code to do: var pageToken; var events = []; var query = "https://www.googleapis.com/calendar/v3/calendars/" + yourcalendarId + "/events/?"; do { $.get( query, { pageToken: pageToken, singleEvents:true, key: yourKey } ) .done(function( data ) { events = events.concat(data["items"]); pageToken = data["nextPageToken"]; }); } while (pageToken);
type: Answer

angular-amd
tag name: angular-amd
type: Tag
tags question: http://stackoverflow.com/q/25335773

http://stackoverflow.com/q/25294273
linked to: http://stackoverflow.com/q/623172
linked to: http://stackoverflow.com/q/11133069
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39420834
tagged with: webkit
accepted answer: http://stackoverflow.com/a/25294639
answer count: 1
has title: Cross-Browser Image Preview Effect
favorite count: 0
has comment: http://stackoverflow.com/comment/39420951
has comment: http://stackoverflow.com/comment/39420904
has body: I have attempted to create an image preview effect using JavaScript that opens any image clicked in full screen mode. The image itself uses the following code to center itself based upon its size. CSS | See All | Result position: fixed; top: 50%; left: 50%; Simplified Javascript | See All | Result el.style.margin = "-" + el.height / 2 + "px -" + el.width / 2 + "px"; This code functions properly in Firefox, but in Webkit browsers the image is pushed into the top-left corner and has obscure negative margins. Why does this Javascript not work in Webkit browsers? How should I go about fixing this code?
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25294639
upvote count: 1
has comment: http://stackoverflow.com/comment/39421141
type: Question

http://stackoverflow.com/a/25372982
has body: I believe this is what you're trying to accomplish. I haven't tested for browser compatibility, so you may want to do that and play around with it. Basically just involved adding an additional div, and using slideDown on the new div. Link http://jsfiddle.net/bUcZg/22/
has comment: http://stackoverflow.com/comment/39572115
answers question: http://stackoverflow.com/q/25372667
has comment: http://stackoverflow.com/comment/39566728
accepted answer of: http://stackoverflow.com/q/25372667
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/a/25668450
upvote count: 2
has comment: http://stackoverflow.com/comment/139299396
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25378956
has comment: http://stackoverflow.com/comment/40156510
has body: Problem is solved now. After checking out some numerical methods I went for the partial fraction decomposition by using the poles of the system and the least square method to calculate the coeficients. After this the inverse LT wasn't that hard to find. Thx for your suggestions ;) Ask me if you want to look at the code.

http://stackoverflow.com/comment/39407117
comment on: http://stackoverflow.com/a/25286830
type: Comment
has text: Oh, it gave me a bunch of metadata for the textarea, targeted with a class, and not input, so maybe that's why I got the metadata.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25245712
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26190324
has answer: http://stackoverflow.com/a/34029682
upvote count: 7
tagged with: xmlhttprequest
has body: On Chrome, I'm having no troubles making a cross domain request, however on Firefox (Ubuntu 14.04), I get an error that consists only of a colon on the line that calls for the xmlhttprequest. xmlhttp.open("GET", "http://x.x.x.x:xxxx/folder/file.xml", false); The error message is just ":".
has comment: http://stackoverflow.com/comment/39330879
score: 7
has answer: http://stackoverflow.com/a/25247899
type: Question
has comment: http://stackoverflow.com/comment/39331172
has answer: http://stackoverflow.com/a/45661290
tagged with: cors
has comment: http://stackoverflow.com/comment/39330946
tagged with: firefox
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39469783
has comment: http://stackoverflow.com/comment/39529434
has comment: http://stackoverflow.com/comment/39331059
has title: On Firefox, CORS request gives error ":" (colon)
answer count: 4
favorite count: 0

http://stackoverflow.com/comment/39381588
comment on: http://stackoverflow.com/q/25272247
type: Comment
type: QuestionComment
has text: Do you know the number of points in the FeatureCollection before you load the geoJson?
score: 0

storage
tag name: storage
tags question: http://stackoverflow.com/q/25331476
type: Tag

http://stackoverflow.com/comment/39515922
score: 0
type: AnswerComment
has text: Could you clarify what you mean by: "Not really know how many records in table tbl_mkash"?
type: Comment
comment on: http://stackoverflow.com/a/25345639

http://stackoverflow.com/comment/39451863
score: 0
comment on: http://stackoverflow.com/q/25310914
type: QuestionComment
has text: What are you getting as a result from calling it? What is `sDate`? What is `vanTime` before you try to create a date? Also, since your date/time is in a recognizable format you can just do `new Date(vanTime)`
type: Comment

http://stackoverflow.com/comment/39396051
comment on: http://stackoverflow.com/a/25271167
score: 0
type: AnswerComment
type: Comment
has text: i saw the link and it seems like a good option but just want to know that is it better than clearbox??

http://stackoverflow.com/comment/39461178
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25312438
has text: Glad I could help! It was my pleasure

http://stackoverflow.com/a/25250318
has comment: http://stackoverflow.com/comment/39404365
upvote count: 2
has body: No-one seems to be keen to answer this question - I guess because it's a definitely going to be an opinon based answer. I'll give it a go... To answer your first question - Flex is if not on the way out, at least on a low simmer. Adobe Flash Builder 4.7 (the main Flex tooling IDE) has not been updated for well over a year now and I can't see any updates on the horizon. Apache, who now own the codebase are doing a nice job with updates, but progress is slow. One possible bright area is FlexJS, a compiler that outputs Javascript and HTML. It's still alpha at the moment, but it could be an option. I've never developed in ExtJS, but it seems it's time has come and gone - it's still used, but it's definitely been superseded by Angular and other frameworks such as Knockout. Cross-Compatibility - AngularJS works is almost all browsers from IE8 up and that includes most modern mobile browsers. People often use JQuery Mobile in combo with Angular and Bootstrap to get the functionality they need. Bootstrap is responsive, so if you lay out your UI correctly, it should work for all devices. Flex is also cross compatible in the form of Adobe Air, but it's less easy to get it onto people's devices - they need to download the Air framework. AngularJS is the number one framework by a huge margin at the moment - and it's still growing. Check out this graph from google trends. The combination of technologies includes Javascript, CSS, Grunt, Bower, Node.js and concepts such as dependency injection, MVC and responsive layout - all this stuff is useful for other projects. Once you master Angularjs, you'll be ready for a lot of other stuff. Learning Flex seems to be a bit of a dead end at the moment - you'll notice the absence of any recent Flex blog posts. It's not cool right now, and it's just too uncertain if it's going to survive. Using Angularjs and D3 for example is reasonably straightforward - a web search will show lots of examples here. Plus you can do basic drawing using svg el…
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25238478
downvote count: 0

http://stackoverflow.com/q/25318319
has comment: http://stackoverflow.com/comment/39496718
accepted answer: http://stackoverflow.com/a/25318408
downvote count: 0
answer count: 1
favorite count: 0
tagged with: angularjs
has title: Relating PhoneGap, AngularJs, Ionic, Bootstrap, Jasmine, Grunt, Bower.
type: AnsweredQuestion
tagged with: cordova
score: 1
has answer: http://stackoverflow.com/a/25318408
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39500429
has comment: http://stackoverflow.com/comment/39499425
tagged with: javascript
tagged with: gruntjs
has body: I'm starting an new project targeting mobile development, and I found my self lost on many framework options. Specifically, I choose to do an Ionic project, which is based on Bootstrap, Phonegap, and AngularJs. To build and dependencies I'm using Grunt and Bower, and Jasmine for tests. So, can anybody give a light on how I start the project? Which framework I use to generate the folders organization. And maybe, some tips about the relation between these tools. Thanks!
tagged with: ionic-framework

http://stackoverflow.com/a/25368659
has comment: http://stackoverflow.com/comment/39591169
has body: You can use .serialize() to get all the form values and send them to the server via ajax. Something like this would do: $(function() { $('form').on('submit', function( e ) { e.preventDefault(); $.ajax( url:'http://localhost:8888/', data: $(this).serialize(), ..... ); }); }); Your page must be running on the same localhost same port 8888 for this to work.
type: Answer
has comment: http://stackoverflow.com/comment/39590236
has comment: http://stackoverflow.com/comment/39591356
has comment: http://stackoverflow.com/comment/39574355
has comment: http://stackoverflow.com/comment/39590497
accepted answer of: http://stackoverflow.com/q/25368483
has comment: http://stackoverflow.com/comment/39585906
score: 0
answers question: http://stackoverflow.com/q/25368483
type: AcceptedAnswer

http://stackoverflow.com/a/25360053
answers question: http://stackoverflow.com/q/25359877
upvote count: 1
downvote count: 1
type: Answer
has body: If you want the T in your statement you can do something like mystring = mystring.replace(/T/, "T\n"); Working Fiddle
score: 0

http://stackoverflow.com/q/25387430
favorite count: 0
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39603649
upvote count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39603301
linked to: http://stackoverflow.com/q/4985284
has answer: http://stackoverflow.com/a/25391862
has comment: http://stackoverflow.com/comment/39593823
has body: There are a lot of articles published to stackoverflow and in other websites which are relevant to the way of selecting text of ONE element in order to be available for copy. But I have not found a function which can SELECT AND HIGHLIGHT the text of ALL similar elements in an HTML document. For example, to select the text from all h2 titles. I tried to modify the function from this thread which selects one element. SELECTING ONE ELEMENT FUNCTION jQuery.fn.selectText = function(){ var doc = document; var element = this[0]; console.log(this, element); if (doc.body.createTextRange) { var range = document.body.createTextRange(); range.moveToElementText(element); range.select(); } else if (window.getSelection) { var selection = window.getSelection(); var range = document.createRange(); range.selectNodeContents(element); selection.removeAllRanges(); selection.addRange(range); } }; Here is the modified version of the above function which performs the selection of all similar elements. $.fn.selectTextAll = function() { var doc = document, numElem = this.length, elements = this; if(doc.body.createTextRange) { for(i=0; i&lt;numElem; i++) { var range = document.body.createTextRange(); range.moveToElementText(elements[i]); range.select(); } } else if(window.getSelection) { var selection = window.getSelection(); selection.removeAllRanges(); for(i=0; i&lt;numElem; i++) { var range = document.createRange(); range.selectNodeContents(elements[i]); selection.addRange(range); } } }; The problem is that the above function is working properly in Firefox but in no other browser, Chrome, Safari, Opera, IE+9. In order to confirm this, you can open this fiddle in all browsers. It is working only in Firefox. Can anyone give a solution to this? Thank you for your time
has title: Javascript: Select text for copy of all similar elements in HTML document
linked to: http://stackoverflow.com/q/12243898
linked to: http://stackoverflow.com/q/6349451
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39604166
linked to: http://stackoverflow.com/q/985272
has comment: http://stackoverflow.com/comment/39605613
has comment: http://stackoverflow.com/comment/39604714
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25414101

http://stackoverflow.com/q/25366726
type: Question
answer count: 2
score: 5
has comment: http://stackoverflow.com/comment/39554240
downvote count: 0
accepted answer: http://stackoverflow.com/a/25366860
tagged with: javascript
has comment: http://stackoverflow.com/comment/39554157
has comment: http://stackoverflow.com/comment/39554925
has comment: http://stackoverflow.com/comment/39554233
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
linked to: http://stackoverflow.com/q/19246714
has comment: http://stackoverflow.com/comment/39554334
has title: this.class vs. this.getAttribute('class')
type: AnsweredQuestion
has body: I have a radio button, and when it is pressed a function is called, which accepts the class of the button as an argument. So something like this: &lt;input class="myclass" type="radio" name="name" value="x" checked="true" onClick="myFunction(this.value, this.getAttribute('class'))"&gt;&lt;/input&gt; Notice that in my onClick, I have this.getAttribute('class') instead of simply this.class. I tried using this.class but I kept getting undefined. Is this.class not an acceptable thing to do? I have used this.id elsewhere in my code which works fine, but for some reason I need to use getAttribute when I want to reference class. So essentially I am asking what is the difference between this.class and this.getAttribute('class')?
upvote count: 5
possible better answer: http://stackoverflow.com/a/25366983
has answer: http://stackoverflow.com/a/25366860
has answer: http://stackoverflow.com/a/25366983

http://stackoverflow.com/a/41704389
score: 4
answers question: http://stackoverflow.com/q/25367230
has comment: http://stackoverflow.com/comment/70695218
type: Answer
has body: This is code I adapted from pure javascript mask for phone from Javascript phone mask for text field with regex. I created a codepen here http://codepen.io/anon/pen/LxWVoV function mask(o, f) { setTimeout(function () { var v = f(o.value); if (v != o.value) { o.value = v; } }, 1); } function mssn(v) { var r = v.replace(/\D/g,""); if (r.length &gt; 9) { r = r.replace(/^(\d\d\d)(\d{2})(\d{0,4}).*/,"$1-$2-$3"); return r; } else if (r.length &gt; 4) { r = r.replace(/^(\d\d\d)(\d{2})(\d{0,4}).*/,"$1-$2-$3"); } else if (r.length &gt; 2) { r = r.replace(/^(\d\d\d)(\d{0,3})/,"$1-$2"); } else { r = r.replace(/^(\d*)/, "$1"); } return r; } To use it, add onblur and onkeyup to the input field &lt;input type="text" value="" id="ssn" onkeyup="mask(this, mssn);" onblur="mask(this, mssn)"&gt;
has comment: http://stackoverflow.com/comment/70692715
has comment: http://stackoverflow.com/comment/70651398
has comment: http://stackoverflow.com/comment/70605932
upvote count: 4
has comment: http://stackoverflow.com/comment/79579801
has comment: http://stackoverflow.com/comment/70649858
downvote count: 0

http://stackoverflow.com/q/25367789
has answer: http://stackoverflow.com/a/25368075
upvote count: 30
tagged with: timezone
has body: My app runs on Linux servers, where the time is (naturally) set to UTC/GMT. However the app is developed on Mac desktops where the time is typically set to a local timezone. I could change every new Date() in my code to run: var date = new Date().getTime(); And thus ensure dates on the server are always GMT, but that seems inelegant. I understand previous versions of node used to always return UTC/GMT. Is there any way to bring this behavior back? Edit: Removed adding timezone offset to getTime() per comments - since getTime() is already in UTC.
has comment: http://stackoverflow.com/comment/39556833
possible better answer: http://stackoverflow.com/a/25368075
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/35888788
has comment: http://stackoverflow.com/comment/39556609
type: Question
has comment: http://stackoverflow.com/comment/39556469
tagged with: javascript
tagged with: date
answer count: 2
has comment: http://stackoverflow.com/comment/39556424
downvote count: 0
has title: Can I make node.js Date always be in UTC/GMT?
score: 30
favorite count: 0
has answer: http://stackoverflow.com/a/35888788

http://stackoverflow.com/a/25316536
has body: It's not about JavaScript instead, Laravel uses POST method to submit a form by default and MethodNotAllowedHttpException occurs when you declared a route in your application (basically in routes.php file) using one method (GET, POST, DELETE etc) but using a different method to submit the form. Make sure your route for the form submission and the method used in form are same. If you don't explicitly mention a method in the form then it will be POST by default and you may use a differnt method using something like this: {{ Form::open( array( 'action' =&gt; 'Controller@method', 'method' =&gt; 'GET') ) }} Or something like this: {{ Form::open( array( 'route' =&gt; 'routename', 'method' =&gt; 'GET') ) }} Or something like this: {{ Form::open( array( 'url' =&gt; 'your/url', 'method' =&gt; 'GET') ) }} To be more clear, If you have declared a route using something like this: Route::get(...); Then use GET method in the form or if something else then use that method but if you used post() then you don't need to use any method in your form. Check more on Laravel website. Also your loop is incorrect, your inputs has same name so last one will override the previous ones and you'll get only one input per name, use the array notation in name.
answers question: http://stackoverflow.com/q/25316399
type: Answer
accepted answer of: http://stackoverflow.com/q/25316399
type: AcceptedAnswer
score: 0

http://stackoverflow.com/a/25381253
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25381100
has body: You shouldn't be concerned with value on option element as it's irrelevant with Angularjs model. DOM created with ng-options will have always values from 0..n, check your $scope.aircraft model for actually selected value you can also use it as aircraft.id as aircraft.ident for aircraft in aircrafts then the model $scope.aircraft will be updated with only id

http://stackoverflow.com/comment/39362676
type: Comment
type: QuestionComment
score: 1
has text: summarize your problem...
comment on: http://stackoverflow.com/q/25262944

http://stackoverflow.com/a/25369631
has body: Did you google it? You can check below links https://sharepoint.stackexchange.com/questions/88483/how-do-we-create-sub-site-using-javascript-object-module https://sharepoint.stackexchange.com/questions/98769/create-site-collection-from-rest-api http://sympmarc.com/2014/03/30/create-a-subsite-in-sharepoint-2013-using-rest-calls/ http://sharepointryan.com/2013/09/10/create-a-sharepoint-site-spweb-using-rest-in-spd-2013-workflow/
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25368189
has comment: http://stackoverflow.com/comment/39576192
accepted answer of: http://stackoverflow.com/q/25368189

http://stackoverflow.com/comment/39303627
has text: Yes but this is a general explanation of how to fix your issue :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25231484
type: Comment

http://stackoverflow.com/comment/39302786
has text: Thanks!!! vch save my date today. Jeremy, I'm going to following your advice for next time.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25230984

http://stackoverflow.com/q/25242709
type: Question
has comment: http://stackoverflow.com/comment/39327361
has comment: http://stackoverflow.com/comment/39326862
has answer: http://stackoverflow.com/a/25249559
tagged with: dojox.grid
answer count: 1
tagged with: dojo
has comment: http://stackoverflow.com/comment/39328591
score: 0
has comment: http://stackoverflow.com/comment/39333348
accepted answer: http://stackoverflow.com/a/25249559
tagged with: javascript
has body: i have a question regarding the dojotoolkit. I have a DataGrid and want to get a value inside of it. The tricky part is, that the value is a TextBox. My structure for the DataGrid looks like this: grid = new dojox.grid.DataGrid({ store: store, structure: [ { name: "Quantity", field: "Quantity", width: "30px", formatter: function(item) { var tb = new dijit.form.TextBox( { name: "quantity", value: "1", placeHolder: "quantity", }); return tb; } }, { name: "Value", field: "Value", width: "auto"} ] }, "bGrid"); I have furthermore a button which can be clicked. If the button was clicked, this function is executed: myClass.prototype.Test = function Test(tItem) { var item = tItem; var val = grid.getItem(item.value); //Value in this case is an integer refering to the position of my item in the grid var quantity; var name; if(val!==null){ var store = grid.store; quantity = store.getValue(val, 'Quantity'); name = store.getValue(val, 'Value'); } console.log("Quantity "+quantity+ " Name: "+name); } the name variable is set correctly but i don't get anything from quantity. I would guess that i would get the TextBox but i receive nothing. Does anybody know how to access the field of the store ?
has comment: http://stackoverflow.com/comment/39325084
has comment: http://stackoverflow.com/comment/39325607
tagged with: dojox.grid.datagrid
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39326579
has title: Dojotoolkit store.GetValue when TextBox inside

http://stackoverflow.com/comment/39408452
comment on: http://stackoverflow.com/q/25287631
has text: Have you tried adding a `padding: 50px` to the `body` element?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25342760
tagged with: coffeescript
possible better answer: http://stackoverflow.com/a/25346359
has body: In CoffeeScript, I like to use destructuring assignments when returning functions with multiple return values. It makes it clearer what is being returned, versus returning an array. For instance, returning an array from a function in JavaScript: function getSumAndDiff(firstNumber, secondNumber) { var sum = firstNumber + secondNumber var difference = firstNumber - secondNumber return [sum, difference] } var values = getSumAndDiff(10, 5) var sum = values[0] var difference = values[1] While in CoffeeScript, returning an object from a function: getSumAndDiff = (firstNumber, secondNumber) -&gt; sum = firstNumber + secondNumber difference = firstNumber - secondNumber {sum, difference} {sum, difference} = getSumAndDiff(10, 5) However, the problem is that the CoffeeScript method replaces any existing variables called sum and difference. So if I ran this function multiple times in succession, then they would keep overwriting the previous one. There are several ways of resolving this, of course, such as simply by assigning the returned variables to other names each time, like so: {sum, difference} = getSumAndDiff(10, 5) sum1 = sum difference1 = difference {sum, difference} = getSumAndDiff(11, 6) sum2 = sum difference2 = difference But is there a cleaner way of doing it? Or, is perhaps the best solution to simply return an array when I need to run a function like this multiple times in a row? Or would closures make sense, or is that too much excessive code? I'm just wondering if there's something I'm perhaps missing, because I figure there's got to be a cleaner way of doing this, especially with CoffeeScript? Or maybe my general approach to this is flawed, such as I should instead only have one return value per function instead, to simplify things?
has comment: http://stackoverflow.com/comment/39517017
answer count: 2
tagged with: function
downvote count: 0
tagged with: javascript
tagged with: variables
favorite count: 0
has title: Destructuring a function's return statement, but don't replace existing variables
tagged with: destructor
has answer: http://stackoverflow.com/a/25347953
has comment: http://stackoverflow.com/comment/39511728
upvote count: 1
accepted answer: http://stackoverflow.com/a/25347953
has answer: http://stackoverflow.com/a/25346359
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39511699
score: 1

http://stackoverflow.com/comment/39326738
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25243371
has text: Thank you Danny, it was the ().
score: 0

http://stackoverflow.com/comment/39586347
type: QuestionComment
comment on: http://stackoverflow.com/q/25383720
type: Comment
has text: Do not change the id, use addClass or removeClass, and use ".contentHide" in your CSS instead of "#contentHide"
score: 0

http://stackoverflow.com/a/25354179
has body: Given your two lists: Sortable Apples Grapefruits Bananas Dragable D1 D2 D3 and assuming that you want to copy it from the second (#draggable) into the first (#sortable), what you should do define connectWith in the second (origin of the copy): $("#sortable").kendoSortable({ placeholder: function placeholder(element) { return $(" Drop Here 1! "); } }); $("#dragable").kendoSortable({ connectWith: "#sortable", placeholder: function placeholder(element) { return $(" Drop Here 2! "); } }); Also important to note that placeholder probably be defined in both. The first is used when you move from this list while the second is used when the origin is in the second list (no matter if the drop is the first or the second). You can see it here: http://dojo.telerik.com/@OnaBai/oJIy
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39542393
has comment: http://stackoverflow.com/comment/54827558
answers question: http://stackoverflow.com/q/25332106
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25332106
type: Answer

html5-audio
tags question: http://stackoverflow.com/q/25312017
type: Tag
tags question: http://stackoverflow.com/q/25346315
tag name: html5-audio

http://stackoverflow.com/q/25275418
type: Question
upvote count: 2
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39446234
tagged with: http://stackoverflow.com/tag/html
has title: How to Manipulate history.length and set it to more than 50?
has body: The history.length property returns the URL in the history, however we could only set it to a maximum of 50. Reference - http://www.w3schools.com/jsref/prop_his_length.asp Is there a feature that could allow us to exceed this amount?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39426467
has comment: http://stackoverflow.com/comment/39397910
score: 2
has comment: http://stackoverflow.com/comment/39426555
answer count: 0
downvote count: 0
tagged with: dom

http://stackoverflow.com/comment/39342495
comment on: http://stackoverflow.com/q/25251608
score: 0
has text: chooseFile.onchange=function(){selectFile.innerHTML=this.files[0].name};
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25275449
has comment: http://stackoverflow.com/comment/39386586
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25274022
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39386568
has body: Here is how you can call select on just the new content added: $.get('detalle_miembro/' + this.id).done(function(result) { $('#detalle_miembro').html(result).find(".elegible").select2(); });
answers question: http://stackoverflow.com/q/25274022

http://stackoverflow.com/a/25276472
type: Answer
has body: Problem Your main() function is only getting called once after the DOM is loaded so chances are that your navLocation value is 0. Your function won't be executed again after that so you never add the 'navbar-fixed-top' class to the .nav menu. Solution To remedy the situation try replacing your main function like so: var main = function(){ $( window ).scroll(function() { if ($('.nav').offset().top &lt; 0){ $('.nav').addClass('navbar-fixed-top'); }else{ $('.nav').removeClass('navbar-fixed-top'); } }); } Explanation I have attached a scroll handler to the window so when the user scrolls this event gets fired allowing you to calculate if you need to add or remove the class from the header. Alternatives The Javascript I have provided should fix the issue you where having but I recommend you look into sticky headers using plain CSS as you don't want to rely on Javascript being on when loading any UI elements. Even a solution like position:fixed; would be better then fiddling with Javascript.
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25276222
answers question: http://stackoverflow.com/q/25276222

http://stackoverflow.com/comment/39660676
type: Comment
has text: When you go to the javascript url "http://rq.vserv.mobi/delivery/js.php?zoneid=d03e63d&amp;vr=S-JS-1.0.0 in a browser, what html do you receive back? please paste the result as part of your question and I will try and help
score: 0
comment on: http://stackoverflow.com/q/25302238
type: QuestionComment

http://stackoverflow.com/comment/39491609
type: QuestionComment
comment on: http://stackoverflow.com/q/25331805
has text: Can you give us an example of the JSON itself?
score: 0
type: Comment

http://stackoverflow.com/q/25279921
answer count: 1
tagged with: css
has answer: http://stackoverflow.com/a/25280132
type: AnsweredQuestion
has title: CSS - load a content inside a div with either 100% relative or scrollable minimum size depending on div size
has body: I have searched a lot and couldn't find an exact solution for my problem. basically i have a page, which can be loaded in any div. All the height and width inside the body is set relatively. When i load the page into a smaller div, i want it to have the 100% size of the current body (the body of the page i am loading into), and it should be loaded fully into the div without any cropping/autoadjusting, and it must be scrollable. The only solution i came up with is hardcoding one single dimension inside the main page, but i do not want that, coz it should all be dependent upon the resolution of the screen and current zoom factor. P.S i do not know what sample code i should give, nor what further details are required. please feel free to ask me for anything. P.P.S i want to see if its possible to do without using js/jquery Thanks.
type: Question
accepted answer: http://stackoverflow.com/a/25280132
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/64804555
type: AnswerComment
score: 0
type: Comment
has text: Also I would check for undefined while passing the object as Angular will throw a exception `app.run(function($rootScope){ $rootScope.Utils = { keys : function (o) { return Object.keys(o || {}); } }; })` , btw this is every useful.
comment on: http://stackoverflow.com/a/25299523

http://stackoverflow.com/q/25259853
tagged with: asp.net-mvc
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25260669
tagged with: caching
score: 0
has body: I have an Asp.Net MVC 5 website. In this website, I've got a page which is pretty complex and lots of queries are made to build it. The problem is, I want to add some controls on this page (or hide some elements) for admin users. My first thought was add a JavaScript file which creates admin-only content and add it via a &lt;script&gt; tag in a donut cache method. However, although the donut cache method is called every time, it adds the content if the first user visiting that page is an admin (hence, all the users seeing afterwards will see the controls and for the admin users, the JavaScript will render twice! I could make a donut cache method for each element but it breaks the point of even creating a cache. What's the point of caching a page if you're going to create all the elements each time someone visits that page?
answer count: 1
tagged with: asp.net
has title: Admin-only content for a cached page
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25260669
type: Question
tagged with: c#

http://stackoverflow.com/comment/39377044
comment on: http://stackoverflow.com/q/25270545
score: 0
type: QuestionComment
type: Comment
has text: Possible duplicate of http://stackoverflow.com/questions/1150381/what-is-the-meaning-of-sign-in-javascript

http://stackoverflow.com/q/25386908
type: Question
downvote count: 0
possible better answer: http://stackoverflow.com/a/25387368
accepted answer: http://stackoverflow.com/a/25386993
tagged with: javascript
tagged with: jquery
has body: I have a simple textarea and It has a default value. I want to hold this value everytime. User should not remove this value but he can add extra string. This is contstant As you see above. It has a default value. How can I protect this value? But user can add something after default value like below. This is contstant and extra things by user So how can do a partially editable textarea with default value?
has comment: http://stackoverflow.com/comment/39592774
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has title: Not editable,removable part of a textarea
score: 1
favorite count: 0
type: AnsweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/25387368
linked to: http://stackoverflow.com/q/5444874
has answer: http://stackoverflow.com/a/25386993

http://stackoverflow.com/comment/39341391
comment on: http://stackoverflow.com/a/25249048
type: Comment
has text: You're right, i found several issues with the previous implementation, and i have updated the algorithm in my answer to reflect your comments. It will now work for values of the 'columnCount' of 5 and others, though when using the value 5 and a skipColumn of 1, the resulting distribution is 's,m,l,s' instead of 's,s,m,l' or 's,m,l,l' because i had a hard time thinking of an efficient way to implement that distribution due to lack of details. But you should not have issues improving my suggestion to achieve it.
score: 1
type: AnswerComment

http://stackoverflow.com/comment/39301964
type: AnswerComment
has text: Wow, how did I miss that? Thanks!
comment on: http://stackoverflow.com/a/25230652
type: Comment
score: 1

http://stackoverflow.com/comment/39432290
comment on: http://stackoverflow.com/q/25300352
score: 2
has text: Learn JavaScript First.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25303970
has comment: http://stackoverflow.com/comment/39440215
score: 0
accepted answer of: http://stackoverflow.com/q/25303937
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25303937
has comment: http://stackoverflow.com/comment/39440486
type: Answer
has body: Just assign the value: document.getElementById("_1_1_35_1_Name") .value = document.getElementById("_1_1_120_1") .value = 'your value'; And check case for ID should be Id.

http://stackoverflow.com/comment/39522862
comment on: http://stackoverflow.com/a/25349571
type: AnswerComment
has text: I added the iteration over the steps but I'm a little unsure how to use it. Feeling really dumb as I'm really new to this. Any pointers would be helpful.
type: Comment
score: 0

http://stackoverflow.com/q/25320907
has comment: http://stackoverflow.com/comment/39470507
tagged with: digital-ocean
score: 0
has title: angular.min.js not linking to view in mean stack
answer count: 1
tagged with: javascript
has body: I have the angular.min.js library installed on ubuntu 14.04 under /opt/mean/public/lib/angular/angular.min.js, and in a view made in accordance with a tutorial from lynda I have the following view: Angular Demo Welcome {{name}} The contents of the h2 tag should be dynamically updating as text is entered but it is not. Furthermore on the console I get a 404 error for the angular.min.js file. The MEAN stack is the premade one found on digitalocean, if that matters.
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25320931
type: UnansweredQuestion
upvote count: 1
downvote count: 1
type: Question
tagged with: mean-stack
tagged with: ubuntu-14.04

http://stackoverflow.com/comment/39528336
score: 0
comment on: http://stackoverflow.com/a/25352317
type: Comment
has text: "_sort of private variables and encapsulation_", because there is no private variable and encapsulation like other languages can provide.
type: AnswerComment

http://stackoverflow.com/comment/39569347
type: Comment
has text: I'm beat... I apologize for this but It's still not working for me `return a.offset().left < b.offset().top + b.width() && a.offset().top + a.width() > b.offset().left && a.position() < b.position() + b.height() && a.position() + a.height() > b.position();`
score: 0
comment on: http://stackoverflow.com/q/25374189
type: QuestionComment

http://stackoverflow.com/q/25297587
answer count: 1
tagged with: nested
has body: I know that my question is really strange or doesn't make sense or will have points down but I investigated about this and didn't found an example about my demo. I created a nested form so when I add a new row give me a long name like this .... So I will have infinite rows but I'm trying to do a multiplication in each row with the amount selected and finally get the total sum Seleccione Impresora RG Celular Galaxy J. Astete Trapo Notice that name= "shopping_document[shopping_products_attributes][X][qty]" so It should be able to work more than 4 rows in the demo , the symbol X means that if I add a 5 row the live multiplication will work Here is the example: Here is the demo Please somebody can help me to create this? I will really appreciate all kind of help. Don't be bad with me ,I'm just try to learn but didn't found an example with this case A friend from stackoverflow gave me this demo but I'm using prototype 1.6.0.3 and jquery min 1.4.0 here in the demo works perfect but In production is making conflicts and showing errors and the rest of actions are not working correctly. Here is the screenshoot
tagged with: jquery
tagged with: nested-forms
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25298316
score: 0
tagged with: live
type: Question
accepted answer: http://stackoverflow.com/a/25298316
has title: How can create a live multiplication using nested attributes and combobox option selected?
tagged with: javascript

http://stackoverflow.com/q/25336485
has answer: http://stackoverflow.com/a/25361327
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39500373
has body: I'm using the HighCharts graphing software and am trying to show the date labels on the x axis below the stock graph; it currently shows below the volume graph only. How can I do this? Here are the chart options I am using (removed irrelevant ones to save space) JSFiddle link below $('#container').highcharts('StockChart', { rangeSelector: { inputEnabled: $('#container').width() &gt; 480, selected: 1 }, series: [{ type: 'candlestick', name: 'AAPL', data: ohlc, dataGrouping: { units: groupingUnits } }, { type: 'column', name: 'Volume', data: volume, yAxis: 1, dataGrouping: { units: groupingUnits } }] JSFille Link
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25361327
tagged with: highcharts
tagged with: javascript
has title: HighCharts - HighStock - Show Date for Candlestick & Volume
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25339797
has comment: http://stackoverflow.com/comment/39500635
score: 0
has answer: http://stackoverflow.com/a/25339797
has comment: http://stackoverflow.com/comment/39500728

http://stackoverflow.com/q/25368314
has body: What is the difference between these various uses of the "&amp;&amp;" logical operator? From Oliver Steele's Functional.js library. Line 4, "args.length &amp;&amp; arg": 0 Function.prototype.partial = function(){ 1 var fn = this, args = Array.prototype.slice.call(arguments); 2 return function(){ 3 var arg = 0; 4 for ( var i = 0; i &lt; args.length &amp;&amp; arg &lt; arguments.length; i++ ) 5 if ( args[i] === undefined ) 6 args[i] = arguments[arg++]; 7 return fn.apply(this, args); 8 }; 9 }; From bootstrap.js. Line 11 below, "'hover' &amp;&amp; this.$element": 1 var Carousel = function (element, options) { 2 this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this)) 3 this.$indicators = this.$element.find('.carousel-indicators') 4 this.options = options 5 this.paused = 6 this.sliding = 7 this.interval = 8 this.$active = 9 this.$items = null 10 11 this.options.pause == 'hover' &amp;&amp; this.$element 12 .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) 13 .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) 14 } Also why not just use the + arithmetic operator in the first example? Here is yet another example that I'm having trouble grokking, from the same Carousel section of bootstrap.js: this.options.interval &amp;&amp; !this.paused &amp;&amp; (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
has answer: http://stackoverflow.com/a/25368434
accepted answer: http://stackoverflow.com/a/25368434
has title: What's the difference between these two uses of the && logical operator?
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39557552
tagged with: javascript
score: 0
tagged with: logical-operators
answer count: 1

http://stackoverflow.com/a/25270547
has comment: http://stackoverflow.com/comment/39380896
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25270162
accepted answer of: http://stackoverflow.com/q/25270162
downvote count: 0
has body: Like is said above, you're thinking about Angular from a jQuery mindset. Here's a quick fork of yours showing how you could be using ng-repeat to do this in a more Angular way: http://plnkr.co/edit/jXySErcKW6XuYGr4P6cA The repeater: {{$index + 1}} User {{$index + 1}} link {{$index + 1}} The JS: // make a single entry. $scope.entries = [{}]; // add an entry. $scope.swap = function() { $scope.entries.push({}); } // ngClick method. $scope.msg = function() { console.log('MSG'); } However, if you need to deal with DOM in exactly that way for the sake of this plugin, it looks like you were on the right track with $compile. http://plnkr.co/edit/sxa5pVQU834SBLFLOj1K You need to compile the DOM string with a new scope, and then append that. var newThing = $compile(t)($scope.$new()); $('#data tbody').append(newThing);
has comment: http://stackoverflow.com/comment/39381765
score: 1
type: AcceptedAnswer

http://stackoverflow.com/a/25334080
has body: Concatenate 'px' to the height. elem.css({ 'height': height + 'px' });
type: Answer
accepted answer of: http://stackoverflow.com/q/25333952
answers question: http://stackoverflow.com/q/25333952
upvote count: 1
type: AcceptedAnswer
downvote count: 0
score: 1

http://stackoverflow.com/a/25254264
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39380569
has body: As I've said in my comments, it is difficult to prevent all ways that an input field can be manipulated (drag/drop, paste, cut, delete) and thus you will ultimately need to validate the field before using it. That said if you want to prevent a number being typed into the first character in the field, you can use this: document.getElementById("test").addEventListener("keypress", function(e) { var key = e.which || e.keyCode; if (this.selectionStart === 0) { if (key &gt; 48 &amp;&amp; key &lt; 57) { e.preventDefault(); } } }); Working demo: http://jsfiddle.net/jfriend00/mnm4bta1/
accepted answer of: http://stackoverflow.com/q/25253892
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25253892
has comment: http://stackoverflow.com/comment/39380410
has comment: http://stackoverflow.com/comment/39378355
type: Answer

http://stackoverflow.com/a/25398082
accepted answer of: http://stackoverflow.com/q/25386798
has body: I found the solution... Need to use the function: restoreZoom()
type: AcceptedAnswer
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25386798
downvote count: 0

http://stackoverflow.com/a/25303562
score: 3
accepted answer of: http://stackoverflow.com/q/25303489
answers question: http://stackoverflow.com/q/25303489
downvote count: 0
upvote count: 3
type: AcceptedAnswer
type: Answer
has body: replace returns a new string with the replacement, it doesn't change the string you call it on. newbuffer = newbuffer.replace( matches[i], p.shortcodes[x].vala ); Does .replace take "plain text" or will I need to do some regex? You can call replace either with a string as the "search" argument, or with a regex. If you give it a string, it will replace the first occurrence of that string. If you give it a regex, it will replace the first match, or all matches, depending on whether you include the g ("global") flag on the regex.

http://stackoverflow.com/a/25271395
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25271351
has comment: http://stackoverflow.com/comment/39379359
answers question: http://stackoverflow.com/q/25271351
has comment: http://stackoverflow.com/comment/39381402
has comment: http://stackoverflow.com/comment/39378984
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39379261
has body: It is because bootstrap creates a child scope (@var modalScope = (modalOptions.scope || $rootScope).$new();) of provided scope with scope argument. So in angular child scopes prototypical inherit from the parent. And primitive types (when there is no . in the binding) will not be consulted for in the prototype chain and will add a new property val and update it which will not be reflected in the underlying scope, only updates to reference types will (object, function reference etc..) have the changes reflected and hence obj.val works since the parent scope also has reference to the same obj. So when you do:- $scope.val = ""; new child scope created out of the provided scope will update val at the child since it is not updated as a value on a reference type, you wont see it updated at its parent . Here is a good read
has comment: http://stackoverflow.com/comment/39381311
score: 3
type: Answer
has comment: http://stackoverflow.com/comment/39378763
has comment: http://stackoverflow.com/comment/39381572

http://stackoverflow.com/comment/39353849
has text: Ids are coming from mssql.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25256609

http://stackoverflow.com/q/25364685
score: 0
has answer: http://stackoverflow.com/a/25364712
answer count: 1
has body: I have a dynamically loaded button created when the document loads. After this, I attach a click handler to this button. When I try to remove the handler with .off(), it does not work. This snippet creates the click handler and removes it. However, when I click the button, the function StartMash still executes. $(document).on("click", "#mash-idle-start", StartMash); $("#mash-idle-start").off(); Obviously this is not the functionality I am trying to achieve, but the problem persists through this simple example
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25364712
has title: jQuery .off() not removing handlers
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39551289

state
tag name: state
type: Tag
tags question: http://stackoverflow.com/q/25244296

http://stackoverflow.com/a/77373435
type: Answer
has body: Nowadays you can also use Includes. if(watchesArray[0].sports.includes('Running')) { // Exists } else{ // Doesn't exist } This is not always supported though so check that you browser supports it.
answers question: http://stackoverflow.com/q/25349038
score: 0

http://stackoverflow.com/q/25287781
possible better answer: http://stackoverflow.com/a/25288488
has comment: http://stackoverflow.com/comment/39409526
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25324984
has comment: http://stackoverflow.com/comment/39408600
score: 1
has title: Remove row from JQuery DataTable - but it returns as soon as the table is redrawn. Is my .JSP data source the cause?
has comment: http://stackoverflow.com/comment/39409052
accepted answer: http://stackoverflow.com/a/25324984
has body: I have a button in each row, when pressed that row is removed from one table, and added to another table: var row = $(this).closest("tr").remove().clone() $('.my-other-table-class').append(row); and at first it appears to work perfectly, the row is removed from one table and added to another, but when I force a re-draw (by changing the sorting of one of the columns, for example) all the rows are back as they were, and the buttons no longer work. This is the case for both the removed rows, and the rows added to the other table. Is this because I'm using a .jsp table as a data-source? Would this work correctly if I dynamically added all the rows to the table using JavaScript at load-time, or if I used a modelMap collection as a data-source? Thanks a lot for any advice.
type: Question
has comment: http://stackoverflow.com/comment/39409317
has comment: http://stackoverflow.com/comment/39409708
answer count: 2
tagged with: jsp
tagged with: javascript
has comment: http://stackoverflow.com/comment/39409542
tagged with: jquery
has answer: http://stackoverflow.com/a/25288488
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39409967

http://stackoverflow.com/comment/39442887
type: QuestionComment
score: 0
has text: i done the changes you have mentioned and trying to run now
comment on: http://stackoverflow.com/q/25305713
type: Comment

http://stackoverflow.com/comment/39452557
comment on: http://stackoverflow.com/q/25311204
has text: It does work. I'm using WordPress and a contact form plugin so it's rendering the code differently than I am writing it in the back end.
score: 0
type: Comment
type: QuestionComment

twitter-bootstrap
tags question: http://stackoverflow.com/q/25357466
tags question: http://stackoverflow.com/q/25326911
tags question: http://stackoverflow.com/q/25249649
tags question: http://stackoverflow.com/q/25240051
tags question: http://stackoverflow.com/q/25300688
tags question: http://stackoverflow.com/q/25369552
tags question: http://stackoverflow.com/q/25334343
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/25277585
tags question: http://stackoverflow.com/q/25309093
tags question: http://stackoverflow.com/q/25265425
tags question: http://stackoverflow.com/q/25343872
tags question: http://stackoverflow.com/q/25349916
tags question: http://stackoverflow.com/q/25333771
tags question: http://stackoverflow.com/q/25364679
tags question: http://stackoverflow.com/q/25241681
tags question: http://stackoverflow.com/q/25274640
tags question: http://stackoverflow.com/q/25338940
tags question: http://stackoverflow.com/q/25365312
tags question: http://stackoverflow.com/q/25246391
tags question: http://stackoverflow.com/q/25320266
tags question: http://stackoverflow.com/q/25295582
tags question: http://stackoverflow.com/q/25304545
tags question: http://stackoverflow.com/q/25258352
tags question: http://stackoverflow.com/q/25367356
tags question: http://stackoverflow.com/q/25377383
tags question: http://stackoverflow.com/q/25319301
tags question: http://stackoverflow.com/q/25266993
tags question: http://stackoverflow.com/q/25255891
tags question: http://stackoverflow.com/q/25291388
tags question: http://stackoverflow.com/q/25305895
tags question: http://stackoverflow.com/q/25318693
tags question: http://stackoverflow.com/q/25310055
tags question: http://stackoverflow.com/q/25260278
tags question: http://stackoverflow.com/q/25285864
tags question: http://stackoverflow.com/q/25314990
tags question: http://stackoverflow.com/q/25292267
tags question: http://stackoverflow.com/q/25297242
tags question: http://stackoverflow.com/q/25310454
tags question: http://stackoverflow.com/q/25305664
tags question: http://stackoverflow.com/q/25254225
tags question: http://stackoverflow.com/q/25302196
tags question: http://stackoverflow.com/q/25366428
tags question: http://stackoverflow.com/q/25327954
tags question: http://stackoverflow.com/q/25306932
type: Tag
tags question: http://stackoverflow.com/q/25232601
tags question: http://stackoverflow.com/q/25319388
tags question: http://stackoverflow.com/q/25322208
tags question: http://stackoverflow.com/q/25235558
tags question: http://stackoverflow.com/q/25368802
tags question: http://stackoverflow.com/q/25342683
tags question: http://stackoverflow.com/q/25369070
tags question: http://stackoverflow.com/q/25278009
tags question: http://stackoverflow.com/q/25296961
tags question: http://stackoverflow.com/q/25271351
tags question: http://stackoverflow.com/q/25366070
tags question: http://stackoverflow.com/q/25361016
tags question: http://stackoverflow.com/q/25302104
tags question: http://stackoverflow.com/q/25290322
tags question: http://stackoverflow.com/q/25257702
tags question: http://stackoverflow.com/q/25352010
tags question: http://stackoverflow.com/q/25284341
tags question: http://stackoverflow.com/q/25255092
tags question: http://stackoverflow.com/q/25317543
tags question: http://stackoverflow.com/q/25262678
tags question: http://stackoverflow.com/q/25345182
tags question: http://stackoverflow.com/q/25296676
tags question: http://stackoverflow.com/q/25286579
tags question: http://stackoverflow.com/q/25350983
tags question: http://stackoverflow.com/q/25326097
tags question: http://stackoverflow.com/q/25356576
tags question: http://stackoverflow.com/q/25370021
tags question: http://stackoverflow.com/q/25310470
tags question: http://stackoverflow.com/q/25276222
tags question: http://stackoverflow.com/q/25343698
tags question: http://stackoverflow.com/q/25372601
tags question: http://stackoverflow.com/q/25305713
tags question: http://stackoverflow.com/q/25271227
tags question: http://stackoverflow.com/q/25368234

http://stackoverflow.com/a/25259097
type: Answer
answers question: http://stackoverflow.com/q/25259008
has body: You need to add a repeating event to call your updateOrders function. Like: function startUpdateOrdersTimes() { setInterval(function() { updateOrders(); }, 2000); //Call now (otherwise waits for first call) updateOrders(); }
score: 0

http://stackoverflow.com/a/25242139
has body: UPDATED: Try this, for detecting Safari browser in an iPhone: var isSafari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/); It identifies Safari 3.0+ and distinguishes it from Chrome. JsFiddle
has comment: http://stackoverflow.com/comment/39324556
upvote count: 8
has comment: http://stackoverflow.com/comment/39323893
has comment: http://stackoverflow.com/comment/58015480
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/39323946
has comment: http://stackoverflow.com/comment/138130426
type: Answer
has comment: http://stackoverflow.com/comment/39323982
has comment: http://stackoverflow.com/comment/39323996
accepted answer of: http://stackoverflow.com/q/25241932
score: 7
answers question: http://stackoverflow.com/q/25241932

http://stackoverflow.com/q/25235442
tagged with: polymer
tagged with: javascript
has comment: http://stackoverflow.com/comment/39311848
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39311857
type: UnansweredQuestion
has body: I have a one-page site. It is basically a list of sections. One of the section has a button which overlays a dialog when clicked. This dialog ends up expanding the width of the page and a sideways scroll bar is introduced. This really spoils the look and I'm looking to make the dialog not expand the page. For reference, it is the same kind of layout as here: http://www.polymer-project.org/components/core-animated-pages/demos/music.html I tried setting max-width: 100% and overflow-x: hidden on the problematic section but to no avail. Here's the problematic section's markup: About Us The following is our mission statement on campus. And the CSS: .music-row { width: 100%; height: 330px; } .music-container { background: rgb(236, 183, 9); padding-top: 1%; max-width: 100%; }
has title: A div is expanding the width of the page
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25235591
has comment: http://stackoverflow.com/comment/39311825
has comment: http://stackoverflow.com/comment/39311838
has answer: http://stackoverflow.com/a/25235667
type: Question

http://stackoverflow.com/comment/39565343
has text: Hm. So how would I go about avoiding/making this functional?(Sorry, I'm still learning a lot of this stuff)
score: 0
comment on: http://stackoverflow.com/q/25372251
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46679753
type: QuestionComment
has text: Sadly no not yet. I think I just stopped trying to do it.
comment on: http://stackoverflow.com/q/25354288
score: 0
type: Comment

http://stackoverflow.com/a/25293865
has comment: http://stackoverflow.com/comment/39420511
answers question: http://stackoverflow.com/q/25293612
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39420374
has comment: http://stackoverflow.com/comment/39420606
accepted answer of: http://stackoverflow.com/q/25293612
has comment: http://stackoverflow.com/comment/39421275
has comment: http://stackoverflow.com/comment/39420453
type: Answer
has comment: http://stackoverflow.com/comment/39420592
has comment: http://stackoverflow.com/comment/39420389
score: 1
upvote count: 1
has body: In your &lt;script&gt; tag: function data() { 'use strict'; // Get today's date var today = new Date(); // Create an array of month names for the month fields var monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; // Increase date by 1 day today = new Date(today.valueOf() + 86400000); // Set the values document.getElementById('day').value = today.getUTCDate(); document.getElementById('month').value = monthNames[today.getUTCMonth()]; document.getElementById('year').value = today.getUTCFullYear(); } // Automatically do this on load window.addEventListener('load', data, false); And remove the onload attribute from the body tag. See jsFiddle.
has comment: http://stackoverflow.com/comment/39421413

http://stackoverflow.com/q/25309639
answer count: 0
type: UnansweredQuestion
type: Question
score: 0
has comment: http://stackoverflow.com/comment/39453739
tagged with: javascript
tagged with: drag-and-drop
tagged with: kineticjs
has comment: http://stackoverflow.com/comment/39711749
has comment: http://stackoverflow.com/comment/39702381
has body: I have made canvas Shapes(squares) in kinetic js having 4 control points on each of their vertices.A user can click and drag these control points and distort the shape any way he/she pleases.The fiddle link is http://jsfiddle.net/Lucy1/opsy1pn9/2/ The corresponding js code is var room = new Kinetic.Shape({ x: 0, y: 0, width: w, height: h, stroke: "blue", fill: 'red', drawFunc: function (context) { var x = this.x(); var y = this.y(); var w = this.width(); var h = this.height(); var tlX = this.anchorTL.x(); var tlY = this.anchorTL.y(); context.beginPath(); context.moveTo(tlX, tlY); // top context.bezierCurveTo(x + w / 3, y, x + w * 2 / 3, y, this.anchorTR.x(), this.anchorTR.y()); // right context.bezierCurveTo(x + w, y + h / 3, x + w, y + h * 2 / 3, this.anchorBR.x(), this.anchorBR.y()); // bottom context.bezierCurveTo(x + w * 2 / 3, y + h, x + w / 3, y + h, this.anchorBL.x(), this.anchorBL.y()); // left context.bezierCurveTo(x, y + h * 2 / 3, x, y + h / 3, tlX, tlY); context.closePath(); context.fillStrokeShape(this); } }); The problem is that i want to add more control points on each square edge. I want the canvas shape to look like this The square above has 2 control points on each side in addition to 4 control points in the vertices, so each square has total 12 points .I want the squares in the js fiddle also to have 12 control points each.I can't understand where and what modifications to make so that each of the canvas squares has 12 control points..Please Help..
has title: Add Multiple Control Points in Canvas Shape

http://stackoverflow.com/a/25234389
has comment: http://stackoverflow.com/comment/39309828
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/39309880
has comment: http://stackoverflow.com/comment/39332162
downvote count: 0
answers question: http://stackoverflow.com/q/25234283
score: 4
has body: I made 2 small changes to your code, which can be found in this fiddle to be working: var scrollToElement = function($el, ms){ var speed = (ms) ? ms : 600; $('body').animate({ // only scroll the body element, the html element doesn't need to be scrolled at the same time scrollTop: $el.offset().top // you're already passing a jquery object, no need to re-wrap it }, speed); }

http://stackoverflow.com/q/25248394
downvote count: 0
has answer: http://stackoverflow.com/a/25248427
type: Question
has body: I have this route in my app.js file that starts the server app.get('/view/:item_id', function(req,res){ var A = 5; res.render('view_item'); and I have this in my view_item.html: &lt;p&gt;{{A}}&lt;/p&gt; I want it to display the variable value - 5. If I were using a template engine such as jade it would be easy. I could change that third line of my server code to res.render({A:A},'view_item'); But I am using html as my template engine. My research so far has told me that using a template engine with angular is usually a bad idea, and there is always a way to do it using angular's built in template system. So how do I do this? Do I somehow pass it to the $scope and include like &lt;script&gt; $scope.A = {{A}}; &lt;/script&gt; I haven't seen this done anywhere so I don't think its the way to go.
has answer: http://stackoverflow.com/a/25248504
tagged with: javascript
score: 12
answer count: 2
has title: How do I pass node.js server variables into my angular/html view?
tagged with: template-engine
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25248427
tagged with: node.js
upvote count: 12
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25248504

http://stackoverflow.com/q/25383609
has comment: http://stackoverflow.com/comment/39653087
answer count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39597214
type: Question
has comment: http://stackoverflow.com/comment/39587669
tagged with: javascript
has comment: http://stackoverflow.com/comment/39586134
score: 0
has title: JSON log and PUT to cloud
has body: I have a javascript function which generates JSON data at every 2 second and then PUT it to a cloud. Now I don't want to POST in realtime. rather I want to log this data in a buffer and say after n number of data log I will PUT to cloud. Now JSON data is passed through var fromDatan. JSON data format is {"values": [ { "at": "2014-08-17T12:00:00Z", "value": "15" }]} This is a single instance which is passing through say var fromDatan and being PUT in cloud. Now I want to log say n number of JSON data. ie. { "values": [ { "at": "2014-08-17T12:00:00Z", "value": "15" }, { "at": "2014-08-18T12:00:00Z", "value": "20" }, { "at": "2014-08-19T12:00:00Z", "value": "25" } ] } And then I will PUT to cloud. This is my PUT code: $.ajax({ url: "https://abcd.com", headers: { "X-API-KEY": "23dq3dq3ddbb16a7956e6f7a", "Content-Type": "application/json" }, type: "PUT", data: fromDatan, dataType: "JSON", success: function(fromData, status, jqXHR) { alert(JSON.stringify(fromData)); }, error: function(jqXHR, status) { alert(JSON.stringify(jqXHR)); } }); So please let me know how to do this.
tagged with: jquery
type: UnansweredQuestion

http://stackoverflow.com/q/25280816
has title: JavaScript submit button onclick redirect not working
has comment: http://stackoverflow.com/comment/39395501
has body: Why this JavaScript code is not redirecting to the URL ? What is wrong with this code? function submitform() { var hiddenFieldValue = document.getElementById('course').value; alert("inindonesia.org/marketplace/tags/"+hiddenFieldValue); window.location.href= "inindonesia.org/marketplace/tags/"+hiddenFieldValue); return false; } HTML code &lt;form autocomplete="off" method="POST"&gt; &lt;p&gt; Course Name &lt;label&gt;:&lt;/label&gt; &lt;input type="text" name="course" id="course" /&gt; &lt;!--input type="button" value="Get Value" /--&gt; &lt;input type="text" name="course_val" id="course_val" /&gt; &lt;/p&gt; &lt;input type="submit" value="Submit" onClick="submitform()"/&gt; &lt;/form&gt;
has comment: http://stackoverflow.com/comment/39395586
favorite count: 0
has answer: http://stackoverflow.com/a/25281207
type: UnansweredQuestion
tagged with: http-redirect
upvote count: 1
has comment: http://stackoverflow.com/comment/39395663
answer count: 4
has answer: http://stackoverflow.com/a/25280966
linked to: http://stackoverflow.com/q/503093
has answer: http://stackoverflow.com/a/25280959
score: 1
has answer: http://stackoverflow.com/a/25280931
type: Question
tagged with: window.location
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39562522
comment on: http://stackoverflow.com/q/25356048
type: Comment
type: QuestionComment
has text: Hi Bergi, thanks for the comment. It helped debug what the problem was. The problem was that the server was throwing a null exception because it was expecting a user agent to be sent in the header.
score: 0

http://stackoverflow.com/q/25348778
tagged with: unobtrusive-javascript
tagged with: javascript
tagged with: jquery
has body: I was making a feature with which you can swap the rows in table. It works great, but after refreshing the page, if I swapped some rows, the rows are back to the place, where they have been before swapping. I'd like to know, why is that happening and how to avoid that. This is the code of the feature, if someone needs it: swapRows = function(rowTable) { rowTable.find(".glyphicon-sort").click( function() { row = $(this).closest("tr"); row.insertBefore( row.prev() ); } ); }
score: 0
has answer: http://stackoverflow.com/a/25348821
tagged with: ruby-on-rails-4
has title: The rows of table are back to their places after refreshing page
has answer: http://stackoverflow.com/a/25348844
accepted answer: http://stackoverflow.com/a/25348821
possible better answer: http://stackoverflow.com/a/25348844
type: AnsweredQuestion
type: Question
answer count: 2

http://stackoverflow.com/a/25367507
answers question: http://stackoverflow.com/q/25361016
has comment: http://stackoverflow.com/comment/39578257
score: 1
has comment: http://stackoverflow.com/comment/40175509
has body: Tree is a complex UI structure to deal with. In order to support multiple use cases, tree browser doesn't deal with spacing and margins of your cells. You simply apply classes to your cell and apply spacing/margins on your own. Here is the updated fiddle: http://jsfiddle.net/t2qafj81/3/
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25361016
upvote count: 1
type: Answer

http://stackoverflow.com/comment/39479735
has text: I´m assuming that you have an angular controller with those properties, if that´s not the case, please share some more code with us
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25325871

http://stackoverflow.com/comment/39511535
type: Comment
type: QuestionComment
has text: I don't understand your cellZoom() function. Why do you pass 3 parameters and don't use them? And then it only calls another function? Is there something else that you've edited out?
score: 0
comment on: http://stackoverflow.com/q/25342683

http://stackoverflow.com/comment/39594155
comment on: http://stackoverflow.com/a/25383919
has text: I am glad it worked out for you. Good luck and welcome to SO! :)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25335895
answer count: 0
tagged with: scroll
upvote count: 1
has comment: http://stackoverflow.com/comment/39499817
downvote count: 1
has comment: http://stackoverflow.com/comment/39499836
type: Question
tagged with: javascript
has body: I've got a large block of text in a textarea and I'd like to have my Javascript scroll the textarea to the location where I've found the matching text so that it's now visible within the textarea. I've figured out how to count the lines of text and calculate the line number of the matching text, but I can't quite figure out how to translate that information into making the textarea scroll to the located text. function findLrec(lid) { var pText = document.myform.niceLrecs.value; var sCrit = "Lrec "; sCrit += lid; var lrecBegin = pText.search(sCrit) var lrecFound = pText.substring(lrecBegin+4,pText.length); var lrecEnd = lrecFound.search("Lrec"); if (lrecEnd &lt; 0) lrecEnd = lrecFound.length; lrecEnd = lrecBegin + lrecEnd + 4; var niceLrecs = document.getElementById('TITLE'); var lrecLineLoc = pText.substr(0,lrecBegin).split("\n").length; var rat1 = pText.split(/\r*\n/).length; if (rat1 &lt; 1) rat1 = 1; rat1 = lrecLineLoc/rat1; niceLrecs.scrollTop = niceLrecs.scrollHeight*rat1-16; }
score: 0
tagged with: textarea
has comment: http://stackoverflow.com/comment/39499833
favorite count: 0
type: UnansweredQuestion
tagged with: match
has comment: http://stackoverflow.com/comment/39499157
has title: Scroll to matching text in textarea with Javascript
tagged with: visible

http://stackoverflow.com/q/25256421
has comment: http://stackoverflow.com/comment/39361306
tagged with: image-manipulation
type: AnsweredQuestion
has title: Why does browser/client side image re-sizing have such a large performance hit?
has comment: http://stackoverflow.com/comment/39351791
linked to: http://stackoverflow.com/q/3139090
type: Question
has body: I'm re-sizing images on the client side testing on an iphone5 web browser and seeing a decent amount of lag. It was making me wondering why browser side image re-sizing is so un-performant. Let me add that the re-sizing will be done server side when the project goes live. Which is more performant, re-sizing images with css or javascript? Is the performance and quality issues effected by the images re-size difference?
accepted answer: http://stackoverflow.com/a/25262165
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39351824
has answer: http://stackoverflow.com/a/25262165
upvote count: 1
answer count: 1
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39351375
has comment: http://stackoverflow.com/comment/39351604
tagged with: css

http://stackoverflow.com/a/25309365
has body: It looks like your JavaScript wasn't needed at all, I commented it out like so: $(document).ready(function() { /*$(".gradient_menuitem:gt(9)").css("display","none"); $(".gradient_menuitem:eq(9)").click ( function (e) { e.preventDefault(); $(".gradient_menuitem:gt(9)").css("display","block"); $(".gradient_menuitem:eq(9)").hide(); }); $(".gradient_menu").mouseleave(function(){ $(".gradient_menuitem:gt(9)").hide(); $(".gradient_menuitem:eq(9)").show(); });*/ }); And now your menu is working just fine. Have a look. EDIT: Here's what to do for the "More" button in the "Categories" menu: More.. Romance Sci-Fi Thriller You simply add the "Romance", "Sci-Fi" and "Thriller" menus inside it within a ul tag of class "gradient_menu". Have a look there and just copy the HTML. The rest is all up to your CSS.
answers question: http://stackoverflow.com/q/25308845
upvote count: 1
has comment: http://stackoverflow.com/comment/39449344
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/a/25286361
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/25282893
type: Answer
answers question: http://stackoverflow.com/q/25282893
upvote count: 4
has body: You're probably new to JavaScript and not understanding variable scope there. Your: loader.load('test.obj', function(object){ Means that object is only known within the scope of the function you've declared there. One way around it is to make another page-global variable at the start: &lt;script&gt; //Variables var loadedObject = null; then in the function assign to it: loader.load('test.obj', function(object){ loadedObject = object; and you can then use loadedObject in your render() function. Make sure to check it is defined before you try to use it, as it'll take time to load: function render() { if ( loadedObject ) { // do something with it }
type: AcceptedAnswer

http://stackoverflow.com/a/25293851
has body: Add this to your JavaScript function getNextDate(currentMonth){ switch(currentMonth) { case "January": case "March": case "May": case "July": case "August": case "October": if(d==31) { d=1; m=month[today.getMonth()+1]; } else { d++; } break; case "December": if(d==31) { d=1; m=month[today.getMonth()+1]; y++; } else { d++; } break; case "February": if(d==28) { d=1; m=month[today.getMonth()+1]; } else { d++; } break; default: if(d==30) { d=1; m=month[today.getMonth()+1]; } else { d++; } break; } }; getNextDate(m); document.getElementById('day').value = d; document.getElementById('month').value = m.slice(0,3); document.getElementById('year').value = y; FIDDLE: http://jsfiddle.net/1cg1n0q2/
has comment: http://stackoverflow.com/comment/39420398
has comment: http://stackoverflow.com/comment/39421423
score: 0
has comment: http://stackoverflow.com/comment/39420448
type: Answer
answers question: http://stackoverflow.com/q/25293612

http://stackoverflow.com/q/25375130
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25381438
type: Question
tagged with: kendo-grid
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: kendo-ui
accepted answer: http://stackoverflow.com/a/25381678
score: 0
has body: I am working with a KendoGrid object where one of the columns I have is called Birthdate. I need to be able to pull a DateTime value from the selected item in that list. Here is what I have tried var grid = $( "#MainRosterGrid" ).data( "kendoGrid" ); var ageDOB = grid.select().data.Birthdate; im pretty sure the second part of that line is wrong but I am very inexperienced with the KendoGrid. this is all running in a Javascript function and I am having a really hard time testing it.
has answer: http://stackoverflow.com/a/25381678
has title: pulling a date from the selected item of a Kendogrid
possible better answer: http://stackoverflow.com/a/25381438

http://stackoverflow.com/comment/39458405
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25314243
score: 0
has text: Are you suggesting that i'm going to have to add a new field for every file?

http://stackoverflow.com/q/25387644
answer count: 4
tagged with: visual-studio-2013
type: AnsweredQuestion
tagged with: cordova
has comment: http://stackoverflow.com/comment/39777535
has title: Apache Cordova Can't Read a File from Root Directory
linked to: http://stackoverflow.com/q/24600166
possible better answer: http://stackoverflow.com/a/25432122
has comment: http://stackoverflow.com/comment/39776495
type: Question
has comment: http://stackoverflow.com/comment/39777558
has comment: http://stackoverflow.com/comment/39776604
has comment: http://stackoverflow.com/comment/39777319
has comment: http://stackoverflow.com/comment/39777825
has comment: http://stackoverflow.com/comment/39776545
score: 0
has comment: http://stackoverflow.com/comment/59818731
has answer: http://stackoverflow.com/a/25432122
tagged with: javascript
linked to: http://stackoverflow.com/q/25382572
accepted answer: http://stackoverflow.com/a/25499111
has comment: http://stackoverflow.com/comment/39777488
has answer: http://stackoverflow.com/a/25578284
tagged with: visual-studio-cordova
has body: I am trying to read a file using cordova with this code. But I am not able to see alert inside fileSystem.root.getFile function. window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) { alert("root name=" + fileSystem.root.name); //alert working //after this not working var path = "index.html"; fileSystem.root.getFile(path, null, function (fileEntry) { alert('file entry'); fileEntry.file(gotFile, fail); }, fail); }, fail); function fail(error) { alert("File System Error:" + error.code); } I get error code 1. I am using visual studio cordova hybrid app plugin (2013). Update Solved: I solved the problem by going to my bin -> windows phone directory. And then i renamed the .xap file to .zip to extract the content. I found there that my files are correctly deployed along with cordova plugins. But my files were inside www directory. So i sepcified the path and it works now; var path = "www/index.html"; But i am really wondering why cordova documentation didn't mention this but anyway i solved it now;
has answer: http://stackoverflow.com/a/25390629
linked to: http://stackoverflow.com/q/16399465
has comment: http://stackoverflow.com/comment/39776574
has answer: http://stackoverflow.com/a/25499111

http://stackoverflow.com/q/25348684
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25348718
tagged with: variables
favorite count: 0
downvote count: 2
has body: In this code, function dogName() has three variables: Clint, Bee, and Copper. I want to make it where if you click the button (RandName) you get a random name chosen from the function listed above. I've searched everywhere for the answer but to no avail. Thanks in advance!
has answer: http://stackoverflow.com/a/25348718
type: AnsweredQuestion
type: Question
answer count: 2
tagged with: function
upvote count: 0
score: -2
has answer: http://stackoverflow.com/a/25348707
accepted answer: http://stackoverflow.com/a/25348707
has title: Giving functions alternate outputs

http://stackoverflow.com/q/25387975
tagged with: jquery
has body: I have implemented a code, which works like this:- On Click of enter it generates &lt;br /&gt; tag. I want that it should generates the &lt;br /&gt; I want, whenever user click on enter it should generate the &lt;br /&gt; tag but at the same time it should not be visible.Please find the code for your reference:- &lt;script type="text/javascript"&gt; function EnterEventDesc(e) { if (e.keyCode == 13) { var input = $("#ctl00_ContentPlaceHolder1_txtJobDesc"); input.val(input.val() + "&lt;br/&gt;"); return false; } else { return true; } } &lt;/script&gt; The &lt;br /&gt; tag is coming but I want to hide it at the same time. Please help
has comment: http://stackoverflow.com/comment/39618056
answer count: 3
tagged with: asp.net
favorite count: 0
has comment: http://stackoverflow.com/comment/39594711
has answer: http://stackoverflow.com/a/25388081
type: UnansweredQuestion
score: 6
tagged with: css
has comment: http://stackoverflow.com/comment/39594822
has comment: http://stackoverflow.com/comment/39619843
has title: Convert input's NewLines to tags
downvote count: 0
has comment: http://stackoverflow.com/comment/39594720
has comment: http://stackoverflow.com/comment/39594695
has answer: http://stackoverflow.com/a/25400850
has comment: http://stackoverflow.com/comment/39618079
has answer: http://stackoverflow.com/a/25388280
type: Question
has comment: http://stackoverflow.com/comment/39618114
upvote count: 6
tagged with: javascript

http://stackoverflow.com/comment/39582090
score: 1
has text: @BoltClock I'm just glad, people stopped calling it 'pound'.
comment on: http://stackoverflow.com/q/25381446
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39482697
comment on: http://stackoverflow.com/a/25327487
type: Comment
has text: sorry, i miss something
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39336423
type: Comment
has text: `before initializing the dropdownchecklist` it needs to happen when a button is clicked, not when it's being initialized.
type: AnswerComment
comment on: http://stackoverflow.com/a/25247837
score: 0

http://stackoverflow.com/q/25249648
has answer: http://stackoverflow.com/a/25249817
upvote count: 1
has body: How do I set the selected option for another page before loading that page? Say I have page A and B. If user clicks a button on page A, it will change a default option in page B to "something" and then it will take the user to page B. (so I want it to change before page B loads).
tagged with: http://stackoverflow.com/tag/html
has title: Set Selected Option for Another HTML Class
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39338301
has comment: http://stackoverflow.com/comment/39338286
tagged with: css
has comment: http://stackoverflow.com/comment/39338665
downvote count: 0
score: 1
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/2920129
has comment: http://stackoverflow.com/comment/39338391
has answer: http://stackoverflow.com/a/25252937
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/53850320
answers question: http://stackoverflow.com/q/25251588
score: 0
has body: It can be done in three ways. You can use checked in input that will always stay checked. &lt;input id="myId" type="checkbox" name="name" checked&gt; Using prop and assume input id is myId $(document).ready(function() { $(#myId).prop('checked', true); }); Before jQuery 1.6 using attr $(document).ready(function() { $(#ID).attr('checked','checked'); });
type: Answer

http://stackoverflow.com/q/25258415
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39357918
tagged with: css
has answer: http://stackoverflow.com/a/25258542
has answer: http://stackoverflow.com/a/25259736
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39357654
upvote count: 2
has title: How fix position element so that while hovering on one element other two element should remain at same place
possible better answer: http://stackoverflow.com/a/25258522
type: Question
has answer: http://stackoverflow.com/a/25258522
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25259736
answer count: 3
has comment: http://stackoverflow.com/comment/39356166
has comment: http://stackoverflow.com/comment/39355230
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/39356216
favorite count: 0
has body: I want to create on hover effect shown in below first two images in below two images shows how i have implemented with help of example given on this SO link As you can see while hovering on one image 3rd image position is getting changed , How to make two images position fixed while hovering on one image?as displayed on above first two image here is my jsfiddle code css .wrap{ width:1360px; margin:0px; padding:0px; } .con{ display:inline-block; width:453px; height:453px; position:relative; background:url(images/new-psd_22.jpg) no-repeat; opacity:0.5; transition:0.5s; transition-timing-function: linear; margin:0px; box-sizing:border-box; border-left:#FFF 1px solid; } .hover{ text-align:center; color:#fff; display:inline-block; width:453px; height:453px; position:absolute; z-index:2; background-color:rgba(0,0,0,0.5); transition:0.5s; margin:0px; box-sizing:border-box; display:inline-block; } .con:hover{ text-align:center; color:#fff; opacity:10; background:url(images/Indian_Air_Forc17992.jpg) no-repeat; height:400px; width:570px; margin:0px; } .con:hover span{ text-align:center; color:#fff; opacity:0; background:url(images/Indian_Air_Forc17992.jpg) no-repeat; height:400px; width:570px; margin:0px; } body Hover Me Hover Me Hover Me
has comment: http://stackoverflow.com/comment/39355510

http://stackoverflow.com/q/25368301
tagged with: mobile
tagged with: javascript
has title: Ionic / Angular ui-router -a href's returning wrong URL/content
has answer: http://stackoverflow.com/a/25428206
accepted answer: http://stackoverflow.com/a/25428206
upvote count: 3
answer count: 2
has body: I have an Ionic tab menu which shows 4 items (the code below and codepen just have 2 items for clarity) and a "more" item which leads to further menu choices displayed as a list in an ion-content. It uses the Angular ui-router. I have two possibly connected issues. Issue 1: at first the app appears to be working correctly but as you start to navigate around a few links (generally after visiting "more", the tabs will start to return incorrect URLS. For example: Stating at News > Contact > More > Sports > Contacts > News > More - breaks here, I see Contacts content instead of More content. I've add a console.log into each controller and in Chrome dev tools console, I can see that each tab click seems to lunch an extra event, e.g. clicking news tab means 'news' appears twice in the console. In addition, in the nav example above, the console shows that the contacts controller was launched when I clicked More. So to summarise, after some clicks around the app, the href targets seem to be sending me to the wrong place, like as if one had edited the code while it is running. Issue 2: Up until the point where the nav breaks as described above, the back button works correctly for pages launched from the tabs, but for the pages launched from the "more" page (ie from the list) there is no back button. Sorry for all these beginner questions! Codepen : http://codepen.io/anon/pen/hBpfa Index.html: Back App.js: var schoolApp = angular.module('schoolApp', ['ionic']) schoolApp.config(function($stateProvider, $urlRouterProvider) { $stateProvider // setup an abstract state for the tabs directive .state('tab', { url: "/tab", abstract: true, templateUrl: "tabs.html" }) .state('tab.news', { url: '/news', templateUrl: 'inside.html', controller: 'newsCtrl' }) .state('tab.contact', { url: '/contact', templateUrl: 'inside.html', controller: 'contactCtrl' }) .state('tab.info', { url: '/info', templateUrl: 'inside.html', controller: 'infoCtrl' }) .state('tab.pictures', { url: '/pictures', temp…
linked to: http://stackoverflow.com/q/24203470
tagged with: angular-ui
possible better answer: http://stackoverflow.com/a/25382146
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25382146
type: AnsweredQuestion
score: 3
downvote count: 0
tagged with: ionic-framework
type: Question

http://stackoverflow.com/comment/39383664
score: 0
type: AnswerComment
has text: So that code did not work, I updated the jsFiddle. I named the checkbox on "Basic overlay" => class="basic_standby". Could you give your answer in the jsFiddle? http://jsfiddle.net/ooh43u6t/1/ @sulavvr
type: Comment
comment on: http://stackoverflow.com/a/25272467

http://stackoverflow.com/comment/39451392
score: 0
comment on: http://stackoverflow.com/a/25310631
type: Comment
has text: Gotcha, I am new to Angular though and I figured there'd be a cleaner approach than having to use a directive, I've been told that I shouldn't be touching those while starting new and that something like `ng-click` or `ng-class` should suffice. Thoughts?
type: AnswerComment

http://stackoverflow.com/comment/39606882
comment on: http://stackoverflow.com/a/25390915
score: 0
type: AnswerComment
has text: Turns out a colleague had a bug in the db import tool, which was creating these names. But you are right modifying the data slightly to prevent the risk is best. What I do is first run encodeURIComponent on that parameter then replace all % with *, that way preventing a translation.
type: Comment

http://stackoverflow.com/comment/39563327
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25371243
has text: If manipulating individual elements were actually a requirement, then it might be relevant.

http://stackoverflow.com/comment/39407274
comment on: http://stackoverflow.com/q/25287031
has text: I'm aware what the `new` keyword is. Thank you.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39588500
type: AnswerComment
has text: I think this is what I am looking for, could you add the corresponding HTML template for clarity? Thanks! IOW, how do I then get access to elements of group?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25384165

http://stackoverflow.com/a/25344623
answers question: http://stackoverflow.com/q/25329786
has comment: http://stackoverflow.com/comment/47846864
has comment: http://stackoverflow.com/comment/39577298
upvote count: 10
has comment: http://stackoverflow.com/comment/39576191
score: 10
has body: So, discarding negative radicands is not the best solution because you still might rule out valid real solutions, since the radicands in the second term could cancel out the imaginary part from the first term. Additionally, the 2nd and 3rd roots have i in their formula, so you are sort of forced to deal with complex numbers there. These roots should also never be thrown out, because even for cubics with 3 real roots, 2 of the 3 roots are still calculated using complex numbers! Dealing with complex numbers is something that JavaScript does not handle natively, and is non-trivial enough that you would not want to implement it yourself. That's where. math.js comes in. Read here to learn about math.js. But for this question, you just need to know about one method. math.js does its work through its math object, and the method we are concerned with is math.eval(expr,scope) which will evaluate a string expression expr and use the variable assignments specified in scope. So, initially looking at the 3 roots provided by wolfram: They are a little bit unwieldy. Upon closer inspection, they all have a common term: That term is an expression of A and V, so lets move that to a function of A and V, called f So substitute that term for our new function f, and now the roots are a lot more manageable: So, lets gets started. You just need to include math.js at the top of your project: &lt;script type="text/javascript" language="JavaScript" src="http://cdnjs.cloudflare.com/ajax/libs/mathjs/0.26.0/math.min.js"&gt;&lt;/script&gt; Onto the script. First, define the f function described above: var f = function(A, V) { var scope = {A: A, V: V}; var expr = math.eval( '(sqrt(6) pi^(3/2) sqrt(54 pi V^2-A^3)-18 pi^2 V)^(1/3)' ,scope); return expr; }; Note that: spaces implicitly mean to multiply terms, ie a b=a*b, and that the cube root of a number n is equivalent to n^(1/3) So f will evaluate our expr using the arguments A and V for area and volume. Now we can use that to define functions tha…
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47847089
accepted answer of: http://stackoverflow.com/q/25329786
type: Answer

http://stackoverflow.com/comment/39544091
comment on: http://stackoverflow.com/q/25361278
type: Comment
has text: can you `log` or `alert` the `data` returned by `post` request?
score: 0
type: QuestionComment

http://stackoverflow.com/a/25313456
has body: There is no closest span, the span is in an anchor that is a sibling of the parent anchor the i element is in $('.fa-times').click(function(){ var elem = $(this).closest('a').prev('a').find('span.jumpScreen'); alert( elem.text() ); });
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/25313399
downvote count: 0
type: Answer

http://stackoverflow.com/a/25307753
score: 1
has comment: http://stackoverflow.com/comment/88082863
upvote count: 1
has comment: http://stackoverflow.com/comment/39506426
downvote count: 0
answers question: http://stackoverflow.com/q/25302390
type: Answer
has body: Its a bug in node.js v0.11.9 which is solved in v0.11.13. Then aes.on('error', ...) will be called correctly.

http://stackoverflow.com/q/25372266
has answer: http://stackoverflow.com/a/25372299
has title: Change width of a class using Javascript and save State
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39565324
has comment: http://stackoverflow.com/comment/39565409
answer count: 1
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39565314
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/39565355
upvote count: 0
has comment: http://stackoverflow.com/comment/39565329
score: -1
type: Question
has body: I am currently working on a website that has a static left Sidebar that is usually 250px wide however I have come across an issue whereby when the user is on a computer with a screen resolution where their screen is less than about 1200px the sidebar takes up far too much space on the screen. How would I go about setting it up so that there will be a button to collapse the sidebar to 100px and it will save the state whilst they are using the website? And then once it has been collapsed there is another button for the user to expand the Sidebar back to its original state? Also, when the user either clicks on the Collapse or Expand button, I don't want the whole page to refresh as there are a lot of forms on the site and if the page refreshes the user will have to re-enter all their details (if they click on the button mid-form). Any help would be appreciated! Thanks!
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39432573
has text: Oddly enough, even though this code works on Bootply, it doesn't work on my personal webpage, any my code doesn't at all differ. Why could this be?
comment on: http://stackoverflow.com/a/25300157
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25253737
answers question: http://stackoverflow.com/q/25253544
score: 1
accepted answer of: http://stackoverflow.com/q/25253544
has body: If I'm guessing correctly, you want the javascript code to have a number in it which is generated by a python script. If you're using Flask, then you're probably using Jinja2, right? When the page with said javascript is requested and you send it back with render_template(), you can pass a keyword argument to render_template containing that value, and then in the template, you can "echo" that variable's value into the javascript. For example,if you had the pertinent javascript in template page.html in your templates directory, and had a python function to compute the value called compute_value @app.route("/page") def page(): value = compute_value() return render_Template('page.html', value = value) Then in page.html, you could have this var y = {{ value }} So in a sense you're generating javascript code from python with Jinja2.
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/q/25295762
type: Question
has answer: http://stackoverflow.com/a/25297639
tagged with: internet-explorer
tagged with: asp.net-mvc
has body: I am building a web app using asp.net-MVC and I found some strange behavior using XmlHttpRequest to send request to server. For example, if I run the follwing js code： alert("send request!"); var xhr = new new XMLHttpRequest(); xhr.open("get", requestURL, false); xhr.onreadystatechange = ResponseHandler; xhr.send(some message); If it takes a long time for the server to handle the request or if I manually set a breakpoint in the action function, I will not see the alert dialog until the server finishes processing the request. It only doesn't happen in Firefox but in IE,Safari,Opera and Chrome . This is really weird and I was wondering what is the cause of the problem. Thanks!
score: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25297639
has title: IE and chrome doesn't execute js code before sending an XMLHTTPRequest until it receives the response of that request
tagged with: xmlhttprequest
has comment: http://stackoverflow.com/comment/39453485
has comment: http://stackoverflow.com/comment/39453083
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39424516
tagged with: google-chrome

http://stackoverflow.com/comment/39494801
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25332261
has text: I see. So is it safe to say you have to say you have to do your own bookkeeping for all the observers you create, and separately call Object.unobserve before you remove the reference to the observed object?
score: 0

http://stackoverflow.com/q/25360395
has comment: http://stackoverflow.com/comment/39542501
has comment: http://stackoverflow.com/comment/39543178
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25360444
has answer: http://stackoverflow.com/a/25360444
has comment: http://stackoverflow.com/comment/39542351
linked to: http://stackoverflow.com/q/25362640
has answer: http://stackoverflow.com/a/25360742
type: AnsweredQuestion
has body: This is my c# code: Dictionary&lt;string, double[][]&gt; dictionary = new Dictionary&lt;string, double[][]&gt;(); dictionary.Add("ServiceLevel", finalArray); dictionary.Add("NumberOfCalls", numberOfCallsArray); Where finalArray and numberOfCallsArray is double[][] full of data. I send it to jquery like this: string jsonformatstring = JsonConvert.SerializeObject(dictionary, Formatting.Indented); HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ContentType = "application/json; charset=utf-8"; HttpContext.Current.Response.Write(jsonformatstring); HttpContext.Current.Response.End(); Then in jquery after doing a json request and get the data successfully. I do this: var data = $.map(result, function (arr, key) { return { label: key, data: arr }; }); console.log(data["ServiceLevel"] + "--"); My problem I got undefined in the console when I tried this: console.log(data["ServiceLevel"] + "--"); Maybe I am getting the value in the wrong way? Update 1 I did this: console.log(result); and I got this Update 2 I tried this: var s = JSON.stringify(result); console.log(s) The result is this: {"ServiceLevel":[[1390608000000,50],[1392595200000,0],[1393286400000,66.66666666666667],[1393891200000,50],[1394064000000,0],[1394236800000,50],[1394323200000,0],[1394841600000,50],[1394928000000,33.333333],[1395014400000,0],[1395100800000,50],[1395273600000,0],[1395446400000,0],[1395619200000,0],[1395705600000,0],[1395878400000,50],[1396310400000,50],[1396483200000,0],[1396656000000,0],[1396828800000,50],[1396915200000,50],[1397001600000,50],[1397347200000,33.333333],[1397433600000,50],[1397952000000,0],[1398124800000,50],[1398556800000,0],[1398902400000,45],[1399075200000,0],[1399161600000,0],[1399334400000,0],[1399420800000,50],[1399680000000,0],[1399852800000,50],[1399939200000,0],[1400025600000,0],[1400112000000,33.333333],[1400284800000,40],[1400371200000,0],[1400457600000,50],[1400716800000,40],[1402185600000,50],[1402358400000,50],[1402531200000,0],[1402704000000,44.1…
linked to: http://stackoverflow.com/q/25366372
type: Question
has comment: http://stackoverflow.com/comment/39542291
tagged with: c#
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25360742
has comment: http://stackoverflow.com/comment/39542373
has title: jquery how to get data from this array
has comment: http://stackoverflow.com/comment/39542472
score: 0
has comment: http://stackoverflow.com/comment/39542681
answer count: 3
has answer: http://stackoverflow.com/a/25360594

http://stackoverflow.com/q/25283932
tagged with: javascript
score: 0
has body: I need to hide a WinJS.UI.PivotItem for a Windows Phone 8.1 app and then show it again once certain criteria have been met. I thought it would be as simple as using CSS to show and hide the WinJS.UI.PivotItem, but it hides the .win-pivot-item element but not the .win-pivot-header? How can I programmatically show and hide a WinJS.UI.PivotItem in a WinJS.UI.Pivot control?
answer count: 1
tagged with: windows-phone
type: UnansweredQuestion
tagged with: css
tagged with: windows-phone-8.1
has answer: http://stackoverflow.com/a/25372340
type: Question
has title: Hide and Show WinJS.UI.PivotItem
tagged with: winjs

http://stackoverflow.com/comment/39378348
type: AnswerComment
has text: i have a new menu now. you can check it on my site. marcusnoren.nu. I just found out when I deleted my links from the menu. thats when the button disapeared
type: Comment
comment on: http://stackoverflow.com/a/25252364
score: 0

http://stackoverflow.com/comment/39557417
comment on: http://stackoverflow.com/q/25368141
score: 0
type: Comment
type: QuestionComment
has text: @SterlingArcher Pressed submit too early, the above code outputs the keys in a random order.

http://stackoverflow.com/a/25320762
answers question: http://stackoverflow.com/q/25255035
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/25255035
type: AcceptedAnswer
has body: problem solved. The html-temple file needs to be rebuild

http://stackoverflow.com/a/25385146
answers question: http://stackoverflow.com/q/25288724
has body: To control the behavior of the data aggregation, you would have to implement your own aggregator. The set of built in aggregators can be seen in the source of slick.dataview.js. If you are using one of those default implementations, you can "hack" a solution by declaring 2 levels of data grouping with the outer most layer being on a junk data column that has the same value for every data entry. I don't suggest taking this route, but wanted to state that it "is" possible without a completely custom implementation. dataView.setGrouping([ { getter: "myJunkColumn", formatter: function (g) { return ""; }, aggregators: [ new Slick.Data.Aggregators.Sum("data") ], aggregateCollapsed: false, lazyTotalsCalculation: true }, { getter: "year", formatter: function (g) { return "Year(s): " + g.value + " (" + g.count + " items) "; }, aggregators: [ new Slick.Data.Aggregators.Sum("data") ], aggregateCollapsed: false, lazyTotalsCalculation: true }]); FIDDLE
score: 0
type: Answer

http://stackoverflow.com/a/25235914
has comment: http://stackoverflow.com/comment/39312778
answers question: http://stackoverflow.com/q/25235620
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
has body: I wonder if this is what you want or not http://jsfiddle.net/kN272/31/ $('#player-list , #player-list2').sortable({ connectWith: ".connected" });
accepted answer of: http://stackoverflow.com/q/25235620
upvote count: 1

http://stackoverflow.com/q/25240312
has title: Serialize/Deserialize Tree to Json
answer count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39333311
type: Question
has body: I use .Net Framework with WebApi on my Server and Javascript/AngularJs on my Client. I want to transfer an Tree with References to my Client. I found a Way to get it to the Client, i just set PreserveReferencesHandling.Objects at the Newtonsoft Json. Json looks like this: { "$id": "1", "id": 1, "revisionNumber": 0, "name": "Revision 0", "parentRevisionNode": null, "nextRevisionNode": null, "prevRevisionNode": null, "childRevisionNodes": [ { "$id": "2", "id": 2, "revisionNumber": 0, "name": "Node 1", "parentRevisionNode": { "$ref": "1" }, "nextRevisionNode": null, "prevRevisionNode": null, "childRevisionNodes": [ { "$id": "3", "id": 3, "revisionNumber": 0, "name": "Node 1.1", "parentRevisionNode": { "$ref": "2" }, "nextRevisionNode": null, "prevRevisionNode": null, "childRevisionNodes": null, "data": { "$id": "4", "id": 3, "revisionNumber": 0, "text": "Data 1.1", "parentRevisionNode": { "$ref": "3" }, "nextRevisionNode": null } }, { "$id": "5", "id": 4, "revisionNumber": 0, "name": "Node 1.2", "parentRevisionNode": { "$ref": "2" }, "nextRevisionNode": null, "prevRevisionNode": null, "childRevisionNodes": null, "data": { "$id": "6", "id": 4, "revisionNumber": 0, "text": "Data 1.2", "parentRevisionNode": { "$ref": "5" }, "nextRevisionNode": null } } ], "data": { "$id": "7", "id": 2, "revisionNumber": 0, "text": "Data 1", "parentRevisionNode": { "$ref": "2" }, "nextRevisionNode": null } } ], "data": { "$id": "8", "id": 1, "revisionNumber": 0, "text": "Data 0", "parentRevisionNode": { "$ref": "1" }, "nextRevisionNode": null } } I found a function that replaces the $id and $ref with the Object. Thats working fine. Now i want the get that Object Tree back to the Server. But i get an error with circling references on JS Side. Then i thought i can do the same way back, transform the Object References with $id and $ref. But Angulars $resource cuts out all the $ attributes... Anyone a good Idea how to get Data back and forth from/to Server? Thanks in advance Greeetings Ronny G…
tagged with: c#
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39353377
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/q/25277011
has comment: http://stackoverflow.com/comment/39388836
has comment: http://stackoverflow.com/comment/39388980
has comment: http://stackoverflow.com/comment/39388837
type: Question
has body: I want to have a list of questions and there is a slider bar with displayed value following each of the questions. Here is the example how to do the data-binding from AngularJs website: Name: Hello {{yourName}}! But in my case, I will generate a list of my questions by using ng-repeat, so in this case, all the slider bars will have same id and name. {{q.description}} {{"rv" + q.id}} As you can see that I'm trying to solve conflict ids by combining 'rv' (ranking value) and question id. But I get an error: Error: [$parse:syntax] Syntax Error: Token ''rv'' is unexpected, expecting [:] at column 3 of the expression [{{'rv' + q.id}}] starting at ['rv' + q.id}}]. Update I want to upload the list of answers back to my server. The question model doesn't hold any attribute to store user answers. Instead, a model called: question_answer which has answer as the attribute to store the user input answer. How to achieve this part? Through $http?? Update 2 Here is the controller code: var trialApp = angular.module("trialApp", []); trialApp.controller('questionControl', function ($scope, $http) { $scope.counter = 1; $http.get("http://my.azurewebsites.net/api/question_category").success(function (data) { $scope.questionsCategories = data; }).error(function () { alert("Failed to fetch question_category instances from database, please check your Internet connection!"); }); $http.get("http://my.azurewebsites.net/api/Questions").success(function (data) { $scope.questions = data; }).error(function () { alert("Failed to fetch questions from database, please check your Internet connection!"); }); }); And here is the data structure of question_answer { "question_id": 5, "answer": "" } Thank you.
has comment: http://stackoverflow.com/comment/39388872
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39388804
has title: AngularJs how to generate a list of sliderbars with displayed value
has comment: http://stackoverflow.com/comment/39388900
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25277188
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39389025
has comment: http://stackoverflow.com/comment/39389289

http://stackoverflow.com/comment/39468687
type: QuestionComment
has text: @RahilWazir, there is one thing I notice in Chrome, and that is I have to go though several layers of $parent before I get to the actual object that contains the root for task. That is, Task exist in $scope, and detail is added to it in this controller.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25319066

http://stackoverflow.com/comment/39349524
has text: [Debugging JavaScript?](https://developer.chrome.com/devtools/docs/javascript-debugging)
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25255403

http://stackoverflow.com/comment/39403503
comment on: http://stackoverflow.com/q/25285000
score: 0
has text: i dont intend to stay on the page, i just want to make sure that onlick of that link, the query be excuted,
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25331912
has comment: http://stackoverflow.com/comment/39494999
has comment: http://stackoverflow.com/comment/39491900
has answer: http://stackoverflow.com/a/25332018
has comment: http://stackoverflow.com/comment/39492128
has comment: http://stackoverflow.com/comment/39491701
has title: Using empty() on tbody keeps resizing width of entire table
type: Question
has comment: http://stackoverflow.com/comment/39491605
has answer: http://stackoverflow.com/a/25332391
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/28700745
answer count: 3
has body: I am using jQuery to reload data inside the tbody. However, the header column width keeps resizing event though I put the fixed width for the columns. I am using Firefox. Simple HTML table: ProductFamily 1 2 ProductNum ProductDesc DT Rate List Rate Man Hour Unit Precall SOW Box When the tbody.empty(), it automatically resizes the width of the header columns, which make the page looks ugly. and then when I reload the new rows, it resize it back to original width. Here is my Jquery code. $(document).ready(function() { selectCategoryChange = function() { var tbody = $("#tbodyDataRow"); tbody.empty(); }; });
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39491582
type: UnansweredQuestion

http://stackoverflow.com/q/25325683
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/25326151
type: UnansweredQuestion
downvote count: 2
upvote count: 1
tagged with: php
score: -1
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39479274
has body: I have a dynamic table that displays a list of records with their date and time. The date and time displays correctly, but when I move to a hosting server, I get a different date and time, which I know is based on its timezone. I have seen different tutorials showing how to format date and time in different timezone when it is echoed on a page, but when I try it with my binded data from my recordset, it doesn't work online. This is my binded recordset data: &lt;?php echo $row_forum['Date']; ?&gt; Please explain to me: "How to format for Africa/Lagos?".
tagged with: javascript
has comment: http://stackoverflow.com/comment/39479453
has comment: http://stackoverflow.com/comment/39479156
has title: How to format time and date from a recordset?
has answer: http://stackoverflow.com/a/25326119

http://stackoverflow.com/q/25272020
type: Question
tagged with: mobile-website
has answer: http://stackoverflow.com/a/25344435
has comment: http://stackoverflow.com/comment/39545837
has comment: http://stackoverflow.com/comment/39681586
tagged with: javascript
favorite count: 0
score: 13
has body: I'm build a single page web application for mobile phones. The application should implement transitions between "screens" (like any other mobile app e.g. Facebook, Twitter) and these transitions should be animated (slide left-right). Each screen has to preserve its scroll position between transitions. One obvious solution that comes in mind is this: Viewport +----------+ |+--------+| +--------+ +--------+ +--------+ || DIV1 || | DIV2 | | DIV3 | | DIV4 | || || | | | | | | || || | | | | | | || || | | | | | | || || | | | | | | |+--------+| +--------+ +--------+ +--------+ +----------+ The different screens are put into containers (DIV1, DIV2, ...) which are styled to fit the screen (position: absolute; width: 100%; height: 100%; top: 0) and have overflow-x: scroll. The containers are positioned next to each other and the transition is as easy as animating their left property. Easy so far. The problem is the following: in this implementation the address bar doesn't disappear in the mobile browser when the user scrolls down. I'm talking about this feature: It's because mobile browsers do this only if the user scrolls the body - not a container in the body. There are several suggestions for solution but they don't work in all targeted platforms (Android Chrome and native browser, iPhone Safari) and are quite hacky. I'd like to preserve the original behavior of the browser as it is. For that reason - apparently - need to leave the scrolling on the body. This means that containers have to be "full-length" (and not overflow-scroll), still positioned next to each other. This is where transitions become difficult if you think about it. My current solution has the following steps when transitioning from DIV1 to DIV2: position top of DIV2 to the current scrollTop of the window animate DIV1's and DIV2's left property so that DIV2 fills the screen move DIV2's top to 0 once the animation has finished so that the user can't scroll back further than the top of this screen Move the wi…
answer count: 5
accepted answer: http://stackoverflow.com/a/25434480
possible better answer: http://stackoverflow.com/a/25395286
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39538270
tagged with: css
has answer: http://stackoverflow.com/a/25395286
has comment: http://stackoverflow.com/comment/39548468
upvote count: 14
has answer: http://stackoverflow.com/a/25392019
linked to: http://stackoverflow.com/q/24480571
has comment: http://stackoverflow.com/comment/39682087
tagged with: web-applications
downvote count: 1
linked to: http://stackoverflow.com/q/9678194
has comment: http://stackoverflow.com/comment/39578414
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39488112
has comment: http://stackoverflow.com/comment/39513732
has answer: http://stackoverflow.com/a/25434821
has answer: http://stackoverflow.com/a/25434480
has comment: http://stackoverflow.com/comment/39555417
has title: Single page webapp screen transitions with maintaining the scroll position

http://stackoverflow.com/comment/39649953
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25405514
has text: But event if I'm logout chrome account or delete all browser's cache I also can not login another account.You can reference problem in this extension https://chrome.google.com/webstore/detail/identity-api-sample/oficlfehfenioickohognhdhmmcpceil
type: AnswerComment

http://stackoverflow.com/comment/39591770
type: QuestionComment
score: 0
has text: @Mritunjay TypeError: $(...).length is not a function
comment on: http://stackoverflow.com/q/25386099
type: Comment

http://stackoverflow.com/q/25247312
type: Question
has answer: http://stackoverflow.com/a/25247554
accepted answer: http://stackoverflow.com/a/25247554
has title: What is the best way to organize code using AngularJS?
tagged with: javascript
has answer: http://stackoverflow.com/a/25247690
score: 0
answer count: 2
tagged with: angularjs
has body: I am creating an app, and there is used ui router, all html data append to this tag: But I'd like to include header and footer to my app, and my question is - is it better to use smth like this in index.html: or I should include in every html page two directives - header & footer.
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25247690

mongodb
tags question: http://stackoverflow.com/q/25271206
tags question: http://stackoverflow.com/q/25239408
tags question: http://stackoverflow.com/q/25272673
tags question: http://stackoverflow.com/q/25233514
tags question: http://stackoverflow.com/q/25373372
tags question: http://stackoverflow.com/q/25352009
tags question: http://stackoverflow.com/q/25331747
tag name: mongodb
tags question: http://stackoverflow.com/q/25231022
tags question: http://stackoverflow.com/q/25248439
tags question: http://stackoverflow.com/q/25383118
tags question: http://stackoverflow.com/q/25344834
type: Tag
tags question: http://stackoverflow.com/q/25299484
tags question: http://stackoverflow.com/q/25267313
tags question: http://stackoverflow.com/q/25378408
tags question: http://stackoverflow.com/q/25378561
tags question: http://stackoverflow.com/q/25378008
tags question: http://stackoverflow.com/q/25323744
tags question: http://stackoverflow.com/q/25381215
tags question: http://stackoverflow.com/q/25294025
tags question: http://stackoverflow.com/q/25356700
tags question: http://stackoverflow.com/q/25364836
tags question: http://stackoverflow.com/q/25250544
tags question: http://stackoverflow.com/q/25292688
tags question: http://stackoverflow.com/q/25255935
tags question: http://stackoverflow.com/q/25237887
tags question: http://stackoverflow.com/q/25366280
tags question: http://stackoverflow.com/q/25277175
tags question: http://stackoverflow.com/q/25285232
tags question: http://stackoverflow.com/q/25372388
tags question: http://stackoverflow.com/q/25270306
tags question: http://stackoverflow.com/q/25388369
tags question: http://stackoverflow.com/q/25387090
tags question: http://stackoverflow.com/q/25356969
tags question: http://stackoverflow.com/q/25344444

http://stackoverflow.com/comment/39365119
comment on: http://stackoverflow.com/q/25263426
score: 0
type: Comment
type: QuestionComment
has text: If `name` is the name of the colour, all you need is `return d.name;` instead of `return color(d.name);`.

http://stackoverflow.com/a/25252588
score: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25252479
downvote count: 1
has body: JSON Data can be rendered as a String , but you need to have json parser to parse the string. jQuery.parseJSON()

http://stackoverflow.com/a/25246319
answers question: http://stackoverflow.com/q/25246097
has comment: http://stackoverflow.com/comment/39333044
has body: The id of the element will be link_local_time, I don't think you can overwrite the id attribute. But you can use a class instead. So use $('#link_local_time').val(localTime); or set a class on the element = f.text_field :local_time, class: 'time_locally' and change your js to $('.time_locally').val(localTime);
type: Answer
score: 0

http://stackoverflow.com/a/25341206
has body: The .ready() function gets called when DOM tree has been constructed from your HTML and that's why it is called DOM ready event. After this, the anonymous function above which has the alert gets bound to click event of the element with the ID button . This means that whenever this target is clicked (which has ID button) this function will be called, and hence your alert will show. I hope that helps !
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39509344
upvote count: 2
has comment: http://stackoverflow.com/comment/39508842
answers question: http://stackoverflow.com/q/25341111
downvote count: 0

http://stackoverflow.com/comment/39438201
comment on: http://stackoverflow.com/q/25276408
type: Comment
type: QuestionComment
has text: Could you specifically post the code where e is first referenced and some context to that line.
score: 0

http://stackoverflow.com/comment/39434069
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25300157
type: AnswerComment
has text: transition-delay: 2s;

http://stackoverflow.com/comment/39443353
comment on: http://stackoverflow.com/q/25306381
has text: So...what have you tried so far ? Plus, if I'm not mistaken, Bootstrap [already has](http://getbootstrap.com/javascript/#collapse) a JavaScript `collapse` that goes along with events etc..
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/comment/39359782
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25261328
has text: Make it globally scoped e.g. `window.Test1 = function(){...`
score: 0

http://stackoverflow.com/a/25375957
has comment: http://stackoverflow.com/comment/54977919
type: Answer
score: 82
answers question: http://stackoverflow.com/q/25370775
has body: this is how I do it JAVASCRIPT: var module = angular.module('yourModuleName', ['ui.router']); module.run( ['$rootScope', '$state', '$stateParams', function ($rootScope, $state, $stateParams) { $rootScope.$state = $state; $rootScope.$stateParams = $stateParams; } ]); HTML: &lt;pre id="uiRouterInfo"&gt; $state = {{$state.current.name}} $stateParams = {{$stateParams}} $state full url = {{ $state.$current.url.source }} &lt;/pre&gt; EXAMPLE http://plnkr.co/edit/LGMZnj?p=preview
accepted answer of: http://stackoverflow.com/q/25370775
has comment: http://stackoverflow.com/comment/69003919
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/68211330
downvote count: 0
upvote count: 82
has comment: http://stackoverflow.com/comment/54972866

http://stackoverflow.com/q/25232983
has answer: http://stackoverflow.com/a/25233115
has answer: http://stackoverflow.com/a/25233219
has comment: http://stackoverflow.com/comment/39306663
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: Angular not rendering in my json
possible better answer: http://stackoverflow.com/a/25233326
has comment: http://stackoverflow.com/comment/39306931
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/39306738
has comment: http://stackoverflow.com/comment/39306773
has comment: http://stackoverflow.com/comment/39306911
tagged with: angularjs
has answer: http://stackoverflow.com/a/25233326
accepted answer: http://stackoverflow.com/a/25233219
has comment: http://stackoverflow.com/comment/39306733
has body: I am trying to use angular which displays on the page the element from the json. Its not working. What I am trying to do is pretty straightforward. But its not working Here is my code: http://jsfiddle.net/sqxmyrcj/1/ (function(){ var app = angular.module('store', []); app.controller('PortfolioController',function(){ this.product = gem; }); var gem = { name: 'TEmp', aboutme: 'A Computer Science student at &lt;br&gt;The University Canada.&lt;br&gt; &lt;br&gt;A Software Engineer' }; })();
has comment: http://stackoverflow.com/comment/39306707
type: AnsweredQuestion

http://stackoverflow.com/a/40867820
has body: Unfortunately for you, the bug has been marked as : Labels: StaleClosed Status: WontFix by Chrome devs. You could always reopen the ticket and harass them :) https://bugs.chromium.org/p/chromium/issues/detail?id=175281
downvote count: 0
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25311205

http://stackoverflow.com/comment/39386253
has text: This answers the question, but unless the OP wants the buttons to permanently show after hover, they should probably use CSS instead of JS. Just sayin'
comment on: http://stackoverflow.com/a/25274769
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/31862360
answers question: http://stackoverflow.com/q/25257880
downvote count: 0
type: Answer
score: 2
upvote count: 2
has body: Follows the example of Breadcrumb for KendoMenu: $("#menu").kendoMenu({ select: function(e) { var breadcrumb = []; var treeView = this; $(e.item) .parents("li") .andSelf() .each(function() { var nodeText = $.trim($(this).find('span:first').text()); breadcrumb.push(nodeText); }); breadcrumb = breadcrumb.join(" &gt; "); $("#breadcrumb").text(breadcrumb); } }); jsfiddle

http://stackoverflow.com/comment/39345780
comment on: http://stackoverflow.com/q/25253391
has text: How about loading the 'loading' screen first? it may slow down the actual loading process a bit but it would help significantly from a psychological viewpoint
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25253130
has body: this.iteration = this.iteration++; this.iteration++ increments the property, but it then returns the original value. The assignment to the left sets it back to the original value. Maybe you wanted just this.iteration++;
type: AcceptedAnswer
score: 4
type: Answer
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/39345224
accepted answer of: http://stackoverflow.com/q/25253101
answers question: http://stackoverflow.com/q/25253101

http://stackoverflow.com/comment/39391147
has text: [continued from last comment] mobile operator and OEM driver updates will be available when the official update for your phone is available. This means that operating system updates haven’t gone through all of the detailed testing with regards to your phone’s mobile service and hardware, so you might experience some bugs." So, the OEM (for me being Nokia) might not have provided a compatible camera driver update for Windows Phone 8.1. However, the Nokia Camera app works well. If it was the driver problem, how could this be?
comment on: http://stackoverflow.com/q/25249339
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25383782
has body: You will need to enable CORS. Please check link to enable in php scripts. http://enable-cors.org/server_php.html
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25383637
has comment: http://stackoverflow.com/comment/39586947
has comment: http://stackoverflow.com/comment/39586688
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25383637
type: Answer

http://stackoverflow.com/comment/39628969
comment on: http://stackoverflow.com/a/25386443
has text: Thanks JDB, I can get this working (with flickers) if I put a setTimeout or setInterval outside the function to start it off. I don't see otherwise how the ajax can initially start the function that it is within... As well, I am wondering if the visible_id is not set to id2 before the function runs every time. As with my other code, when I try to fix these issues, I get updates, but with blinking....I really wonder where this is falling down.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25240273
tagged with: javascript
has comment: http://stackoverflow.com/comment/39321343
answer count: 1
favorite count: 0
upvote count: 2
tagged with: requirejs
has title: How would requirejs be used to modularize this snippet?
type: AnsweredQuestion
score: 1
has body: I'm trying to wrap my head around modular front-end development, and trying to modularize some simple code as an exercise. I've read about requirejs and browserify, but I don't really fully understand yet if and how it would apply to what I'm trying to accomplish (it seems to be geared more towards nodejs and app development). To keep it simple, let's say I have the following google analytics snippet from the html5 boilerplate: /* Google Analytics: change UA-XXXXX-X to be your site's ID. */ (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; e=o.createElement(i);r=o.getElementsByTagName(i)[0]; e.src='//www.google-analytics.com/analytics.js'; r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); ga('create','UA-XXXXX-X');ga('send','pageview'); What I'd like to do is replace the 'UA-XXXXX-X' string with a variable, that can be declared when someone wants to use the analytics snippet. A bit like the following pseudo code: main.js: var myGoogleId = 'UA-12345-0'; analytics-module.js /* Google Analytics: change UA-XXXXX-X to be your site's ID. */ (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; e=o.createElement(i);r=o.getElementsByTagName(i)[0]; e.src='//www.google-analytics.com/analytics.js'; r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); ga('create',myGoogleId);ga('send','pageview'); index.html &lt;html&gt; ... &lt;script src="main.js"&gt;&lt;/script&gt; &lt;script src="lib/analytics-module.js"&gt;&lt;/script&gt; ... &lt;/html&gt; That way the google analytics snippet could be managed with a dependency manager like bower for example, and the google user-id would be the only part of the code that would be actually variable. So how would I use requirejs to modularize this type of snippet (regardless of whether that would be the sensible thing to do here)?
has answer: http://stackoverflow.com/a/25241009
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39320737
has comment: http://stackoverflow.com/comment/39321448
has comment: http://stackoverflow.com/comment/39321112
accepted answer: http://stackoverflow.com/a/25241009

http://stackoverflow.com/q/25381559
tagged with: javascript
tagged with: angularjs
has answer: http://stackoverflow.com/a/25381650
type: AnsweredQuestion
type: Question
has title: Stop AngularJS Instant Search
accepted answer: http://stackoverflow.com/a/25381650
has body: I have built a simple search form in my AngularJS app, that as you type uses the built in filter magic of angular to filter a list of phones. I've wrapped mine in a form as when the user submits the form it ALSO does the filter, but creates a query string so you can navigate away from the list and return etc. HTML: Filter: JS: phonecatControllers.controller('PhoneListCtrl', ['$scope', 'Phone', '$location', function($scope, Phone, $location) { $scope.query = $location.search()['q']; $scope.queryChanged = function () { $location.search('q', $scope.query) } $scope.phones = Phone.query(); $scope.orderProp = 'age'; }]); What I want to do is disable the instant search, so the user ONLY submits the form and never gets the results on keyup alone. How do I do this?
score: 0
answer count: 1

http://stackoverflow.com/q/25259216
upvote count: 2
answer count: 3
downvote count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39356140
favorite count: 0
has comment: http://stackoverflow.com/comment/39356195
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25259385
has body: Export Model Name Add Category Category Remove Name Add SubCategory Add Chart I have some fieldsets where I want to add more inside of each other to build a tree of elements. My problem is that a "category" fieldset can only have another category or a chart. So what I am trying to do is to remove the "Add chart" button when pressing "Add category". The buttons are at the same level inside the fieldset but cant figure it out how to stop the search there (it deletes button from lower levels). Can someone help me? Scripts: function addCategory(btn) { var $addCategory = " "; $addCategory += " Category " + removeButton + " "; $addCategory += '@Html.Label("Name")'; $addCategory += '@Html.TextBox("name")'; $addCategory += " "; $addCategory += addCategoryButton; $addCategory += addChartButton; $addCategory += " "; $(btn).parent().children().find(".add-chart-but").remove(); $(btn).parent().append($addCategory); $(document).on("click", ".del-but", remove); } function addChart(btn) { var $addChart = " "; $addChart += " Chart " + removeButton + " "; $addChart += '@Html.Label("Name")'; $addChart += '@Html.TextBox("name")'; $addChart += " "; $addChart += addSerieButton; $addChart += addDetailButton; $addChart += " "; $(btn).parent().append($addChart); $(document).on("click", ".del-but", remove); } function remove() { $(this).parent().parent().remove(); } Found a solution: Replaced: $(btn).parent().children().find(".add-chart-but").remove(); with: $(btn).siblings(".add-chart-but").remove();
score: 1
has answer: http://stackoverflow.com/a/25259348
type: Question
has title: How to select elements on the same level only
has answer: http://stackoverflow.com/a/25259367
tagged with: javascript

http://stackoverflow.com/comment/39344301
comment on: http://stackoverflow.com/q/25252646
type: Comment
score: 1
has text: Why don't you use HTML entities?
type: QuestionComment

http://stackoverflow.com/q/25281304
has body: I want to select elements with a specific class, but only when they are visible. I'm trying to do this using Ext.dom.Query. According to this documentation, it should be possible using CSS value selectors. I tried it with the following seletor Ext.query('.x-box-scroller{display=none}') but it results in an SyntaxError: An invalid or illegal string was specified Many thanks for your help!
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25281589
has title: ExtJS - Select visible element using Ext.dom.Query
tagged with: javascript
tagged with: extjs
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25281589

http://stackoverflow.com/comment/39476054
has text: Did you put your PHP in the backend, didn't you? I mean, Javascript runs on the client (browser's user) but PHP runs on a server with a PHP interpreter, the code you're showing us seems to put your PHP code below JS code, but I supose you have put your PHP code inside a file named *mail.php* in the same folder than your HTML file on the server... If so, where's the problem? You're just telling us that *you're having problems incorporating this in your script*, which problems?
comment on: http://stackoverflow.com/q/25323962
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39477709
comment on: http://stackoverflow.com/a/25324939
score: 2
has text: I'm not defensive. jQuery is not past technology. It's a library in use by trillions of websites. CSS3 is still in it's infancy.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25372601
has answer: http://stackoverflow.com/a/25372750
tagged with: javascript
has body: I made a bootply that won't generate a link, so here's my settings that I threw in there. I want to have jQuery add a class to another div when this dropdown is triggered, and remove the class when the dropdown is hidden. CSS: .halfOpacity { opacity: .5; } #switchMenu { top: 100px; } #siteData { color: #FFF; background-color: #000; } Javascript: $('#switchDropdown').on('show.bs.dropdown', function(){ $('#siteData').addClass('halfOpacity'); }); $('#switchDropdown').on('hide.bs.dropdown', function(){ $('#siteData').removeClass('halfOpacity'); }); HTML: Test Link HORRAY!!!! Some Stuff Moar stuff Even moar stuffs Right now the jQuery never gets called based off of the actions that Bootstrap says happen.
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25372750
has title: Trigger jQuery on Bootstrap dropdown toggle
type: Question
tagged with: twitter-bootstrap
tagged with: css
score: 0
answer count: 1

http://stackoverflow.com/q/25372878
has answer: http://stackoverflow.com/a/25372939
type: Question
accepted answer: http://stackoverflow.com/a/25373125
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25372939
tagged with: css
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25372955
has body: I have created a menu bar using a UL list. When hovering over one of the 4 links it changed colour, what I would like is an expanding animation almost similar to http://jsfiddle.net/xnTZq/6/ just not changing shape, it changing its colour and possibly expanding into the shape. Below is my HTML and CSS code. HTML: Home Portfolio Gallery Contact CSS: .menu { width: 960px; height: 35px; text-align: center; background-color: #17ADE0; } .menu ul { height: auto; padding: 8px 0px; margin: 0px; } .menu li { display: inline; padding: 20px; } .menu a { text-decoration: none; color: #FFF; padding: 8px 20px 6px 20px; -moz-border-radius-topright: 50px; -webkit-border-top-right-radius: 50px; -moz-border-radius-bottomright: 50px; -webkit-border-bottom-right-radius: 50px; -moz-border-radius-topleft: 50px; -webkit-border-top-left-radius: 50px; -moz-border-radius-bottomleft: 50px; -webkit-border-bottom-left-radius: 50px; } .menu a:hover { color: #17ADE0; background-color: #FFF; } .menu a:active { color: #17ADE0; background-color: #FFF; } #active a { color: #17ADE0; background-color: #FFF; } .menuinfo { width: 960px; height: 35px; } If you require more of my code let me know.
type: AnsweredQuestion
has title: Create expanding animation on button
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25373125
has comment: http://stackoverflow.com/comment/39566466

http://stackoverflow.com/a/25372286
has body: Maybe you are removing the div when its not even created. do something like this : $(function(){ $("#id").remove(); }); This will make sure the DOM is ready. Also see to it that your id is unique!
type: Answer
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25372180
upvote count: 3

http://stackoverflow.com/q/25266322
has title: SignalR Client error when trying to connect to server with connection.Start()
tagged with: signalr
type: Question
upvote count: 4
tagged with: c#
answer count: 1
downvote count: 0
tagged with: javascript
score: 4
has body: I'm using the stocks SignalR example from ASP.NET website: http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/tutorial-server-broadcast-with-signalr-20 The server is running fine and the JavaScript clients are working as they are supposed to and communicating between one another. The server and JavaScript client are running on IIS. The JavaScript client is at: http://192.168.1.5:8080/RTStreamer/SignalR.Sample/StockTicker.html Now I'm trying to do a C# Windows Forms client but without success: private void Form1_Load(object sender, EventArgs e) { var connection = new HubConnection("http://192.168.1.5:8080/RTStreamer/signalr"); IHubProxy proxy = connection.CreateHubProxy("StockTickerHub"); try { connection.Start().Wait(); var stocks = proxy.Invoke&lt;IEnumerable&lt;Stock&gt;&gt;("GetAllStocks").Result; } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } I'm getting this error when trying the connection.Start(): System.AggregateException: One or more errors occurred. ---&gt; Microsoft.AspNet.SignalR.Client.HttpClientException: StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Transfer-Encoding: chunked Cache-Control: private Date: Tue, 12 Aug 2014 13:46:31 GMT Server: Microsoft-IIS/8.5 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Content-Type: text/html; charset=utf-8 } at Microsoft.AspNet.SignalR.Client.Http.DefaultHttpClient.&lt;&gt;c__DisplayClass2.&lt;Get&gt;b__1(HttpResponseMessage responseMessage) at Microsoft.AspNet.SignalR.TaskAsyncHelper.&lt;&gt;c__DisplayClass19`2.&lt;Then&gt;b__17(Task`1 t) at Microsoft.AspNet.SignalR.TaskAsyncHelper.TaskRunners`2.&lt;&gt;c__DisplayClass3a.&lt;RunTask&gt;b__39(Task`1 t) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Thread…
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25266614

http://stackoverflow.com/comment/39351523
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25248562
type: Comment
has text: Unfortunately I have large project without free licence. Problem with tabview next: if I programmatically delete node on deactive tab then all endpoints are moved to the left-top corner of parent division. By moving elements with endpoints they has correct positions but only after drag... Sorry for bad English =)

http://stackoverflow.com/a/25239844
score: 0
answers question: http://stackoverflow.com/q/25239771
type: Answer
has body: You can get the day of the week, using Date.getDay(). Hide it for day 6 and 0 then.

http://stackoverflow.com/a/31583860
has comment: http://stackoverflow.com/comment/51142478
score: 3
upvote count: 4
has body: Add the cordova.js link to the html file being loaded into your ifame.
answers question: http://stackoverflow.com/q/25300324
type: Answer
has comment: http://stackoverflow.com/comment/51153748
has comment: http://stackoverflow.com/comment/51189893
downvote count: 1

http://stackoverflow.com/a/25305012
has comment: http://stackoverflow.com/comment/39441034
has comment: http://stackoverflow.com/comment/39441003
has body: If you insist on doing this with JS, then add it to the form using a hidden input. &lt;form id="myForm" action="po1.html"&gt; &lt;input type="submit" value="Submit"&gt; &lt;/form&gt; &lt;script&gt; document.getElementById('myForm').addEventListener('submit', getVals); function getVals(event) { var e = document.getElementById("Features"); var strUser = e.options[e.selectedIndex].value; var hidden = document.createElement('input'); hidden.type = "hidden"; hidden.name = "foo"; hidden.value = strUser; event.target.appendChild(hidden); } &lt;/script&gt; … but it would make more sense to just put the select element in the form.
score: 0
has comment: http://stackoverflow.com/comment/39443851
type: Answer
has comment: http://stackoverflow.com/comment/39441058
has comment: http://stackoverflow.com/comment/39441097
answers question: http://stackoverflow.com/q/25304952
has comment: http://stackoverflow.com/comment/39440921

http://stackoverflow.com/comment/39438382
has text: after ajax calling, remove() existing #myselect, then create a new one with same id and previous options and the new option, and again reinitialise it..
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25302785

http://stackoverflow.com/comment/39363838
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25262815
score: 1
has text: THANKS putvande!! That did the trick. So easy, i really should have thought of that. Thank you again. document.getElementById('weekdate').onchange = function() { document.getElementById('selectedweekhidden').value = this.value; }

http://stackoverflow.com/q/25274997
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25292661
has title: jsPDF adding wrong spaces to table
type: Question
tagged with: javascript
tagged with: jspdf
has answer: http://stackoverflow.com/a/25292661
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to turn an html table into a pdf using jsPDF's fromHTML function. This works for the most part, but for one of my screens the table is being incorrectly added. Here are images showing the input on screen, and the output, as well as the output that is correctly being generated from another section of the screen. Here is the HTML for the table: {{ report.leftHeader }} {{ report.rightHeader }} Difference {{ metric.label }} To help decipher what is happening for those who don't know angular, the table adds a body row for each value in the array of leftMetrics, and within each row will either display an input box if it is editable or a span if read only or printing to pdf. The " | numberFormat..." is an angular filter which just acts to change the display of the value to be currency, decimal, integer, etc. As you can see, there are no line breaks within the span, but for whatever reason jsPDF is adding them. I have tried removing the filters to ensure those aren't adding the breaks, but that changed nothing. I have been looking through the source for the function, and can't see anything in there that would be adding breaks either. Has anyone seen this problem before, or have any clues as to where I should look next to find a solution to this problem?
score: 2

http://stackoverflow.com/comment/39354058
has text: What this is used for will depend on how the library where this code is interprets this, may be a method invocation also.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25257979

http://stackoverflow.com/a/25324729
has body: Space between body and :not. It means it select its successors. $("body :not(.special)").click(function () { alert('test'); }); JSFiddle: http://jsfiddle.net/vv9L1eog/2/ Update: alert in the whole page except special DOM You need to bind on html instead of body when you mean whole page. $("html").click(function (e) { if (!$(e.target).is('.special')) { console.log(e.target); alert('test'); } }); Besides, your tag is a block-level element. The special DOM in your example is the whole row in the page. If you want to only disable click on the special text, wrap your text to a inline element. As: normal normal normal normal normal special normal normal Updated Fiddle: http://jsfiddle.net/vv9L1eog/7/
downvote count: 0
score: 3
answers question: http://stackoverflow.com/q/25324715
upvote count: 3
has comment: http://stackoverflow.com/comment/39477385
type: Answer

http://stackoverflow.com/q/25275649
answer count: 1
has answer: http://stackoverflow.com/a/25276082
has title: rerouting a URL with querystring through an anchor link
has body: The setup is basically having Page A with anchor links as such &lt;a href="/index.php/iframe-wrapper?http://www.[desired link].com"&gt; upon click, the URL is written as such in the users browser http://www.[site].com/index.php/iframe-wrapper?http://www.[desired link].com an iframe calls what comes after the querystring through javascript and displays it in the frame through var query = window.location.search.slice(1); basically being able to have URLs on Page A display in an iframe on Page B im stumped on how to remove the querystring from the end result (maybe through htaccess?) (as it is modifiable on any user browser leading to all sorts of vulnerabilities) if anyone would be able to help me out with htaccess or some other similar method, i will be deeply grateful
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
tagged with: string
tagged with: .htaccess
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 0

http://stackoverflow.com/q/25269406
has comment: http://stackoverflow.com/comment/39376070
has comment: http://stackoverflow.com/comment/39376008
score: 5
linked to: http://stackoverflow.com/q/307179
upvote count: 5
has comment: http://stackoverflow.com/comment/39375032
has comment: http://stackoverflow.com/comment/39375245
tagged with: javascript
linked to: http://stackoverflow.com/q/8663298
tagged with: type-conversion
has comment: http://stackoverflow.com/comment/39376092
accepted answer: http://stackoverflow.com/a/25270054
has comment: http://stackoverflow.com/comment/39375921
answer count: 1
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/13502398
has comment: http://stackoverflow.com/comment/39375246
has title: Working with an API in javascript which uses IDs above JS max integer
has comment: http://stackoverflow.com/comment/39375141
has comment: http://stackoverflow.com/comment/39375256
has comment: http://stackoverflow.com/comment/39376011
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25270054
has body: I am building a Node backend which pulls data from the Vine API, and returns this to my front end. The IDs for posts and users are of type Number, and they frequently exceed the maximum integer that javascript can support, according to this question. An example ID from the API is 934416748524998656. When I use JSON.parse on the front end it replaces those last 2 digits with 0, because it can't read a number that high This causes problems when I try to talk to the API with specific IDs, as it now doesn't recognise the ID. Is there anything, short of creating a new service in another language, that I can do to work with these IDs? I tried using toString() to interpret the numbers as strings instead, but that just creates a string of the already malformed number. Thanks for any help
has comment: http://stackoverflow.com/comment/39375531
has comment: http://stackoverflow.com/comment/39374889
type: Question

http://stackoverflow.com/comment/39456480
type: Comment
comment on: http://stackoverflow.com/a/25312977
score: 0
type: AnswerComment
has text: yes, you are correct, your fiddle are real time mouseleave ^^ thankyou.

http://stackoverflow.com/q/25263053
type: UnansweredQuestion
tagged with: google-api
has answer: http://stackoverflow.com/a/25272922
linked to: http://stackoverflow.com/q/17672709
downvote count: 0
score: 1
has body: I have added 'Sign in with Google+' to a website, using javascript. Using the following code gapi.client.load('plus','v1', function(){ var request = gapi.client.plus.people.get({ 'userId': 'me' }); request.execute(function(resp) { console.log(resp); }); My HTML is this Login with Google+ I have this at the bottom of my page: var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; //po.src = 'https://apis.google.com/js/client:plusone.js'; po.src = 'https://apis.google.com/js/client:plusone.js?onload=render'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); function render() { gapi.signin.render('customBtn', { 'callback': 'signinCallback', 'clientid': '410303772734-t1k0lsm5f83lvrpbglgdbu71kj8gqsdv.apps.googleusercontent.com', 'cookiepolicy': 'single_host_origin', 'requestvisibleactions': 'http://schema.org/AddAction', 'scope': 'https://www.googleapis.com/auth/plus.profile.emails.read' });` This all creates the button and I can login ok. The login response includes ..."emails":[{"value":"mine@gmail.com","type":"account"}], ... The data return from Google includes an array called Emails. The array contains only the Primary email address associated with my account. How do i get all the other emails associated with the account? There are definitely other emails, I have added them today myself. I have checked the following, but none seem to have the answer: Pulling out user details from Google Plus by email address Google OAuth API to get user's email address? How to get email address along with people list in google plus API https://developers.google.com/+/api/oauth
type: Question
linked to: http://stackoverflow.com/q/24442668
linked to: http://stackoverflow.com/q/20942813
tagged with: javascript
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: google-plus
has title: Google+ api: Get users alternate email addresses
favorite count: 0

http://stackoverflow.com/comment/39323541
type: Comment
has text: I've removed the `c` tag. This question is about JavaScript, not C. (The C example in the question *is* useful to understanding what you want, though.)
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25241810

http://stackoverflow.com/comment/39705240
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25370646
has text: ExtJs 3.4 have a submitValue property, try this, add submitValue: true to your component's config. Unfortunatelly i have not found this version(3.1) in sencha documentation

http://stackoverflow.com/comment/74221643
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25367445
type: QuestionComment
has text: $('omsc-accordion').click(function() dot is missing from the selector. it should be $('.omsc-accordion').click(function()

http://stackoverflow.com/comment/39437116
type: Comment
has text: The answer below is decent enough, but I'd say this is the neater solution! Thanks!
comment on: http://stackoverflow.com/a/25290371
type: AnswerComment
score: 0

http://stackoverflow.com/a/25361064
type: Answer
has body: I am not sure of your context so cant say exactly. Also i dont know if you are using exact same code as above or you have written teh above code in a hurry since there are mistakes there!!! However Firstly try these data: { "performance_rating": performance_rating }, url: "&lt;?php=CAR_USER_RATINGS?&gt;" //you have forgotten php success : function(data, testStatus, xhr){ }, and check each values of data, testStatus, xhr Also what is the value of performace_Rating before $.ajax "&lt;?php=CAR_USER_RATINGS?&gt;" before $.ajax
has comment: http://stackoverflow.com/comment/39543433
has comment: http://stackoverflow.com/comment/39543524
score: 0
has comment: http://stackoverflow.com/comment/39543589
answers question: http://stackoverflow.com/q/25360904

http://stackoverflow.com/a/25271183
accepted answer of: http://stackoverflow.com/q/25270848
type: Answer
answers question: http://stackoverflow.com/q/25270848
score: 1
upvote count: 1
has body: Unless I'm going blind you're missing ( and ) around your if statement. Give this a shot: on_sent_ok: "if (document.getElementByName('review_stars').value=='4' || document.getElementByName('review_stars').value=='5'){location = 'http://74.208.11.118:8085/review-submission/'} else { location = 'http://74.208.11.118:8085/review-thank-you/'};"
has comment: http://stackoverflow.com/comment/39380768
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39547351
comment on: http://stackoverflow.com/q/25363191
score: 0
type: QuestionComment
has text: possible duplicate of [Triggering onclick event using middle click](http://stackoverflow.com/questions/1795734/triggering-onclick-event-using-middle-click)
type: Comment

http://stackoverflow.com/q/25316410
tagged with: angularjs
upvote count: 7
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/39463420
possible better answer: http://stackoverflow.com/a/54072454
has comment: http://stackoverflow.com/comment/39464238
has comment: http://stackoverflow.com/comment/39462172
has body: I have the following {{history.reference_code}} {{items.product_description}} {{items.quantity}} it seems that the second ng-repeat is not working and {{items.quantity}} or items . anything does not end up showing. any ideas? When i just test it out like so it works {{items.product_description}} but i really need it inside the table I tried the following: {{history.reference_code}} {{items.product_description}} {{items.quantity}} and still does not work
type: AnsweredQuestion
has title: angular ng-repeat inside of ng-repeat not working in table
score: 7
has comment: http://stackoverflow.com/comment/39462137
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/54072454
has answer: http://stackoverflow.com/a/25316531
accepted answer: http://stackoverflow.com/a/25316531
downvote count: 0
linked to: http://stackoverflow.com/q/19839743
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/39441162
has text: Well, I don't get your point of view, you don't get mine so let's just end this topic. Peace
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25303519
type: Comment

http://stackoverflow.com/comment/39398356
score: 0
type: AnswerComment
has text: I copied ur code, nothing happen..
type: Comment
comment on: http://stackoverflow.com/a/25282070

http://stackoverflow.com/comment/39559702
score: 0
type: AnswerComment
has text: The overlayview is only a helper to grab the correct div. Markers are still appended to the global map instance as always. I made a bl.ocks for you to check http://bl.ocks.org/amenadiel/f4e5bd78b214ff081254
type: Comment
comment on: http://stackoverflow.com/a/25367993

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/25370758
tags question: http://stackoverflow.com/q/25289688
tags question: http://stackoverflow.com/q/25252977
tags question: http://stackoverflow.com/q/25350895
type: Tag
tags question: http://stackoverflow.com/q/25244277
tags question: http://stackoverflow.com/q/25352038

http://stackoverflow.com/q/25329135
favorite count: 0
has comment: http://stackoverflow.com/comment/39488185
type: AnsweredQuestion
has title: WebRTC: Firefox unable to recieve video as callee
upvote count: 3
has comment: http://stackoverflow.com/comment/39489872
has answer: http://stackoverflow.com/a/25335438
accepted answer: http://stackoverflow.com/a/25335438
has body: I'm new to WebRTC and am trying to create a simple test page that allows for 1-to-1 video conferences. So far what I have below works for the following: Chrome -> Chrome Firefox -> Chrome It does not work in the following situations: Firefox -> Firefox Chrome -> Firefox Basically, Firefox is unable to receive the remote video stream when it is the callee. The onaddstream handler is never called, but I do not know why. The only difference I have found between Firefox and Chrome is that Firefox does not trickle ICE candidates; they are included in the initial offer/answer creation causing the onicecandidate handler to never be called with a non-null candidate. On the other hand, Chrome does trickle candidates which are sent to the signaling server as separate messages. I'm not sure if this a/the potential problem or not. I am testing with Firefox Nightly 34 and Chrome 36. The signaling server is hosted in my LAN and both browsers are running on the same computer. The following code was based off of http://www.html5rocks.com/en/tutorials/webrtc/basics/. var localVideo; var remoteVideo; var peerConnection; var peerConnectionConfig = {'iceServers': [{'url': 'stun:stun.services.mozilla.com'}, {'url': 'stun:stun.l.google.com:19302'}]}; var isCaller; navigator.getUserMedia = navigator.getUserMedia || navigator.mozGetUserMedia || navigator.webkitGetUserMedia; window.RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection; window.RTCIceCandidate = window.RTCIceCandidate || window.mozRTCIceCandidate || window.webkitRTCIceCandidate; window.RTCSessionDescription = window.RTCSessionDescription || window.mozRTCSessionDescription || window.webkitRTCSessionDescription; function pageReady() { localVideo = document.getElementById('localVideo'); remoteVideo = document.getElementById('remoteVideo'); serverConnection = new WebSocket('ws://myserver:3434'); serverConnection.onmessage = gotMessageFromServer; } function start(_isCaller) {…
tagged with: google-chrome
type: Question
score: 3
tagged with: firefox
downvote count: 0
tagged with: webrtc
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/25270851
type: Question
linked to: http://stackoverflow.com/q/8431615
has title: How does jQuery chain functions while still returning an array?
tagged with: function
linked to: http://stackoverflow.com/q/7475336
tagged with: javascript
has comment: http://stackoverflow.com/comment/39377771
tagged with: jquery
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39377539
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/39377909
has comment: http://stackoverflow.com/comment/39377787
has comment: http://stackoverflow.com/comment/39377632
has comment: http://stackoverflow.com/comment/39377496
has comment: http://stackoverflow.com/comment/39377709
has comment: http://stackoverflow.com/comment/39378098
duplicate of: http://stackoverflow.com/q/7475336
score: 2
has comment: http://stackoverflow.com/comment/39379341
linked to: http://stackoverflow.com/q/7261670
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25271078
accepted answer: http://stackoverflow.com/a/25271078
has body: Having read How does jQuery accomplish chaining of commands? and how does jquery chaining work? I am still left to wonder how something like this is possible in jQuery var a = $('body') // a returns [&lt;body&gt;&lt;/body&gt;], an array. a.click() // Seems like this should return an error if a returns an array, not a function. The linked SO answers have only told me how to do things like a.b().c() It's the a() I still don't understand. I understand that chaining works by returning this but then how does it also return an array by itself?

http://stackoverflow.com/a/25381269
downvote count: 0
type: Answer
has body: You should always separate as much as possible the server-side from client-side, else you'll end up having a hard to mantain, not understandable and error prone code. That being said, you can convert your map to JSON and send that json to the client-side, so it can be handled as you want: &lt;script&gt; var statesJSON = JSON.parse( &lt;%= net.sf.json.JSONSerializer.toJSON(states) %&gt; ); &lt;/script&gt; Now you can write your client-side code (regarding the population of the drop-down lists) by using the statesJSON global variable. You can follow these links for how to populate a drop-down list based on selection on another : populate-one-dropdown-based-on-selection-in-another populate-one-dropdown-list-based-on-the-selection-of-other-dropdown-list populate-a-second-drop-down-menu-depends-upon-first-drop-down-selection
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39653762
answers question: http://stackoverflow.com/q/25303420

http://stackoverflow.com/a/25242483
has body: This is not planned https://code.google.com/p/dart/issues/detail?id=11239 It is suggested to use some of the other supported editors/IDEs like WebStorm/IntelliJ IDEA, Sublime Text, Eclipse Dart plugin, ... if you need such features.
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25239768
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25239768

http://stackoverflow.com/comment/39468170
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25319518
has text: cgatian! I will try this first thing when I get to work tomorrow. Thank you.
type: AnswerComment

http://stackoverflow.com/comment/39591161
has text: Extension ID: 63472 - No errors for CTRL+SHIFT+K, but for CTRL+SHIFT+J there were a lot of lines, there where few errors, but I believe none of those was from crossrider
score: 0
comment on: http://stackoverflow.com/q/25362814
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25357872
tagged with: dom-events
has title: Capture value on page submit
has comment: http://stackoverflow.com/comment/39538020
has comment: http://stackoverflow.com/comment/39584011
has comment: http://stackoverflow.com/comment/39574452
has comment: http://stackoverflow.com/comment/39541089
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39573058
type: UnansweredQuestion
score: -3
has comment: http://stackoverflow.com/comment/39571790
has body: I am a web developer, in my application I have a form and text box. If I type any text in the text box and when I submit the value it is not getting captured, but its taking the default value. It should capture the textbox value before refreshing, and the captured data will be passed to the API as parameter. I am unable to capture data, but in Firefox this is working as I expected. How can I do this?
has answer: http://stackoverflow.com/a/25383033
downvote count: 3
has comment: http://stackoverflow.com/comment/39537549
type: Question
upvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39362320
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25262675
type: QuestionComment
has text: Try `str.match(/ /g).length`

http://stackoverflow.com/q/25265593
answer count: 2
tagged with: button
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25268602
favorite count: 0
has comment: http://stackoverflow.com/comment/39370278
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39367677
has comment: http://stackoverflow.com/comment/39370842
has title: How to sync checkbox inside toggle button in AngularJS?
accepted answer: http://stackoverflow.com/a/25269841
tagged with: checkbox
has comment: http://stackoverflow.com/comment/39367775
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39375453
has comment: http://stackoverflow.com/comment/39369813
upvote count: 2
has body: I have a checkbox inside button: &lt;button ng-mousedown="active = !active"&gt; &lt;input type="checkbox" ng-checked="active"/&gt; Toggle! &lt;/button&gt; Clicking the button toggles state variable "active". I want to sync the checkbox with "active". If I declare ng-model="active", the box is in sync with the button as long as the button is pressed outside the checkbox. The problem is when the checkbox is clicked, it changes the state but also sends click event to the button, so both events fire and as a result, the box becomes out of sync: http://jsbin.com/wepul/7/edit The sync behaviour is restored when using ng-click instead of ng-mousedown, however, I prefer to use the latter as this way it feels more responsive (the button reacts faster). Is there any (Angular) way I can keep the box in sync and keep the ng-mousedown?
type: Question
has answer: http://stackoverflow.com/a/25269841
has answer: http://stackoverflow.com/a/25268602

webbrowser-control
type: Tag
tags question: http://stackoverflow.com/q/25268043
tags question: http://stackoverflow.com/q/25355386
tag name: webbrowser-control
tags question: http://stackoverflow.com/q/25262029

http://stackoverflow.com/comment/39409455
has text: What is `n`? Have you tried anything thus far?
score: 0
comment on: http://stackoverflow.com/q/25288223
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39391105
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25278178
has text: Do you have interceptors !
score: 0

http://stackoverflow.com/q/25350556
answer count: 4
type: AnsweredQuestion
tagged with: jquery-ui
accepted answer: http://stackoverflow.com/a/25350631
has answer: http://stackoverflow.com/a/27369974
has answer: http://stackoverflow.com/a/26213022
type: Question
has answer: http://stackoverflow.com/a/25350631
tagged with: javascript
score: 4
has title: How to align jQuery UI selectmenu with buttons?
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/26213022
tagged with: css
favorite count: 0
has body: I've been struggling with this for a while (I'm really not experienced with jQuery UI). I'm trying to implement a jQuery UI that has a selectmenu next to some regular buttons. For some reason I can't understand, the selectmenu is mis-aligned; it's way higher up on the page than the buttons. Here's what it looks like: I'm not sure if this is a bug or not, it sure looks very wrong to me. I've been struggling for quite a while now but haven't been able to figure it out. The markup is really very basic so I don't think it's very helpful to include it here., but it's all here: http://jsbin.com/afixij/10/edit?html,css,js,output. Widen the Output to see all three elements (the selectmenu, and the buttons Foo and Bar) on the same line.
upvote count: 5
has answer: http://stackoverflow.com/a/38983208
downvote count: 1

http://stackoverflow.com/comment/39518295
type: AnswerComment
type: Comment
has text: Thank you. I can only let javascript generate a one time key. Will it still work? So how do I obtain the file name of the page that makes the request?
comment on: http://stackoverflow.com/a/25344791
score: 0

http://stackoverflow.com/comment/64795817
has text: Just a heads up, `port` is no longer a function. In the above example: `server.address().port` will work.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/30409142
type: AnswerComment

http://stackoverflow.com/comment/39377632
comment on: http://stackoverflow.com/q/25270851
type: Comment
has text: Would you provide an example of this fake array, upgrading of an array as an answer, please?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39325101
type: Comment
comment on: http://stackoverflow.com/a/25242811
score: 1
type: AnswerComment
has text: and also use of `delay` variable seems useless.

http://stackoverflow.com/comment/39543140
type: Comment
type: QuestionComment
has text: @Teemu karan3112's solution not working.I will try debouncer though
comment on: http://stackoverflow.com/q/25360670
score: 0

http://stackoverflow.com/q/25262300
tagged with: javascript
answer count: 3
possible better answer: http://stackoverflow.com/a/25262438
has answer: http://stackoverflow.com/a/25262403
linked to: http://stackoverflow.com/q/13793550
favorite count: 0
has title: javascript function after pressing enter key on text box
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25262438
score: 1
has body: I have a text input &lt;input type="text" name="invCode_' + count + '" style="height:15px;width:55px;" onchange="loadPIEname(this,' + count + ' );"/&gt; and a javascript function for doing some function that works fine.But How to make the function call when i press enter key on that text box? thanks in advance.
has answer: http://stackoverflow.com/a/25262381
type: Question
upvote count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/25262403

object-literal
tag name: object-literal
tags question: http://stackoverflow.com/q/25354154
type: Tag
tags question: http://stackoverflow.com/q/25373907

http://stackoverflow.com/comment/39403479
comment on: http://stackoverflow.com/q/25284961
type: QuestionComment
has text: Open the page in a browser, hit F12 and look in the console; it will display any errors. (for document.loandata to work the name attribute must be "loandata" it will not if its the id)
score: 1
type: Comment

http://stackoverflow.com/comment/39520546
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25348502
has text: @monkeyinsight okay I will take a print screen and update the question, just a minute please
score: 0

http://stackoverflow.com/comment/39411461
comment on: http://stackoverflow.com/a/25287463
score: 0
type: AnswerComment
has text: I made code updates above. The listener does not work anymore. Can you please take a look Swapnil?
type: Comment

http://stackoverflow.com/q/25255447
has answer: http://stackoverflow.com/a/25255552
tagged with: php
accepted answer: http://stackoverflow.com/a/25255552
upvote count: 2
has title: Sorting variable loses value on pagination
has body: Hello stackoverflow members. I have a little problem here i have ads site i want to sort ads by recent date, Highest, Lowest price. That works fine when ads are sorted but if pagination links are clicked again ads are sorted by default as recent ads. Most Recent Ads Price: High to Low Price: Low to High if(isset($_POST['Sort_Ads'])) { $sortit = $_POST['Sort_Ads']; if($sortit == "Most Recent Ads") $sort = "ad_id DESC"; else if($sortit == "Price: Low to High") $sort = "ad_price ASC"; else if($sortit == "Price: High to Low") $sort = "ad_price DESC"; } And this my query is "SELECT * FROM ads ORDER BY $sort $limit" which works fine. Only the problem is that sorting is restored on pagination so we only see ads sorted in first page. And one another thing is that after page refreshes the drop down is set to first option but items are sorted fine. Please any how to set the drop down value as it was before reload page? Because if user click on Sort high to low after page reloaded, the option recent ads will be selected and if he/she want to sort it by recent ads it can't be because its already selected but items are sorted as highest price or what ever option was selected before. I think it can be done with JavaScript so please i have't enough skills in JavaScript i would be really happy if somebody do this. Thank you in advance!
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39349507
type: Question
score: 2
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39349480
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/39496433
comment on: http://stackoverflow.com/q/25334408
type: Comment
type: QuestionComment
has text: Page rendering is much more complicated than a simple linear progression. Scripts at the end of the page don't "block" previous visual content from being rendered.
score: 1

http://stackoverflow.com/q/25307831
tagged with: extjs
has body: Using Extjs 3.4 I call the save() method in the store to save new records. The save() method works fine: I see the new record in the database. The problem is the save() method doesn't automatically reload the grid after save. gridStore.save(); //Ok it works but grid is not reloaded.
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/25318435
has answer: http://stackoverflow.com/a/25308849
has title: Extjs 3.4 automatic reload grid after save new records in database
has answer: http://stackoverflow.com/a/25473727
has answer: http://stackoverflow.com/a/25318435
tagged with: store
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/6527330
possible better answer: http://stackoverflow.com/a/25308849
type: Question
tagged with: javascript

caching
tags question: http://stackoverflow.com/q/25364568
tags question: http://stackoverflow.com/q/25235305
tags question: http://stackoverflow.com/q/25247436
tags question: http://stackoverflow.com/q/25316574
type: Tag
tags question: http://stackoverflow.com/q/25321175
tags question: http://stackoverflow.com/q/25278568
tags question: http://stackoverflow.com/q/25253495
tags question: http://stackoverflow.com/q/25289906
tags question: http://stackoverflow.com/q/25259853
tag name: caching

http://stackoverflow.com/a/25381200
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39754751
upvote count: 2
has body: The problem here is, that this will change all Arrays in your application and not only one. In this situation it would be better to use a new Type that extends from EventEmitter and delegates to an Array. i.e. // Create a new object that ... function MyEventArray() { // ...owns an Array as property... this.array = new Array(); } // ... and extends from EventEmitter... MyEventArray.prototype = Object.create(EventEmitter.prototype); MyEventArray.prototype.constructor = MyEventArray; // ... and has functions that delegate to the array. MyEventArray.prototype.push(obj) { this.array.push(obj); } ... // This object is an EventEmitter and can be used like an Array: var myArray = new MyEventArray(); myArray.push(someStuff);
has comment: http://stackoverflow.com/comment/44016229
accepted answer of: http://stackoverflow.com/q/25381028
has comment: http://stackoverflow.com/comment/39743136
answers question: http://stackoverflow.com/q/25381028
has comment: http://stackoverflow.com/comment/39807627
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39784399

dom-events
tags question: http://stackoverflow.com/q/25248286
tags question: http://stackoverflow.com/q/25367924
tags question: http://stackoverflow.com/q/25289295
tags question: http://stackoverflow.com/q/25253589
tags question: http://stackoverflow.com/q/25327282
tags question: http://stackoverflow.com/q/25363816
tags question: http://stackoverflow.com/q/25352038
tags question: http://stackoverflow.com/q/25259825
type: Tag
tags question: http://stackoverflow.com/q/25246406
tags question: http://stackoverflow.com/q/25244167
tags question: http://stackoverflow.com/q/25285228
tags question: http://stackoverflow.com/q/25238449
tags question: http://stackoverflow.com/q/25284755
tags question: http://stackoverflow.com/q/25323569
tag name: dom-events
tags question: http://stackoverflow.com/q/25357872
tags question: http://stackoverflow.com/q/25324096
tags question: http://stackoverflow.com/q/25367539
tags question: http://stackoverflow.com/q/25354163

http://stackoverflow.com/comment/39375292
has text: Your form config doesn't match the example given in the document.
comment on: http://stackoverflow.com/q/25269414
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39454480
has text: Well, what you describe is how it's often done.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25312208

http://stackoverflow.com/q/25346356
accepted answer: http://stackoverflow.com/a/25346410
type: Question
possible better answer: http://stackoverflow.com/a/63778950
tagged with: c#
has answer: http://stackoverflow.com/a/63778950
tagged with: javascript
score: 0
answer count: 2
tagged with: asp.net
has answer: http://stackoverflow.com/a/25346410
has title: How to call JavaScript function when binding data to asp.Net Repeater
type: AnsweredQuestion
has body: I'm trying to call a javascript function when repeater binding from the code behind. Here is the sample code that i'm tring to call javascript function: <asp:Repeater ID="summeryR" runat="server"> <%# Eval("QuestionText") %> <%# Eval("Label", "checkSkipQuestion()") %> </asp:Repeater> here is the javascript function: function checkSkipQuestion() { alert("checkSkipQuestion"); }

canvas
tags question: http://stackoverflow.com/q/25241863
tags question: http://stackoverflow.com/q/25250491
tags question: http://stackoverflow.com/q/25373345
tags question: http://stackoverflow.com/q/25346911
tags question: http://stackoverflow.com/q/25335656
tags question: http://stackoverflow.com/q/25266045
tags question: http://stackoverflow.com/q/25379477
tags question: http://stackoverflow.com/q/25291638
tags question: http://stackoverflow.com/q/25324845
tags question: http://stackoverflow.com/q/25239608
tags question: http://stackoverflow.com/q/25301552
tags question: http://stackoverflow.com/q/25262951
tags question: http://stackoverflow.com/q/25312779
tags question: http://stackoverflow.com/q/25346704
tags question: http://stackoverflow.com/q/25321889
tags question: http://stackoverflow.com/q/25265865
tags question: http://stackoverflow.com/q/25297254
tags question: http://stackoverflow.com/q/25303448
tags question: http://stackoverflow.com/q/25373455
tags question: http://stackoverflow.com/q/25277109
tags question: http://stackoverflow.com/q/25334001
tags question: http://stackoverflow.com/q/25265472
tags question: http://stackoverflow.com/q/25238297
tags question: http://stackoverflow.com/q/25282793
tags question: http://stackoverflow.com/q/25385561
tags question: http://stackoverflow.com/q/25326447
tags question: http://stackoverflow.com/q/25315758
tags question: http://stackoverflow.com/q/25353135
tags question: http://stackoverflow.com/q/25311019
tags question: http://stackoverflow.com/q/25328120
tags question: http://stackoverflow.com/q/25373139
tags question: http://stackoverflow.com/q/25272889
tag name: canvas
tags question: http://stackoverflow.com/q/25371711
tags question: http://stackoverflow.com/q/25354647
tags question: http://stackoverflow.com/q/25255731
tags question: http://stackoverflow.com/q/25326764
tags question: http://stackoverflow.com/q/25380564
tags question: http://stackoverflow.com/q/25329276
tags question: http://stackoverflow.com/q/25334413
tags question: http://stackoverflow.com/q/25246669
tags question: http://stackoverflow.com/q/25315897
tags question: http://stackoverflow.com/q/25235427
tags question: http://stackoverflow.com/q/25288246
tags question: http://stackoverflow.com/q/25243144
type: Tag
tags question: http://stackoverflow.com/q/25246893
tags question: http://stackoverflow.com/q/25354927
tags question: http://stackoverflow.com/q/25287234
tags question: http://stackoverflow.com/q/25371262
tags question: http://stackoverflow.com/q/25374512
tags question: http://stackoverflow.com/q/25321346
tags question: http://stackoverflow.com/q/25380734
tags question: http://stackoverflow.com/q/25273368
tags question: http://stackoverflow.com/q/25338481
tags question: http://stackoverflow.com/q/25327988
tags question: http://stackoverflow.com/q/25313545
tags question: http://stackoverflow.com/q/25272799
tags question: http://stackoverflow.com/q/25232053
tags question: http://stackoverflow.com/q/25284024
tags question: http://stackoverflow.com/q/25336063
tags question: http://stackoverflow.com/q/25232684

http://stackoverflow.com/comment/39559943
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25368930
score: 0
has text: @Volune, I should have used clearInterval.

http://stackoverflow.com/q/25289966
tagged with: mobile-safari
score: 4
upvote count: 4
downvote count: 0
favorite count: 0
has title: What can change the window.innerHeight inside an iframe?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
answer count: 0
tagged with: iframe
has body: I have a mobile game that has to be wrapped inside an iframe. The game page itself has code that sizes it to fit the screen normally, the requirement for an iframe is new. The game page uses a canvas surrounded by divs, which are sized using JS to fill the space around the canvas after it has been scaled to fit the size of the screen (maintaining its aspect ratio). This gets called every couple of seconds to ensure it is still correct. This has been working for a while when not inside an iframe. I've now put the game inside an iframe, which is set to fill the screen. This works fine on desktop, and on Android Chrome, but iOS 7 Safari on an iPad Air seems to have issues. The game shifts down by 4px every time the sizing update function is called and the top border expands. This seems to be happening because window.innerHeight is getting larger inside the game frame. The size of the iframe does not change, however. What can cause the iframe to have a changing window.innerHeight, if the size of the iframe itself is not changing? I feel it's likely that some of the game code is causing the change, but I can't track down which bit, as I didn't think it was possible for window.innerHeight to be changed without resizing the window. I've added a resize listener to the game, and it does seem to be fired at the same rate as the sizing update, so I assume something in there is causing the window.innerHeight to increase. I'm not sure if this is relevant or not, but it does seem to increase steadily to 1024px, at which point it stops increasing. This is the same value as window.innerWidth Update: Just tried the same code on an iPhone 5, and have the same issue, except the end values of innerHeight and innerWidth are 783 and 568.
type: Question
tagged with: javascript

http://stackoverflow.com/a/25497113
upvote count: 3
has comment: http://stackoverflow.com/comment/39977935
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/39824578
accepted answer of: http://stackoverflow.com/q/25257464
has comment: http://stackoverflow.com/comment/39877524
has comment: http://stackoverflow.com/comment/39835007
has body: The truth is, Chrome (and any reasonable browser) does not expect the favicon to ever change. They don't even show animations up there (only the first frame is frozen and displayed), though there's this feature request. The fact that you can change it at all through the DOM is somewhat of a hack. That's why the framerate is unpredictable, it's not even close to being optimized for that. Chrome (and other browsers) throttle setInterval and friends to 1 Hz when the tab is blurred, which is why the animation becomes even worse when you switch tabs. It doesn't know that your interval is acting on a currently visible UI element. There is no way to change this behavior, nor the maximum frequency, through JavaScript. Sorry.
has comment: http://stackoverflow.com/comment/139051477
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39887911
has comment: http://stackoverflow.com/comment/39851765
answers question: http://stackoverflow.com/q/25257464

http://stackoverflow.com/q/25230614
answer count: 3
upvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39301758
has comment: http://stackoverflow.com/comment/39301843
possible better answer: http://stackoverflow.com/a/25230695
downvote count: 1
has body: I have a strange problem with JQuery when I try to click on append element that is inside timeout function I got the following code: function generate(){ box = shuffle(box); console.log(box); $("#game").empty(); for (var i = 0; i &lt; 4; i++) { $("#game").append("&lt;div class=box&gt;" + box[i] + "&lt;/div&gt;"); } } function lvl1(){ box = shuffle(box); console.log(box); $("#game").empty(); for (var i = 0; i &lt; 4; i++) { $("#game").append("&lt;div class=box&gt;" + box[i] + "&lt;/div&gt;"); } } generate(); setTimeout(function(){ lvl1(); }, 1000); $(".box").click(function(){ alert("OK"); }); If I try to click on box within a 1 sec the alert is showed correctly but if I try to click after the timeout it does nothing also no error is showing http://jsfiddle.net/f4kgvaL5/
type: AnsweredQuestion
has title: JQuery append click
has comment: http://stackoverflow.com/comment/39301853
has answer: http://stackoverflow.com/a/25230718
has answer: http://stackoverflow.com/a/25230697
accepted answer: http://stackoverflow.com/a/25230697
type: Question
has answer: http://stackoverflow.com/a/25230695
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39301821
score: 0

http://stackoverflow.com/comment/39313059
has text: what is your problem, your are just saying `div` `display:none`, I'm not getting, can someone explain?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25236112

http://stackoverflow.com/comment/39320296
type: QuestionComment
type: Comment
has text: Yes it is. The onchange="markDirty();" is required on the form for the stage when it's passed back to our OpenText ECM system, so I have to have that.
score: 0
comment on: http://stackoverflow.com/q/25239941

http://stackoverflow.com/q/25319721
accepted answer: http://stackoverflow.com/a/25320045
tagged with: angularjs
upvote count: 1
tagged with: local-storage
answer count: 1
has title: Angular app breaks after loading local-storage
has answer: http://stackoverflow.com/a/25320045
type: AnsweredQuestion
downvote count: 0
has body: I am working on a simple angularjs app that creates lists and allows the user to store anything in those lists via local-storage. The user is able to save their list(s) and open them again at a later time from local-storage and continue to add items to them. The issue is that once loaded, the user is unable to add additional items to any of the lists. I am assuming that once the data is loaded I must not be working with the same objects. this.saveLists = function() { localStorage["lists"] = JSON.stringify(this.lists); }; this.loadLists = function() { this.lists = JSON.parse(localStorage['lists']); }; I've created an example over at plunker.co Is this happening because I first stringified the array and then parsed it?
tagged with: javascript
favorite count: 0
type: Question
score: 1

http://stackoverflow.com/comment/39560317
has text: OK. I'll pose it as another question.
comment on: http://stackoverflow.com/a/25368789
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39500479
comment on: http://stackoverflow.com/q/25336409
score: 0
has text: @LieRyan: Oh I thought you meant the other way round. Sorry.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39333535
comment on: http://stackoverflow.com/q/25247092
type: QuestionComment
score: 0
has text: You can have only one element with one id.
type: Comment

http://stackoverflow.com/a/25335517
answers question: http://stackoverflow.com/q/25335289
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39499771
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25335289
has body: Here is a working example, hope it will help you http://plnkr.co/edit/7rAqx9nMBuzhdEAUQpZF?p=preview You just need to use a reference $scope.selectedTicket = {};

sinatra
tags question: http://stackoverflow.com/q/25374136
tags question: http://stackoverflow.com/q/25315681
tags question: http://stackoverflow.com/q/25366669
tag name: sinatra
tags question: http://stackoverflow.com/q/25291849
type: Tag

http://stackoverflow.com/comment/50305897
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25245716
has text: You should use [chalk](http://github.com/chalk/chalk). It checks for colors being enabled or not and will automatically strip ANSI codes from your text.

http://stackoverflow.com/q/25297604
has answer: http://stackoverflow.com/a/78403185
has answer: http://stackoverflow.com/a/41709411
has title: Hidden markers appear after zoom - API Google Maps V3
tagged with: google-maps-api-3
upvote count: 3
answer count: 3
has comment: http://stackoverflow.com/comment/39427997
downvote count: 1
possible better answer: http://stackoverflow.com/a/41709411
has comment: http://stackoverflow.com/comment/39427793
accepted answer: http://stackoverflow.com/a/25297903
has comment: http://stackoverflow.com/comment/39427645
favorite count: 0
has answer: http://stackoverflow.com/a/25297903
linked to: http://stackoverflow.com/q/11248669
type: AnsweredQuestion
score: 2
has body: I have markers in a map and i use this to remove them.. function clearMarkers() { for (i in markers) { markers[i].setMap(null); } markers = []; } But when i change the zoom of the map, all markers appearing again. Does anyone know what is it? var map; var idInfoBoxOpen; var infoBox = []; var markers = []; function initialize() { var latlng = new google.maps.LatLng(-18.8800397, -47.05878999999999); var options = { zoom: 5, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("mapa"), options); } initialize(); function openInfoBox(id, marker) { if (typeof(idInfoBoxOpen) == 'number' &amp;&amp; typeof(infoBox[idInfoBoxOpen]) == 'object') { infoBox[idInfoBoxOpen].close(); } infoBox[id].open(map, marker); idInfoBoxOpen = id; } function loadPoints() { $.getJSON('assets/json/pontos.json', function(points) { var latlngbounds = new google.maps.LatLngBounds(); $.each(points, function(index, point) { var marker = new google.maps.Marker({ position: new google.maps.LatLng(point.Latitude, point.Longitude), title: "Desc", icon: 'assets/img/point.png', }); var myOptions = { content: "&lt;p&gt;" + point.Descricao + "&lt;/p&gt;", pixelOffset: new google.maps.Size(-150, 0) }; infoBox[point.Id] = new InfoBox(myOptions); infoBox[point.Id].marker = marker; infoBox[point.Id].listener = google.maps.event.addListener(marker, 'click', function (e) { openInfoBox(point.Id, marker); }); markers.push(marker); latlngbounds.extend(marker.position); }); var markerCluster = new MarkerClusterer(map, markers); map.fitBounds(latlngbounds); }); } function clearMarkers() { for (i in markers) { markers[i].setMap(null); } markers = []; } function reset(value) { clearMarkers(); } loadPoints();
type: Question
tagged with: google-maps
has comment: http://stackoverflow.com/comment/39428067
has comment: http://stackoverflow.com/comment/39427761
tagged with: javascript

http://stackoverflow.com/a/25332818
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39495405
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25331747
answers question: http://stackoverflow.com/q/25331747
score: 1
has comment: http://stackoverflow.com/comment/39495131
has body: That's what I use, might help you. Position.find( { geo : { $geoWithin : { $box : [ [ box[0] , box[1] ] , [ box[2] , box[3] ] ] } } }, function(err, response) { if (err) return err; console.log(response) }); You can also set to debug and check the result: mongoose.set('debug', true)

http://stackoverflow.com/a/25342005
answers question: http://stackoverflow.com/q/25319685
downvote count: 0
score: 1
upvote count: 1
has body: Found the problem: the jPlayer I downloaded was using deprecated .die and .live from an older version of JQuery. Simply replace those with .on and .off and you're golden. Now jPlayer works like a charm. .die = http://api.jquery.com/die/ .live = http://api.jquery.com/live/ Hope this helps. Cheers!
type: Answer

http://stackoverflow.com/comment/39414495
has text: OK... the effect is cosmetic. Good. (Consider the HTML% `<input type=range` control.)
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25288112
type: QuestionComment

http://stackoverflow.com/comment/39370102
comment on: http://stackoverflow.com/q/25266836
type: QuestionComment
type: Comment
has text: possible duplicate of [What's the best way to retry an AJAX request on failure using jQuery?](http://stackoverflow.com/questions/10024469/whats-the-best-way-to-retry-an-ajax-request-on-failure-using-jquery)
score: 0

http://stackoverflow.com/comment/39339203
has text: Also, why do you need 2 `forms`?
comment on: http://stackoverflow.com/q/25250014
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/a/25378178
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25377759
has comment: http://stackoverflow.com/comment/39576725
has body: You can use this pattern for pretty much any plugin you're wrapping; some require a bit more when they have events, etc. var Gauge = React.createClass({ // handle the first mount and updates // in this case there's no difference between init and update // with the gauge widget, so these just delegate to updateGauge componentDidMount: function(){ this.updateGauge(this.props.value, this.props.max); }, componentWillReceiveProps: function(nextProps){ if (nextProps.value !== this.props.value) { this.updateGauge(nextProps.value, nextProps.max); } }, // render an empty div, which will be `this.getDOMNode()` in the following function render: function(){ return &lt;div /&gt;; }, // actually tell the plugin to run updateGauge: function(value, max){ gauge(this.getDOMNode(), value, max); }, // clean up after the gauge widget // sometimes you don't need anything here, but if you do // you'll get a nice error from react when it's unmounted :-) componentWillUnmount: function(){ // ... } });
type: Answer
downvote count: 0
score: 3
has comment: http://stackoverflow.com/comment/39577056
upvote count: 3
answers question: http://stackoverflow.com/q/25377759

http://stackoverflow.com/q/25319008
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has body: I have the following Jquery code: $(function () { $("div[id$='xxx']").click(function () { $('.greenBorder').each(function (i, obj) { }); }); }); When a DIV called xxx is clicked, each HTML img with a class of greenBorder is iterated through. I would like to access the src attribute of each img. I can't figure out how to pull this value out. The obj function parameter contains the HTML element object, but how do I get the value out of that object? If this were C/Java/C#, I would cast it.
tagged with: attributes
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25319021
accepted answer: http://stackoverflow.com/a/25319021
type: Question
has title: JQuery get attribute from HTML element var

http://stackoverflow.com/a/25383726
type: Answer
downvote count: 0
score: 1
has body: You are creating multiple elements with the same ID and then querying with document.getElementById. This has unpredictable browser results (typically the first is returned) - you need to ensure that for each ID in your DOM, only one ID is present. With that in mind, your mouseenter function is actually broken as it is creating extra copies of the same div when it needs to determine if one already exists. document.getElementById(id).addEventListener("mouseenter", function(){ // Find the 'demo' div var elemDiv = document.getElementById('demo'); // If it doesn't exist, create a div, give it the unique ID 'demo' and add it to the DOM' if (!elemDiv) { elemDiv = document.createElement('div'); elemDiv.id = 'demo'; document.body.appendChild(elemDiv); } // Whether it was already on the DOM or had to be created, the text is reset. elemDiv.innerHTML = "something"; }, false); See my JSFiddle for a complete example: http://jsfiddle.net/ckned3mx/6/
answers question: http://stackoverflow.com/q/25383448
upvote count: 1

http://stackoverflow.com/comment/39393477
has text: use event.preventDefault()
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25279785

http://stackoverflow.com/comment/39473050
comment on: http://stackoverflow.com/q/25322235
score: 0
type: Comment
type: QuestionComment
has text: when you put your code inside a document ready function the code will run after all the elements have been loaded. You may be trying to arrange images before they are completely loaded. try this $( document ).ready(function() { // put your old code here });

http://stackoverflow.com/a/25364986
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25364931
type: Answer
accepted answer of: http://stackoverflow.com/q/25364931
has body: Unless within an object, text followed by a colon in JavaScript is a labelled statement. An example labelled statement which you will have probably seen before is: &lt;a href="javascript: void(0)"&gt; In this case, javascript is the label and void(0) is the statement. In your case, image is the label and HTMLImageElement is the statement.
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/39394423
type: AnswerComment
comment on: http://stackoverflow.com/a/25280089
type: Comment
score: 0
has text: i've also added a much easier way (imo). if youre interested in the topic, see the link i provided in the answer.

http://stackoverflow.com/q/25234829
score: 0
tagged with: sockets
has comment: http://stackoverflow.com/comment/39338001
tagged with: php
has comment: http://stackoverflow.com/comment/39310665
has comment: http://stackoverflow.com/comment/39324721
has body: here is what I want to do: on a website: www.mySite.com I want ppl to log on and be able to see other ppl who are currently viewing that webpage. then I want them to be able to enter text on the webpage and it sends a message to the server the server then sends this message to all the ppl viewing the page. then I want the option to select a user from the list of users currently viewing the webpage. and send that user alone a message (private messaging) but not all the others. can I do this with html and php? I do NOT want to have a browser refreshing constantly to reload data. I have looked into websocket technology and so far the only solutions I found is to open a socket connection, wait for a response from server and close the connection on timeout... then reopen a new one and continously open and close sockets until updates are received by server. is there a way for the client (browser) to listen for updates without polling a server? -->>>is there a way for the server to save client addresses and send updates to an open html page (push data) to all those clients, only specific ones, or whatever the case is??&lt;&lt;-- html seems to work fine polling servers but then close connection right away. Is there a way to keep a socket open indefinately, and not constantly reopen them to simulate server-browser push technology? I am coding with a simple webserver using html, php and javascript. I am not paying for a virtual machine where I can construct services in my language of choosing. I prefere not to use a 3rd party to achieve this. I would like for this to be working on all browsers. is this possible?
tagged with: push
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39324607
has comment: http://stackoverflow.com/comment/39348840
has comment: http://stackoverflow.com/comment/39310855
tagged with: http://stackoverflow.com/tag/html
has title: is there a way for the server to save clients' addresses and send updates (for all or some clients) to an open html page?
answer count: 0
has comment: http://stackoverflow.com/comment/39348240
type: Question

http://stackoverflow.com/comment/39310529
has text: @JK. - Please read: http://meta.stackexchange.com/questions/132600/should-i-delete-my-answer-to-a-question-thats-marked-as-a-duplicate
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25234692

http://stackoverflow.com/comment/39423605
type: Comment
comment on: http://stackoverflow.com/a/25272467
has text: Ok, again, I'll try to push you towards the correct direction. On the input `blur` event, that means when you type in the quantity and click outside the textbox, you get the value typed `$(this).val()`. Then you use, the `parent`, `siblings`, `children` etc. methods on jQuery, to get the value for whatever item quantity was edited. In your case, I think something like this `$(this).parent('td').siblings('td').children('div.price').attr('data-val')` or something.. And you get the price, the quantity and run with it! Thanks!
type: AnswerComment
score: 0

http://stackoverflow.com/q/25309145
has comment: http://stackoverflow.com/comment/39448659
possible better answer: http://stackoverflow.com/a/25309305
has answer: http://stackoverflow.com/a/25309332
type: AnsweredQuestion
has title: Angular Factory is not Working
has body: I'm trying to do a persistance service to my app with the follwing code modified from this demo /* global angular,window */ var ionicApp = angular.module('ionicApp', []); ionicApp.factory('persistanceService', ['$q', function($q) { var setUp=false; var db; function init() { var deferred = $q.defer(); if(setUp) { deferred.resolve(true); return deferred.promise; } var openRequest = window.indexedDB.open("indexeddb_angular",1); openRequest.onerror = function(e) { console.log("Error opening db"); console.dir(e); deferred.reject(e.toString()); }; openRequest.onupgradeneeded = function(e) { var thisDb = e.target.result; var objectStore; //Create produto OS if(!thisDb.objectStoreNames.contains("produto")) { var produto = thisDb.createObjectStore('produto', {keyPath: 'id'}); produto.createIndex('nome_idx', 'nome', {unique: false}); produto.createIndex('quantidade_idx', 'quantidade', {unique: false}); produto.createIndex('categoria_idx', 'categoria', {unique: false}); produto.createIndex('quantidade_lista_idx', 'quantidade_lista', {unique: false}); produto.createIndex('data_validade_idx', 'data_validade', {unique: false}); produto.createIndex('lista_automatico_idx', 'lista_automatico', {unique: false}); } }; openRequest.onsuccess = function(e) { db = e.target.result; db.onerror = function(event) { // Generic error handler for all errors targeted at this database's // requests! deferred.reject("Database error: " + event.target.errorCode); }; setUp=true; deferred.resolve(true); }; return deferred.promise; } function isSupported() { return ("indexedDB" in window); } function deleteProduto(key) { var deferred = $q.defer(); var t = db.transaction(["produto"], "readwrite"); var request = t.objectStore("produto").delete(key); t.oncomplete = function(event) { deferred.resolve(); }; return deferred.promise; } function getProduto(key) { var deferred = $q.defer(); var transaction = db.transaction(["produto"]); var objectStore = transaction.objectStore("produto"); var request = objectSt…
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25309305
tagged with: ionic-framework
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25309332
tagged with: angularjs

http://stackoverflow.com/q/25270545
tagged with: jquery
has comment: http://stackoverflow.com/comment/39376964
tagged with: ajax
has answer: http://stackoverflow.com/a/25270720
has comment: http://stackoverflow.com/comment/39377122
has comment: http://stackoverflow.com/comment/39377044
has answer: http://stackoverflow.com/a/25270714
favorite count: 0
upvote count: 0
has comment: http://stackoverflow.com/comment/39377016
downvote count: 5
type: UnansweredQuestion
has body: Is it ok to remove the dollar sign in javascript function? Does it affect to functionality of the whole code inside of it? from this $(function() { // code }); to this (function() { // code });
score: -5
linked to: http://stackoverflow.com/q/1150381
type: Question
answer count: 2
has title: Is it ok to remove the $ in javascript function
tagged with: javascript

http://stackoverflow.com/comment/39515337
type: Comment
has text: he can do what he is asking
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25345352

http://stackoverflow.com/comment/39538542
type: Comment
has text: Also, How do I use url if the php action is itself? Do I just put the url of the file path again?
comment on: http://stackoverflow.com/a/25355738
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39549683
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25364422
type: Comment
has text: @antyrat What you are suggesting? i have already put that in my function

http://stackoverflow.com/comment/39479464
has text: That was before you editid your post, going to try some stuff now.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25325785

http://stackoverflow.com/comment/54348271
has text: Even I'm trying this go to this link if helpful: http://codepen.io/davidensinger/details/YPNyea
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25334056
score: 0

http://stackoverflow.com/q/25255517
has title: Passing data to view in ExpressJS + Reactjs
tagged with: javascript
tagged with: express
upvote count: 4
tagged with: reactjs
answer count: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/43191730
favorite count: 0
has answer: http://stackoverflow.com/a/43191730
has body: I have an app and part of it is to login with twitter. After successfully logged in, I will usually pass the user data to the template by app.get('/', function(req, res, next) { log("The Home page has the user info: ", req.session.user); res.render('pages/home', { app: 'home', user: req.session.user || '' }); }); And then you can render the template based on the user data. But in React, how should I pass such data to the component after logged in? I am thinking of putting the data in the browser directly, but I am not confident about that. &lt;script type="javascript"&gt; var user = #{user} &lt;/script&gt; How do you think?? Thanks.
tagged with: node.js
score: 4
has answer: http://stackoverflow.com/a/25255743
accepted answer: http://stackoverflow.com/a/25255743
type: Question
type: AnsweredQuestion

http://stackoverflow.com/a/25342059
has comment: http://stackoverflow.com/comment/50673326
has comment: http://stackoverflow.com/comment/39521438
type: Answer
has body: You will need to allow the iframe element and source attribute to your Html policy. You can do it like the following example modified from the java doc // Define the policy. Function&lt;HtmlStreamEventReceiver, HtmlSanitizer.Policy&gt; policy = new HtmlPolicyBuilder() .allowElements("a", "p", "iframe") .allowAttributes("href").onElements("a") .allowAttributes("source").onElements("iframe") .toFactory(); // Sanitize your output. HtmlSanitizer.sanitize(myHtml, policy.apply(myHtmlStreamRenderer));
answers question: http://stackoverflow.com/q/25341980
score: 0
has comment: http://stackoverflow.com/comment/39521449

http://stackoverflow.com/comment/39384490
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25274264
type: Comment
has text: Your loops are mixed up. If you're object's layout is really like `obj`, then you want to `_.forIn` over `obj.key1` and over `obj.key2`, not the other way round.

http://stackoverflow.com/q/25270973
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25271437
type: AnsweredQuestion
type: Question
tagged with: width
accepted answer: http://stackoverflow.com/a/25271437
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25271267
has answer: http://stackoverflow.com/a/25271267
has body: In my application I have a little label area that I have popping down to display messages. These messages are of different lengths and I want the label to take up as little space as possible width and height wise. It seems silly to create an id for all of these labels instead of just reusing the CSS. However, I am having difficulty making my widths dynamically expand/compress based on the label. Is there a good way of doing this? Is there sort of magical mix of min-width and width: auto to be used? Should this be taken care of with jquery on start of each page to make it overwrite the width for that pages label? I've tried a number of methods from google/S.O. and none have produced the result I want so far. Everytime the labels width expanded the parent div. Here is a look at my current attempt: HTML: Loading ... CSS: #statusContainer { position: absolute; margin: 0 auto; padding: 10px 0 0 0 !important; z-index: 101; top: 0; left: 0; right: 0; background: #EEEEEE; text-align: center; line-height: 2.5; overflow: hidden; -webkit-box-shadow: 0 0 5px black; -moz-box-shadow: 0 0 5px black; box-shadow: 0 0 5px black; color: #8b6d80; font-weight: bold; display: inline-block; white-space: nowrap; width: 120px; } #divStatus { position: absolute; margin: 0 auto; padding: 10px 0 0 0; z-index: 101; top: 0; left: 0; right: 0; width: 100%; } Here are some screenshots with what I'm trying to accomplish: Does anyone know the sleekest way of accomplishing this?
has title: Expandable message div based on label width

http://stackoverflow.com/comment/39593461
score: 0
comment on: http://stackoverflow.com/q/25385863
has text: Hmm, good find. That definitely helped me get closer...whenever I click on any related videos, the content script is run, but it still gives me the old URL. Possibly getting run too early and still grabbing the old video? Not sure - time for some investigation
type: QuestionComment
type: Comment

forms
tags question: http://stackoverflow.com/q/25330561
tags question: http://stackoverflow.com/q/25311470
tags question: http://stackoverflow.com/q/25253047
tags question: http://stackoverflow.com/q/25376885
tags question: http://stackoverflow.com/q/25307744
tags question: http://stackoverflow.com/q/25261262
tags question: http://stackoverflow.com/q/25367073
tags question: http://stackoverflow.com/q/25273216
tags question: http://stackoverflow.com/q/25264564
tags question: http://stackoverflow.com/q/25272228
tags question: http://stackoverflow.com/q/25370106
tags question: http://stackoverflow.com/q/25367712
tags question: http://stackoverflow.com/q/25272559
tags question: http://stackoverflow.com/q/25309609
tags question: http://stackoverflow.com/q/25374239
tags question: http://stackoverflow.com/q/25311204
tags question: http://stackoverflow.com/q/25329352
tags question: http://stackoverflow.com/q/25245144
tags question: http://stackoverflow.com/q/25333238
type: Tag
tags question: http://stackoverflow.com/q/25345635
tags question: http://stackoverflow.com/q/25352468
tags question: http://stackoverflow.com/q/25269944
tags question: http://stackoverflow.com/q/25388301
tags question: http://stackoverflow.com/q/25346226
tags question: http://stackoverflow.com/q/25332447
tags question: http://stackoverflow.com/q/25340197
tags question: http://stackoverflow.com/q/25253702
tags question: http://stackoverflow.com/q/25291876
tags question: http://stackoverflow.com/q/25334146
tags question: http://stackoverflow.com/q/25335794
tags question: http://stackoverflow.com/q/25243716
tags question: http://stackoverflow.com/q/25280168
tags question: http://stackoverflow.com/q/25373386
tags question: http://stackoverflow.com/q/25298383
tags question: http://stackoverflow.com/q/25303937
tags question: http://stackoverflow.com/q/25238764
tags question: http://stackoverflow.com/q/25323962
tags question: http://stackoverflow.com/q/25307172
tags question: http://stackoverflow.com/q/25264026
tags question: http://stackoverflow.com/q/25338031
tags question: http://stackoverflow.com/q/25251215
tags question: http://stackoverflow.com/q/25239269
tags question: http://stackoverflow.com/q/25262434
tags question: http://stackoverflow.com/q/25289299
tags question: http://stackoverflow.com/q/25366474
tags question: http://stackoverflow.com/q/25355532
tags question: http://stackoverflow.com/q/25288307
tags question: http://stackoverflow.com/q/25270848
tags question: http://stackoverflow.com/q/25232551
tags question: http://stackoverflow.com/q/25230569
tags question: http://stackoverflow.com/q/25231240
tags question: http://stackoverflow.com/q/25366406
tags question: http://stackoverflow.com/q/25320279
tags question: http://stackoverflow.com/q/25241999
tags question: http://stackoverflow.com/q/25316399
tags question: http://stackoverflow.com/q/25234431
tags question: http://stackoverflow.com/q/25255028
tags question: http://stackoverflow.com/q/25265835
tags question: http://stackoverflow.com/q/25264104
tags question: http://stackoverflow.com/q/25369671
tags question: http://stackoverflow.com/q/25312492
tags question: http://stackoverflow.com/q/25253337
tags question: http://stackoverflow.com/q/25372525
tags question: http://stackoverflow.com/q/25343234
tags question: http://stackoverflow.com/q/25368511
tags question: http://stackoverflow.com/q/25370646
tags question: http://stackoverflow.com/q/25348484
tags question: http://stackoverflow.com/q/25287380
tags question: http://stackoverflow.com/q/25387081
tags question: http://stackoverflow.com/q/25282034
tags question: http://stackoverflow.com/q/25377363
tags question: http://stackoverflow.com/q/25311923
tags question: http://stackoverflow.com/q/25234255
tag name: forms
tags question: http://stackoverflow.com/q/25276000
tags question: http://stackoverflow.com/q/25385835
tags question: http://stackoverflow.com/q/25257685
tags question: http://stackoverflow.com/q/25287785
tags question: http://stackoverflow.com/q/25281577

http://stackoverflow.com/q/25382955
has title: Ember data store return undefined record from FIXTURES
score: 1
upvote count: 1
possible better answer: http://stackoverflow.com/a/25407006
has body: I am new in ember and i am trying to simply get log of items stored by Fixtures model and i cannot. Here is what I have done: app.js App = Ember.Application.create(); App.Store = DS.Store.extend({ adapter: DS.FixtureAdapter.extend() }); App.Documenter = DS.Model.extend({ firstName: DS.attr('string'), lastName: DS.attr('string') }); App.Documenter.FIXTURES = [ { id: 1, firstName: 'Trek', lastName: 'Glowacki' }, { id: 2, firstName: 'Tom', lastName: 'Dale' } ]; App.IndexRoute = Ember.Route.extend({ controllerName: 'application', actions: { addtostore: function () { }, displaystore: function () { var obj = this.store.all('documenter'); console.log(obj.objectAt(0).firstName); //here i get undefined } } }); html: I've looked at few answers already on stackoverflow: Ember-Data Fixture Adapter Ember App Kit with ember data but still I dont get, why button TestButton dont log into console. I tried many ways but always it is undefined
has answer: http://stackoverflow.com/a/25385792
type: Question
has answer: http://stackoverflow.com/a/25407006
tagged with: javascript
has comment: http://stackoverflow.com/comment/39588784
answer count: 2
linked to: http://stackoverflow.com/q/18742647
tagged with: single-page-application
downvote count: 0
accepted answer: http://stackoverflow.com/a/25385792
has comment: http://stackoverflow.com/comment/39589170
favorite count: 0
linked to: http://stackoverflow.com/q/12386913
tagged with: http://stackoverflow.com/tag/html
tagged with: ember.js
type: AnsweredQuestion

http://stackoverflow.com/a/25303656
has comment: http://stackoverflow.com/comment/39438344
accepted answer of: http://stackoverflow.com/q/25303595
score: 1
has comment: http://stackoverflow.com/comment/39438477
type: AcceptedAnswer
has body: you have extra quote at www.theurl.com/"'+id+'", change to: $("#successtext").append('The linkLog Out'); Update:: call .trigger('create') after appending $("#successtext") .append('The linkLog Out') .trigger('create'); Demo:: jsFiddle
downvote count: 0
has comment: http://stackoverflow.com/comment/39438817
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25303595

http://stackoverflow.com/a/25288726
has comment: http://stackoverflow.com/comment/39411437
score: 0
answers question: http://stackoverflow.com/q/25288623
has body: since you wanted it centered, here you have it centered horizontally and vertically too. Placing position:absolute; inside position:relative; allows it to be inside of it. http://jsfiddle.net/g4y4czff/3/ .outer{ background: red; margin: 0 auto; width:100px; height:100px; position:relative; } .inner{ position:absolute; width:20px; height:20px; background:blue; top:0; margin: auto; left:0; right:0px; bottom:0; }
type: Answer
has comment: http://stackoverflow.com/comment/39410723
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39411331

http://stackoverflow.com/q/25306449
answer count: 3
possible better answer: http://stackoverflow.com/a/25309124
favorite count: 0
has answer: http://stackoverflow.com/a/25309124
upvote count: 2
has answer: http://stackoverflow.com/a/25322116
has title: How to pass value from one view model to another viewmodel in knockout js?
has answer: http://stackoverflow.com/a/25310906
score: 2
type: AnsweredQuestion
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/39451085
linked to: http://stackoverflow.com/q/25376632
tagged with: knockout-mvc
downvote count: 0
tagged with: javascript
has body: i have two view models and i want to pass value from one view model to another viewmodel. i have two viewmodels and two div i want to display another div on click of button which is present in div 1. here is html code Container1 item Item show another div Container2 item Item and here is script function Container1ViewModel() { var self = this; self.myItems = ko.observableArray(); self.myItems.push("ABC"); self.myItems.push("CDE"); } function Container2ViewModel() { var self = this; self.myItems = ko.observableArray(); self.myItems.push("XYZ"); self.myItems.push("PQR"); } var container1VM; var container2VM; $(document).ready(function() { if ($.isEmptyObject(container1VM)) { container1VM = new Container1ViewModel(); ko.applyBindings(container1VM, document.getElementById("container1")); } if ($.isEmptyObject(container2VM)) { container2VM = new Container2ViewModel(); ko.applyBindings(container2VM, document.getElementById("container2")); } }); how can i do it ?
has comment: http://stackoverflow.com/comment/39443485
accepted answer: http://stackoverflow.com/a/25310906

http://stackoverflow.com/q/25368693
tagged with: onclick
has comment: http://stackoverflow.com/comment/39558787
has comment: http://stackoverflow.com/comment/39558464
has comment: http://stackoverflow.com/comment/39558076
has comment: http://stackoverflow.com/comment/39558440
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39558498
accepted answer: http://stackoverflow.com/a/25368928
type: Question
score: 0
has comment: http://stackoverflow.com/comment/39558125
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39558603
tagged with: click
has comment: http://stackoverflow.com/comment/39558393
tagged with: jquery-events
has body: I’m creating n buttons dynamically with JS/jQuery and I’m dynamically adding a button click event. The problem is that when the function AddImageInTagTest() is called it creates all the buttons and fires the click event, without me clicking any button. The other issue is that when I click one of the buttons created dynamically the click event function doesn’t fire. How come? var count = 0; function AddImageInTagTest(tagId, imageSrcPathAndimageFileName) { var fileNameWithExtension; fileNameWithExtension = imageSrcPathAndimageFileName.split("\\").pop(); //get just the filename with ext from the path $(tagId).html($(tagId).html() + "&lt;img alt='' src='" +"\\" +imageSrcPathAndimageFileName +"'/&gt;"+"&lt;input id='Button"+count.toString()+"' type='button' value='delete image' /&gt;"); $("#Button" + count.toString()).click(delete_image_custom()); count++; } function delete_image_custom() { alert("Button is clicked"); } I've changed and added and anonymous function in the click event, but nothing happends when I click. $("#Button" + count.toString()).click(function () { console.log("click event fired")}); I've modified the function call to: $("#Button" + count.toString()).onClick(delete_image_custom); but nothing
has comment: http://stackoverflow.com/comment/39558544
has answer: http://stackoverflow.com/a/25368928
has title: Js. Click event added programmatically, but fires only once, when code is loaded
has comment: http://stackoverflow.com/comment/39558412

http://stackoverflow.com/comment/39531852
score: 0
type: AnswerComment
has text: @Timothy Do you want the div to fade in 40px before the bottom of the window hits the div or 40px after the bottom of the window passes the top of the div? Essentially, this [picture](http://i.imgur.com/wG4wLcT.png?1)—point A or point B?
comment on: http://stackoverflow.com/a/25354737
type: Comment

http://stackoverflow.com/a/25336095
downvote count: 0
has comment: http://stackoverflow.com/comment/39501097
has comment: http://stackoverflow.com/comment/39500406
has body: The text after it will be in the capture groups. It will be in a different capture group depending on which prefix matched. So it would be better to put just the prefixes in the | alternatives, and just have a single capture group: var result = str.match(/(?:call me|my name's|my name is|my names|I am|I'm)(.*)/) Now result[1] will contain the text after the phrase. DEMO
score: 4
has comment: http://stackoverflow.com/comment/39500239
has comment: http://stackoverflow.com/comment/39501036
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25336013
answers question: http://stackoverflow.com/q/25336013
has comment: http://stackoverflow.com/comment/39500308
type: Answer
upvote count: 4

http://stackoverflow.com/a/25344162
has body: A bit more complicated than I originally anticipated, but you could add this jQuery: $('.btn').click(function(){ active_change($(this)); }); $('.collapse-link').click(function(){ var item = $('.collapse-' + $(this).attr("data-id")); active_change(item); }); //the below activity is shared so it can be done in a single function, called from either click above. function active_change(item){ if($(item).hasClass('active')){ $(item).removeClass('active'); }else{ $('.btn').removeClass('active'); $(item).addClass('active'); } } And add appropriate class and data-id attributes in your html. The changes I made were, changed the panel accordion link to: &lt;a class="collapse-link" data-id="1" data-toggle="collapse" data-parent="#accordion" href="#collapseOne"&gt; And I added classes collapse-1, collapse-2, etc. to the numeric links. Updated jsFiddle Demo
answers question: http://stackoverflow.com/q/25343872
score: 0
has comment: http://stackoverflow.com/comment/39514608
has comment: http://stackoverflow.com/comment/39514193
type: Answer

http://stackoverflow.com/comment/39386142
comment on: http://stackoverflow.com/a/25275096
score: 0
type: Comment
has text: Right... Fixed some issues with the sample code (still untested). I've given 2 examples of how to do it. Obviously, as you're iterating through in either version, you can read the data value for the price and total it up. I personally prefer the 2nd version as it is much less tightly coupled with the html.
type: AnswerComment

http://stackoverflow.com/q/25293076
type: UnansweredQuestion
has title: Async script loading callback
upvote count: 1
has body: I'm loading a Google Hangouts button using their example script: // Load Hangouts Buttons Async window.___gcfg = { lang: 'en', parsetags: 'onload' }; (function() { // Load script var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); I setup a spinner using spin.JS and I want to stop/hide it when the Hangouts script loads. How do I insert a callback into the above loading function?
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39418473
tagged with: javascript
tagged with: jquery-callback
downvote count: 0
linked to: http://stackoverflow.com/q/16230886
favorite count: 0
answer count: 0

http://stackoverflow.com/q/25304858
has title: Simulating the behaviour of Page Up / Page Down in a contentEditable Div
type: Question
tagged with: caret
has body: I've got an editor in a contentEditable div inside a Windows Store app WebView, and because of quirks in contentEditable handling of PageUp / PageDown I've had to implement my own Page Up / Page Down by trapping the key down event in Javascript and scrolling the page up or down by one screen height. The trouble is, the cursor does not move when paging, as it should. When the user presses the cursor keys the page scrolls back to where it was before pressing Page Up / Page Down Here's the code I'm using the catch the key down events $(window).bind('keydown', function (event) { if (event.which == 33) { // page up event.preventDefault(); // scroll page to current scroll - window height $(document).scrollTop($(document).scrollTop() - document.body.clientHeight); // place cursor on page } else if (event.which == 34) { // page down event.preventDefault(); // scroll page to current scroll + window height $(document).scrollTop($(document).scrollTop() + document.body.clientHeight); // move cursor to bottom } }); I can set the caret position using this function // 'editor' is a reference to my contentEditable div function setCaretPosition(cPos) { var charIndex = 0, range = document.createRange(); range.setStart(editor, 0); range.collapse(true); var nodeStack = [editor], node, foundStart = false, stop = false; while (!stop &amp;&amp; (node = nodeStack.pop())) { if (node.nodeType == 3) { var nextCharIndex = charIndex + node.length; if (!foundStart &amp;&amp; cPos &gt;= charIndex &amp;&amp; cPos &lt;= nextCharIndex) { range.setStart(node, cPos - charIndex); foundStart = true; } if (foundStart &amp;&amp; cPos &gt;= charIndex &amp;&amp; cPos &lt;= nextCharIndex) { range.setEnd(node, cPos - charIndex); stop = true; } charIndex = nextCharIndex; } else { var i = node.childNodes.length; while (i--) { nodeStack.push(node.childNodes[i]); } } } selection = window.getSelection(); selection.removeAllRanges(); selection.addRange(range); } But how do I know where to set it? I can infer the te…
has comment: http://stackoverflow.com/comment/94639508
has comment: http://stackoverflow.com/comment/39441094
tagged with: cursor-position
has comment: http://stackoverflow.com/comment/39460288
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/39451895
linked to: http://stackoverflow.com/q/512528
has comment: http://stackoverflow.com/comment/39810711
upvote count: 4
has comment: http://stackoverflow.com/comment/39616818
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/39487126
has comment: http://stackoverflow.com/comment/39451622
favorite count: 0
has comment: http://stackoverflow.com/comment/39817636
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39480715
has comment: http://stackoverflow.com/comment/39595631
answer count: 0
tagged with: scroll

http://stackoverflow.com/q/25373139
tagged with: canvas
answer count: 1
tagged with: javascript
tagged with: kineticjs
tagged with: android
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has body: I found this issue https://code.google.com/p/android/issues/detail?id=17565 and it seems that it is not going to get solved soon, so I would like to know, how can I draw on canvas without using the putImageData()? var imgCanvas = document.createElement("canvas"); var ctx = imgCanvas.getContext("2d"); var imageObj.src = 'img/someImage.png'; imageObj.onload = function(){ ctx.draw(imageObj,0,0); var imageData = ctx.getImageData(0,0,30,30); var data = imageData.data; for(var i = 0, n = data.length; i &lt; n; i += 4) { data[i]+=20;//red data[i+1]-=20;//green data[i+2]-=20;//blue data[i+3]=0; //alpha, но я не трогаю этого параметра } ctx.putImageData(imageData,0,0); } For instance, in normal browsers, the result of changing a pixel rgba=[100,100,100,200] with the above script should be rgba=[120,80,80,200], but on android's 4.2 default browser the result is not the expected, is something weird like rgba=[153,102,102,200]. Anyway, the point is that there is an issue and I would like to know, how can I change one image's rgba parameters without using the putImageData() method?. If there is not a way with canvas, I would like to know, how can solve this another way? I need to change the image color dinamically, and I need this to work on android (I am using phonegap and the result is the same as in the default android browser). Thank you!
has title: How to draw on HTML5 canvas without putImageData()?
type: Question
score: 0
has answer: http://stackoverflow.com/a/25398011

http://stackoverflow.com/q/25334413
favorite count: 0
has answer: http://stackoverflow.com/a/26775007
type: UnansweredQuestion
has title: Fabric.js: can't get the active groups anymore
has body: I'm using fabric 1.4.10 and i noticed that i can't get the active groups anymore! Everytime i call canvas.getActiveGroup() even when a group is selected, i get null. My code to create groups: var circle1 = new fabric.Circle({ radius: 50, fill: 'red', left: 0 }); var circle2 = new fabric.Circle({ radius: 50, fill: 'green', left: 100 }); var circle3 = new fabric.Circle({ radius: 50, fill: 'blue', left: 200 }); var group = new fabric.Group([ circle1, circle2, circle3 ], { left: 200, top: 100 }); canvas.add(group); Can anyone help please?
score: 2
downvote count: 0
tagged with: fabricjs
type: Question
answer count: 2
tagged with: canvas
tagged with: javascript
upvote count: 2
has answer: http://stackoverflow.com/a/33520602

http://stackoverflow.com/q/25244361
has body: The code: var blob; blob = new Blob(file, { encoding: "UTF-8", type: "text/plain;charset=UTF-8" }); saveAs(blob, "" + this._id + ".html"); It's strange if I imput an — in the textarea the download file shows a â€” (on Chrome) even though I specified the encoding and charset as UTF-8 (both textarea and html file viewed in the same browser). What could be the problem?
answer count: 1
downvote count: 0
favorite count: 0
has title: â€” character showing instead of em dash (—)?
has answer: http://stackoverflow.com/a/25244424
has comment: http://stackoverflow.com/comment/39329111
type: AnsweredQuestion
type: Question
tagged with: blob
accepted answer: http://stackoverflow.com/a/25244424
tagged with: javascript
score: 4
upvote count: 4

http://stackoverflow.com/q/25321386
score: 0
has title: Checkbox Populate Form Fields
tagged with: checkbox
tagged with: auto-populate
accepted answer: http://stackoverflow.com/a/25321487
has body: I wish to use a checkbox to populate form fields. Example User Flow: Visitor fills out shipping info fields like name, address, zip, city. Visitor has option to checkbox to auto populate billing info fields. If user checks "same as billing info" checkbox, the shipping info fields with input data are copy / pasted into billing info fields. Please visit: http://staelements.com/register Is J$ is best way to achive this? Please tell me if there is a better solution. Thanks for your attention good citizen!
type: AnsweredQuestion
tagged with: populate
tagged with: forms
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25321487

http://stackoverflow.com/q/25237693
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
linked to: http://stackoverflow.com/q/9825754
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25245955
tagged with: liferay-aui
score: 1
upvote count: 1
type: Question
tagged with: liferay
has body: I am using Jquery(window).load(function(){ // here is my code to make AJAX request to fetch data from DB }); But its not working in Chrome. For this when I searched in the forum, I got solution that Use @run-at document-start meta-rule in your script from this link But I am not getting how to implement it. Can you provide one example? Here is my actual code: <aui:script> function getBacklogData() { alert('getBacklogData'); try{ var url = '<%=resourceURL %>'; var A = AUI(); A.io.request(url, { data:{ <portlet:namespace />CMD:'Backlog', }, type: "POST", dataType:'json', on: { success: function(event, id, obj) { var instance = this ; var data = instance.get('responseData'); for (var j=0; j < data.length; j++) { var backlog_id=data[j].backlog_id; var title=data[j].title; var feature_id=data[j].feature_id; var vision_id=data[j].vision_id; var description=data[j].description; var status_id=data[j].status_id; var priority_id=data[j].priority_id; var rank=data[j].rank; var isActive=data[j].isActive; var created_by_id=data[j].created_by_id; var created_on=data[j].created_on; var modified_by_id=data[j].modified_by_id; var modified_on=data[j].modified_on; jQuery('#backlogDiv').append(" "+title+"<img src='<%=renderRequest.getContextPath()%>/img/priority.png' title='"+priority_id+"' style='float: right;width: 15px;cursor:pointer'><img onclick='<portlet:namespace />viewBacklogDetails("+backlog_id+");' src='<%=renderRequest.getContextPath()%>/img/view.png' style='float: right;width: 15px;cursor:pointer' title='View Details'><img onclick='<portlet:namespace />editBacklogPopup("+backlog_id+");' src='<%=renderRequest.getContextPath()%>/img/editform1.png' title='Edit Backlog' style='float: right;width: 15px;cursor:pointer'> <img src='<%=renderRequest.getContextPath()%>/img/Flaticon_35767.png' style='float: left;width: 25px;'>"+status_id+"<img src='<%=renderRequest.getContextPath()%>/img/clock.png' style='float: left;width: 25px;margin-left: 15px;cursor:pointer'>"+created_on+" "); } } …
tagged with: javascript
has comment: http://stackoverflow.com/comment/39316145
has title: how to use the @run-at document-start meta-rule

http://stackoverflow.com/comment/39585570
comment on: http://stackoverflow.com/a/25382541
type: Comment
has text: Which version of Jquery you are using ?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39383399
has text: I can't seem to see anything on their API docs, so my suggestion may be a little convoluted. When the user chooses a new language, save the current time of the clock, destroy the current clock, and then reinstantiate it with the new language and old time
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25273859

http://stackoverflow.com/comment/85587724
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/34795345
score: 0
has text: what do you mean by confines of a simple request?

http://stackoverflow.com/q/25353585
type: AnsweredQuestion
has title: Get Cursor Position With Input type number
linked to: http://stackoverflow.com/q/2897155
type: Question
accepted answer: http://stackoverflow.com/a/25371702
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has body: I would like to get the position of the cursor in an &lt;input&gt;. Here is the code that I am using: $("input").keyup(function() { $("&lt;p&gt;") .html("Cursor position at " + $("input").caretPosition()) .appendTo("#test"); }); And caretPosition is defined as (just a wrapper for selectionStart): $.fn.caretPosition = function() { if (!this.length) return; var input = this[0]; try { return input.selectionStart; } catch(e) { // No need for old IE support return 0; } } HTML &lt;input type="number" /&gt; &lt;div id="test"&gt; &lt;/div&gt; Unfortunately this isn't working in chrome, but it is working if Firefox. In chrome, it prints 0 all the time. This would make me think that chrome doesn't support selectionStart but I have read that it does support selectionStart. This is supported by the fact that if I change type="number" to type="text" it starts working. How do I get it to work consistently across browsers for type="number"? (not IE, don't need support for that). I have read https://stackoverflow.com/a/2897510/3371119 but it doesn't work for me (in chrome). Jsfiddle: http://jsfiddle.net/prankol57/zbaaky5z/2/ Edit: I have confirmed that selectionStart in input returns true. So why is an error thrown?
has comment: http://stackoverflow.com/comment/39553424
favorite count: 0
has answer: http://stackoverflow.com/a/25371702
score: 6
has comment: http://stackoverflow.com/comment/39564023
upvote count: 6

http://stackoverflow.com/comment/39451279
comment on: http://stackoverflow.com/a/25279016
score: 0
type: AnswerComment
has text: I really like the idea of this (would solve the need for doing a query on what region im on in the extended code), but correct me if I'm wrong - when adding a Region we actually select the css selector like so: App.addRegions({ navigationRegion: "#navigation" });
type: Comment

http://stackoverflow.com/a/26369373
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/41446518
has comment: http://stackoverflow.com/comment/41465749
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/42487703
score: 2
has comment: http://stackoverflow.com/comment/42500993
has comment: http://stackoverflow.com/comment/42502037
answers question: http://stackoverflow.com/q/25388460
has comment: http://stackoverflow.com/comment/41449157
has body: That feed doesn't seem to have any mediaGroup entries, that is the reason you get undefined in your result, but you can extract the images from the entry.content using jQuery. Puts image urls to an array and shows first found image (or none): var content = document.createElement("content"); content.innerHTML = entry.content; var images = $(content).find('img').map(function(){ return $(this).attr('src') }).get(); $('#feed').append(' ' + entry.title + ' ' + entry.contentSnippet + ' '+ entry.publishedDate +' ' + (images.length == 0 ? '' :' ') + ' '); Shows all images, by appending the img tags to a variable: var content = document.createElement("content"); content.innerHTML = entry.content; var images = ""; $(content).find('img').each(function() { images += this.outerHTML; }); $('#feed').append(' ' + entry.title + ' ' + entry.contentSnippet + ' ' + entry.publishedDate + ' ' + images +' ');
has comment: http://stackoverflow.com/comment/41462562
has comment: http://stackoverflow.com/comment/42531163
accepted answer of: http://stackoverflow.com/q/25388460
has comment: http://stackoverflow.com/comment/42481753
has comment: http://stackoverflow.com/comment/42487920

http://stackoverflow.com/q/25234976
tagged with: google-maps
answer count: 1
has answer: http://stackoverflow.com/a/25235571
accepted answer: http://stackoverflow.com/a/25235571
type: AnsweredQuestion
has title: Google Maps MarkerClusterer Not Clustering
has body: Sorry, I've search high and low and can't seem to figure this one out. I have a map working fine, but I'm trying to add MarkerClusterer and markers aren't clustering. The locations in New Jersey should be in a cluster. Can anyone offer some hints? This is my page: http://vbarbershop.com/location-finder/ I'm getting these javascript errors, which may be the cause? I'm somewhat unexperienced with Google Maps: Uncaught TypeError: undefined is not a function markerclusterer.js:660 Uncaught TypeError: undefined is not a function markerclusterer.js:660 This is my code: Thank you!
tagged with: markerclusterer
type: Question
tagged with: javascript
tagged with: google-maps-api-3
score: 0

http://stackoverflow.com/comment/39436029
score: 0
type: Comment
has text: just take a look what i m doing on server side "string EndTime= String.Format("{0:MM/dd/yyyy hh:mm tt}", End_Time);" i m trying to set the format of my date in your format and everything seems fine it just that i m not getting the seprerators i.e "/" on server side my output of above code is as "08-14-2014 01:00 PM"
comment on: http://stackoverflow.com/a/25301250
type: AnswerComment

http://stackoverflow.com/q/25365977
has comment: http://stackoverflow.com/comment/39552848
has title: Call custom array.sort function within another sort function
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39553048
duplicate of: http://stackoverflow.com/q/20279484
linked to: http://stackoverflow.com/q/20279484
has comment: http://stackoverflow.com/comment/39552577
type: Question
has comment: http://stackoverflow.com/comment/39552615
has answer: http://stackoverflow.com/a/25366054
has comment: http://stackoverflow.com/comment/39553225
has body: Is there a way I can do this? In my code snippet below, this doesn't have access to sortByName FN when called from within sortByLyncStatus prototype defn: sortByName: function (bud, light) { if (bud.FullName &lt; light.FullName) return -1; if (bud.FullName &gt; light.FullName) return 1; return 0; }, sortByLyncStatus: function (chuck, norris) { if (chuck.LyncAvailability == "Available" &amp;&amp; norris.LyncAvailability == "Available") { return this.sortByName(chuck, norris); } else { if (chuck.LyncAvailability == "Available") return -1; if (norris.LyncAvailability == "Available") return 1; else { // both are away, inactive, offline, or out of office var chuckLastActive = $.toDateFromJson(chuck.LyncLastActive); var norrisLastActive = $.toDateFromJson(norris.LyncLastActive); if (chuckLastActive &lt; norrisLastActive) return 1; if (chuckLastActive &gt; norrisLastActive) return -1; return this.sortByName(chuck, norris); } } } solution some.prototype.obj = { sortByName: function (a, b) { // omitted for solution }, sortByLyncStatus: function(a, b) { // compare cases // default to name comparison return some.prototype.obj.sortByName(a, b); } }
tagged with: javascript
has comment: http://stackoverflow.com/comment/39552644
has comment: http://stackoverflow.com/comment/39552806
tagged with: scope
score: 0
answer count: 1

http://stackoverflow.com/comment/39368763
has text: .menul and .menur has 3 click-events. #right and #left are getting everytime when ".menul" or ".menur" is clicked a new hover event.
score: 0
comment on: http://stackoverflow.com/q/25265980
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39476018
comment on: http://stackoverflow.com/a/25323958
type: Comment
score: 0
has text: Let me go and see if I can get that to work then, will update with what happens. **EDIT** Still gives me the same outcome. I get the text from the element and even though I call the remove method, nothing happens. I'm trying to avoid using a `compile()`, mostly because I don't understand it.
type: AnswerComment

http://stackoverflow.com/q/25239531
tagged with: web-services
accepted answer: http://stackoverflow.com/a/25242500
tagged with: yui
type: AnsweredQuestion
downvote count: 0
score: 1
has title: Why is io request sent that many times?
favorite count: 0
has answer: http://stackoverflow.com/a/25242500
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
has body: I'm new to Yui but still plan on understanding it. Therefore, I need you ! I'm have a bit of a problem and haven't found any solution yet. Here is the plan : I have a button and when I click on it, that button will send Json to a webservice. If it was sent successfully, I get a 'success' alert and 'failure' otherwise. Here is the problem : I click on the button once, I get 1 success alert (ok) I click one more time, I get 2 success alerts (why two ??) I click a third time and get 3 more success alerts... I refresh the page, click the button and get 1 success alert So why is that ? Why would it display twice the alert the second time ? Here is the Yui code I am using : YUI().use('io-base', 'json', 'event', 'querystring-stringify-simple', function (Y) { Y.one('#connectBut').on('tap', function (e){ var jsonCreateUser = { "login": "01234", "password": "TestUser" }, handleSuccess = function () { alert("success"); }, handleFailure = function () { alert("failure"); }, url = 'myServer'; Y.on('io:success', handleSuccess); Y.on('io:failure', handleFailure); Y.io(url, { method: 'POST', data: jsonCreateUser }); }); }); IF that sounds any obvious to you, please explain me, really want to understand this one. Thanks for the help !
has comment: http://stackoverflow.com/comment/39324445

http://stackoverflow.com/q/25363805
type: Question
has answer: http://stackoverflow.com/a/25364083
score: -2
has body: Javascript :Replace URL content--I have following html file and I want to replace URL with a new URL but my problem is i dont know exact value of a0 ,it can be any URL,any help will be appreciated thanks domain
tagged with: javascript
has title: Javascript :Replace URL content string with another url
downvote count: 2
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25364083
type: AnsweredQuestion
upvote count: 0

http://stackoverflow.com/comment/39458799
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25314564
score: 0
has text: for example: ret[0]='file1.jpg' ret[1]='file2.pdf'

http://stackoverflow.com/comment/39430567
type: Comment
has text: your fiddle is working.
type: QuestionComment
comment on: http://stackoverflow.com/q/25299328
score: 0

http://stackoverflow.com/q/25389233
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39597161
has comment: http://stackoverflow.com/comment/39597648
has answer: http://stackoverflow.com/a/25390144
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39598241
score: 0
accepted answer: http://stackoverflow.com/a/25390144
tagged with: http://stackoverflow.com/tag/html
has title: Javascript scroll to dynamic element
has body: i am adding dynamic div element with id 'newid' and using another button, i am trying to scroll to that dynamic element. After adding few dynamic elements, when i press the scroll button, i am scrolled to the end (last div element) but it stops working. My overall goal for this testing is to scroll to a dynamic added element. I dont have basics to move on, so please someone help me in the right direction. Below is the code Document test Add Element Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laborum odit, ipsa aspernatur reiciendis facere labore accusamus architecto perspiciatis minus ad perferendis, illo nisi doloribus id quidem corporis blanditiis vel itaque! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laborum odit, ipsa aspernatur reiciendis facere labore accusamus architecto perspiciatis minus ad perferendis, illo nisi doloribus id quidem corporis blanditiis vel itaque! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laborum odit, ipsa aspernatur reiciendis facere labore accusamus architecto perspiciatis minus ad perferendis, illo nisi doloribus id quidem corporis blanditiis vel itaque! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laborum odit, ipsa aspernatur reiciendis facere labore accusamus architecto perspiciatis minus ad perferendis, illo nisi doloribus id quidem corporis blanditiis vel itaque! Test

http://stackoverflow.com/comment/39384819
has text: I suspect it's because the way I am returning that "d3.svg.axis()..." but I am not sure I understand what is happening.
comment on: http://stackoverflow.com/q/25274560
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25280911
answer count: 3
has title: How to read XML server response in JavaScript?
tagged with: javascript
has answer: http://stackoverflow.com/a/25281246
favorite count: 0
tagged with: ajax
upvote count: 3
has comment: http://stackoverflow.com/comment/39395926
linked to: http://stackoverflow.com/q/649614
tagged with: http://stackoverflow.com/tag/xml
downvote count: 0
type: UnansweredQuestion
type: Question
score: 3
tagged with: java
has answer: http://stackoverflow.com/a/25281198
has answer: http://stackoverflow.com/a/25281072
has comment: http://stackoverflow.com/comment/39395652
has body: I work on a web project and at this point I need to pass a hard-coded xml from Java to JavaScript to parse that xml; the problem is that I don't know exactly how to do this. As shown below, my xml is stored in a String variable, so I need to pass this variable to JavaScript. I'm using tomcat as a server. Java Code - that creates xml: @Path("/getXml") @GET @Produces(MediaType.TEXT_XML) @Consumes(MediaType.TEXT_PLAIN) public String getXml(@Context HttpServletRequest request) throws TransformerConfigurationException, TransformerException{ try { DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); Document document = docBuilder.newDocument(); Element rootElement = document.createElement("news-counts"); document.appendChild(rootElement); int j=12; for(int i=1; i&lt;10; i++) { Element item = document.createElement("item"); rootElement.appendChild(item); item.setAttribute("count", "" + j); item.setAttribute("date", "201408" + "0" + i); j=j+2; } TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); // transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); StringWriter writer = new StringWriter(); transformer.transform(new DOMSource(document), new StreamResult(writer)); String xmlOutput = writer.getBuffer().toString().replaceAll("\n|\r", ""); // return Response.status(Status.NOT_ACCEPTABLE).entity("xmlOutput").build(); //System.out.println(xmlOutput); return xmlOutput; } catch (ParserConfigurationException ex) { Logger.getLogger(Searcher.class.getName()).log(Level.SEVERE, null, ex); } finally { return null; } } JavaScript code - how I tried to acces the xmlOutput variable function test() { var r=new XMLHttpRequest(); r.open("GET", "http://localhost:8080/WebApplication6/tavi/searcher/getXml" , false); r.send(); var responseText = r.responseText; alert(responseText); }

http://stackoverflow.com/q/25353648
has comment: http://stackoverflow.com/comment/39530320
downvote count: 0
has comment: http://stackoverflow.com/comment/39529900
has comment: http://stackoverflow.com/comment/39529948
score: 1
has title: using this rather than $(this) in an .each() call
has comment: http://stackoverflow.com/comment/39530723
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39530418
has comment: http://stackoverflow.com/comment/39530281
has comment: http://stackoverflow.com/comment/39530100
has comment: http://stackoverflow.com/comment/39530546
has comment: http://stackoverflow.com/comment/39531010
has comment: http://stackoverflow.com/comment/39530449
has comment: http://stackoverflow.com/comment/39529988
tagged with: javascript
has comment: http://stackoverflow.com/comment/39530049
has comment: http://stackoverflow.com/comment/39529870
has body: I've done quite a lot of reading this past day to get a deeper understanding of this vs. $(this) and how JS determines this as it interprets, but I still can't figure out one detail of a plugIn I'm analyzing to deepen my knowledge: $.fn.plugInName = function(options) { return this.each(function() { new $.plugInName(this,options); }); }; Everything I've read indicates that although this.each() is used to call JQuery.prototype.each(), each object should be referred to as $(this) within the each() function, but the above uses regular ol' this, and I can't figure why. The $.plugInName declaration looks like this: $.plugInName = function(el,options) { ... } Any insights anyone may have will be a big help. EDIT: Here's the full source on GitHub
has comment: http://stackoverflow.com/comment/39530032
has comment: http://stackoverflow.com/comment/39529848
has answer: http://stackoverflow.com/a/25353789
accepted answer: http://stackoverflow.com/a/25353789
upvote count: 1
has comment: http://stackoverflow.com/comment/39530206
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39530143
favorite count: 0
has comment: http://stackoverflow.com/comment/39530354
has comment: http://stackoverflow.com/comment/39530079
has comment: http://stackoverflow.com/comment/39530602

http://stackoverflow.com/comment/39537111
score: 0
type: Comment
type: QuestionComment
has text: have you used $parent in this case?
comment on: http://stackoverflow.com/q/25357625

http://stackoverflow.com/a/25343123
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25343104
type: Answer
answers question: http://stackoverflow.com/q/25343104
score: 2
upvote count: 2
has body: This: var userTrials = document.getElementbyId("userGuesses").innerText; gets the text of the "userGuesses" element as a string, but here: userTrials.appendChild(divisor); your code treats it as if it were a DOM node. Because there's no "appendChild" property on a String instance, it's undefined, and that explains the error &mdash; you're trying to make a function call but the function reference is undefined instead. edit &mdash; oh also that typo in "getElementById()" is also important, as noted by crclayton in a comment. I missed that one :) The general trick to dealing with the undefined is not a function error is to try and find a place where your code might come up with undefined instead of a reference to a function. The primary causes, in my experience, are: Typos, like the "getElementbyId" thing. If the function name is misspelled, JavaScript won't understand that and so it can't give a better error. Unsatisfied assumptions about what a variable or property refers to, as in the userTrials variable. Assumption that some function returns a reference to a function, when it in fact (might) return undefined

http://stackoverflow.com/comment/39505966
type: Comment
comment on: http://stackoverflow.com/a/25339522
has text: ok but how do you reinit in the seond version of the carousel
score: 1
type: AnswerComment

http://stackoverflow.com/q/25380964
score: 1
type: Question
linked to: http://stackoverflow.com/q/4210145
tagged with: javascript
answer count: 2
accepted answer: http://stackoverflow.com/a/25402960
upvote count: 1
possible better answer: http://stackoverflow.com/a/25400957
tagged with: jquery
has answer: http://stackoverflow.com/a/25400957
tagged with: asp.net
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25402960
has body: Apologies for bringing this question up again, I have looked through the other questions on SO, Code Project, ASP Forums and TinyMCE forums and no cigar. I have an update panel within sits two Templates with content text areas (asp:textbox) which are handled by Collapsible Panel Extenders. On Page_Load both the text areas are being controlled by the TinyMCE plugin, but when you close one and open it again, neither have the TMCE controller for the textbox. I am trying to get the TinyMCE controller to populate the textareas regardless of partial postback. I have tried removing all of the other jQuery plugins and scripts to no effect, so I have ruled out compatibility issues with the other scripts. To clarify within my code the reinitialisation segment works with the other plugins I have so I would have expected/hoped it would have worked here. I have slimmed down and simplified my code to only contain the relevant segments, if I have missed anything please let me know and I'll update the question. Any help would be greatly appreciated, thanks. Scripts &lt;script src="../Scripts/tinymce/tinymce.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(function () { tinymce.init({ menubar: false, width: 800, height: 250, selector: "textarea" }); function confirm_delete() { return confirm('Are you sure that you wish to delete this announcement?'); } // reinitialise everything after postback var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_endRequest(function () { tinymce.init({ menubar: false, width: 800, height: 250, selector: "textarea" }); &lt;/script&gt; ASP Update Panel &lt;asp:UpdatePanel ID="annupd" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional" &gt; &lt;ContentTemplate&gt; &lt;asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource1" DataKeyNames="Id" InsertItemPosition="FirstItem" ItemPlaceholderID="lay0" OnItemCommand="ListView1_ItemCommand" AllowPaging="True" EnableViewState="tru…
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/415711
has title: TinyMCE UpdatePanel Re Init Issue
downvote count: 0

http://stackoverflow.com/q/25317997
score: 11
tagged with: regex
has comment: http://stackoverflow.com/comment/39465149
has answer: http://stackoverflow.com/a/74222112
type: Question
has body: Im creating an ID from elements name attribute and they have some not allowed characters, I would like to create a function that replaces charcters if they are not on the list with _. I tried to google it, but all I found was regexp examples with where not quite what Im looking for. This is what I made: /([^A-Za-z0-9[\]{}_-])\s?/g but this doesn't exclude ] and [, maybe some other characters too. How can I make that it replaces all characters with _ that are not [A-Za-z0-9], -, _, ., :? EDITED .. and if first character is not a number make it one. If somebody knows a better way how to do it, please share it.
has title: Function to create a valid id from string. Regular Expression
tagged with: javascript
upvote count: 13
tagged with: jquery
downvote count: 2
answer count: 3
has answer: http://stackoverflow.com/a/25318218
has answer: http://stackoverflow.com/a/25318092
favorite count: 0
has comment: http://stackoverflow.com/comment/39465198
type: UnansweredQuestion

http://stackoverflow.com/comment/39442051
type: QuestionComment
comment on: http://stackoverflow.com/q/25305507
score: 0
has text: off-topic: `amount * 10 / 100` is equivalent to `amount / 10`
type: Comment

http://stackoverflow.com/q/25320279
has answer: http://stackoverflow.com/a/71252196
tagged with: javascript
tagged with: jquery
has body: I'm using the popular wordpress plugin called Contact Form 7. Its easy to redirect the form after submitting to any page by adding this code on_sent_ok: "location = 'http://example.com/';", but it does not carry the form values entered over, because its an AJAX submit. The sites directions says `The simplest way is using on_sent_ok JavaScript action hook. By using this hook, you can specify a JavaScript code that you wish to run after the form is successfully submitted. You will find the Additional Settings field at the bottom of the contact form management page." Would anyone be able to help or explain how I could carry the form values over on the redirect? This is the redirection page I got from Contact Form 7 http://contactform7.com/redirecting-to-another-url-after-submissions/
has comment: http://stackoverflow.com/comment/39469619
favorite count: 0
has title: Wordpress Send Form Data on Redirection in Contact Form 7
has answer: http://stackoverflow.com/a/51250581
answer count: 4
has answer: http://stackoverflow.com/a/46161216
type: AnsweredQuestion
score: 1
tagged with: wordpress
upvote count: 1
tagged with: forms
possible better answer: http://stackoverflow.com/a/46161216
has answer: http://stackoverflow.com/a/25321226
type: Question
downvote count: 0
accepted answer: http://stackoverflow.com/a/25321226

http://stackoverflow.com/q/25291148
score: 0
has comment: http://stackoverflow.com/comment/39415078
has answer: http://stackoverflow.com/a/25291372
answer count: 1
has comment: http://stackoverflow.com/comment/39414860
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39414862
has comment: http://stackoverflow.com/comment/39414842
has comment: http://stackoverflow.com/comment/39415197
type: Question
has body: Alrighty, this is going to be really easy I'm sure, but after searching a fair amount and visiting the jQuery IRC, I still can't get this to work. Here's what I have going on. I need to get the contentURL value - in this case, http://contenturl.com'. (see XML below post) According to other SO posts and IRC people, this should have worked. However, it returns 'undefined'. var videoUrl = $('meta[itemprop=contentURL]').attr('content'); So I got rid of .attr('content'); and set a break point and I can see that I get an object, and inside that object I can see that content: "http://contenturl.com" is there. How the heck do I get that URL? &lt;div class="my_class"&gt; &lt;meta itemprop="description" content="description, blah blah" /&gt; &lt;meta itemprop="duration" content="00:02:10:00" /&gt; &lt;meta itemprop="thumbnailUrl" content="http://thumbnailurl.com" /&gt; &lt;meta itemprop="contentURL" content="http://contenturl.com"/&gt;
has title: jQuery - get attribute returning undefined
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25260421
has answer: http://stackoverflow.com/a/25260636
has body: I am new to Javascript, I am using Backbone So I add a style like this(to a link when its clicked) $(eventC.target.parentNode).css('border', '1px solid red'); I want the previous link to be cleared of the red border I added when I click on new link I looked at link below jQuery - remove style added with .css() function So in essence I want to do this: $(OLDLINK).css('border', 'none'); $(NewLINK).css('border', '1px solid red'); with events I get from backbone Is there a simple way to do this? or is this approach just wrong?
score: 0
has answer: http://stackoverflow.com/a/25260574
has comment: http://stackoverflow.com/comment/39358431
has comment: http://stackoverflow.com/comment/39358282
has title: JQuery remove styles added
linked to: http://stackoverflow.com/q/2690865
answer count: 4
accepted answer: http://stackoverflow.com/a/25260574
linked to: http://stackoverflow.com/q/4036857
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25260792
tagged with: backbone.js
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39358139
possible better answer: http://stackoverflow.com/a/25260636
has answer: http://stackoverflow.com/a/25260683

http://stackoverflow.com/a/25258252
has body: Use single quote for filter inside the style tag. $('#cell').append(" Please wait ... ");
answers question: http://stackoverflow.com/q/25258145
has comment: http://stackoverflow.com/comment/39355123
has comment: http://stackoverflow.com/comment/39355202
score: 0
has comment: http://stackoverflow.com/comment/39357447
type: Answer

http://stackoverflow.com/comment/39458778
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25314420
has text: @JamesMontagne Duh ! basic debugging , ur right .

typeahead
type: Tag
tags question: http://stackoverflow.com/q/25343771
tags question: http://stackoverflow.com/q/25292840
tag name: typeahead
tags question: http://stackoverflow.com/q/25288298
tags question: http://stackoverflow.com/q/25292267

http://stackoverflow.com/q/25383810
tagged with: javascript
tagged with: sharepoint-2010
tagged with: jquery
tagged with: sharepoint
has body: This is my javascript code to bind function BindGridView() { $.ajax({ type: "POST", url: "AllItems.aspx/PPB", data: "{}", contentType: "application/json", dataType: "json", success: function (data) { for (var i = 0; i < data.d.length; i++) { $("#grv1").append(" " + data.d[i].Name + " " + data.d[i].age + " " + data.d[i].city +" "); } } }) } This is Design Code <asp:GridView runat="server" ID="grv1"> </asp:GridView> I have already created custom list called PPB in sharepoint with 3 columns, and that list i want to bind to the gridview using javascript or jquery and should be displayed on pranav.aspx. Want Help...Thank you.! I have tried but its not working..
score: 0
answer count: 1
has title: Bind Custom List to Gridview using javascript in sharepoint designer
type: UnansweredQuestion
tagged with: sharepoint-designer
has answer: http://stackoverflow.com/a/25805907
type: Question

http://stackoverflow.com/q/25310450
tagged with: javascript
has answer: http://stackoverflow.com/a/59471160
tagged with: jquery
tagged with: ajax
score: 19
has comment: http://stackoverflow.com/comment/105120946
has comment: http://stackoverflow.com/comment/39451218
answer count: 4
has answer: http://stackoverflow.com/a/25311247
favorite count: 0
has comment: http://stackoverflow.com/comment/39450745
has title: Cross-origin resource sharing (CORS) concept
possible better answer: http://stackoverflow.com/a/25310855
has answer: http://stackoverflow.com/a/25310855
type: AnsweredQuestion
upvote count: 19
has body: I have a question on the concept cross domain JavaScript. There is server(ex amazon.com) where in only selected domains can use their web-service. So definitely, if I try to use their service, from my local, I cannot. I got this on my console Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://football20.myfantasyleague.com/2014/export?TYPE=rosters&amp;L=52761&amp;W=&amp;JSON=0. This can be fixed by moving the resource to the same domain or enabling CORS. PS: I used jquery cross domain way too, but didnt work. But if some domain who is among the selected ones, to use Amazon's webservice, has a JavaScript, which if we include in our html, it works. &lt;script src="http://example.com"&gt;&lt;/script&gt; They have a method to get response by Ajax. My questions are: What happens when we refer a JavaScript file from an internet url. Do we have a local copy running on our machine? Is the httpRequest created, will have a request source as my domain or the xyz.
accepted answer: http://stackoverflow.com/a/25311247
has answer: http://stackoverflow.com/a/52071980
has comment: http://stackoverflow.com/comment/39450935
type: Question
tagged with: cors
downvote count: 0
has comment: http://stackoverflow.com/comment/39450777

http://stackoverflow.com/q/25311204
tagged with: css
duplicate of: http://stackoverflow.com/q/5078239
answer count: 0
has comment: http://stackoverflow.com/comment/39452918
tagged with: forms
has body: I am using WordPress I have a form that I'm writing from scratch. The label and input box are on one line, but there is a mysterious space between them (its not padding or margin). I know that this spacing can be due to spacing between divs. I wrote the code so that the divs are rights next to each other: Name [text* your-name] Service [text* your-service] (Note: the extra div around the second "appointment-field-name" and "appointment-field-input" is so that it aligns it with the div above. No idea why) However, when it renders, both lines are separated (see HTML below) Here is the html: (PLEASE NOTE: I know this isn't the cleanest way to code in HTML. However, I am showing EXACTLY what my browser is rendering, versus what I inputted in the back end. (see above code)) Name Service Here is the CSS .wpcf7 { margin: 0; padding: 0; } .appointment-field-name { padding: 9px 0px; margin-bottom: 20px; text-align: center; color: #ffffff; background-color: #002d80; font-size: 142.86%; width: 240px; display: inline-block; vertical-align: top; } .appointment-field-input { text-align: left; display: inline-block; vertical-align: top; } .wpcf7-text { padding: 11px 20px; background-color: #D5DFF2; font-size: 120%; width: 100%; } input { border: 0; } span.wpcf7-form-control-wrap { position: relative; } And here is the fiddle: http://jsfiddle.net/4nkydy76/2/ How do I remove this space so that the input box is flush against the label? Thank you for your time! NOTE: To address the duplicate question problem: as I mentioned in my post, I know that the spacing is due to spaces between the divs in the code (as was the answer in the cited duplicate question). My problem is that WordPress is rendering my code differently, even though I eliminated any spaces between divs (see the first piece of code in this post). Thank you.
has comment: http://stackoverflow.com/comment/39452609
type: Question
linked to: http://stackoverflow.com/q/5078239
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39453043
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39452385
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39452557
has title: Semi-mysterious space between label and input text box
has comment: http://stackoverflow.com/comment/39452502

http://stackoverflow.com/comment/39330557
comment on: http://stackoverflow.com/a/25244839
score: 0
type: AnswerComment
type: Comment
has text: oh ok sorry sir I will include it now

http://stackoverflow.com/q/25372793
has answer: http://stackoverflow.com/a/25385719
favorite count: 0
upvote count: 2
tagged with: python
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25376169
tagged with: selenium
accepted answer: http://stackoverflow.com/a/25385719
has comment: http://stackoverflow.com/comment/39575553
type: Question
downvote count: 0
possible better answer: http://stackoverflow.com/a/25375884
tagged with: javascript
has answer: http://stackoverflow.com/a/25375884
has body: How do I get the text from inputs without value attribute with Selenium? The problem is that they are filled automatically (maybe with JavaScript) when the page loads and the text doesn't appear on the html so I can't find anything that represents it.
answer count: 3
has comment: http://stackoverflow.com/comment/39589764
has title: Copy text from an input field and save it into a variable with python

http://stackoverflow.com/comment/39309755
type: QuestionComment
has text: how did you tried using `.off()`?
score: 1
comment on: http://stackoverflow.com/q/25234393
type: Comment

http://stackoverflow.com/q/25317668
type: Question
has comment: http://stackoverflow.com/comment/39483470
tagged with: c#
has comment: http://stackoverflow.com/comment/39490118
linked to: http://stackoverflow.com/q/25228291
has title: How go I get the javascript in my user control to work inside of a panel whose visibility is false on page load?
tagged with: javascript
tagged with: user-controls
has answer: http://stackoverflow.com/a/27688691
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39464470
tagged with: asp.net
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39481944
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39464536
has body: I am working on an ASP.NET/C# project in which we are placing a user control into an AJAX panel whose visibility is set to false on page load. The visibility of this panel is set to true once the user submits some parameters. However, although the user control and all of the other panel contents are visible once these parameters are set and submitted, the uc's javascript functions do not work. I attempted to solve this issue by adding Page.Controls.Add(controlID) in Page_Load if it is not a postback. The functionality is all there when I do this, but I know that there is a better way to get the functionality because in this case the control is being added to the page twice. EDIT: I put the controller in a div outside of the panel and got the control that I wanted out of it. However, if anyone can explain why the javascript of the control wasn't defined or offer a solution that keeps my UC in the panel, I would really appreciate it.
score: 1
has comment: http://stackoverflow.com/comment/39482750
upvote count: 1

http://stackoverflow.com/q/25253834
has comment: http://stackoverflow.com/comment/39440409
downvote count: 0
tagged with: d3.js
type: Question
score: 3
has comment: http://stackoverflow.com/comment/39469050
has comment: http://stackoverflow.com/comment/39438364
upvote count: 3
has comment: http://stackoverflow.com/comment/39439695
answer count: 1
tagged with: javascript
tagged with: sorting
favorite count: 0
has body: Currently this stacked bar chart is sorted from left to right based on the total of each bar. How would I also sort each individual bar so that instead of sorting each individual bar by the key (i.e. Under 5 years old is at the bottom and 65 years and over is at the top) it would sort each individual bar by the value (largest at the bottom and smallest at the top). For example: Currently the CA bar is stacked like this (from bottom to top) CA,2704659,4499890,2159981,3853788,10604510,8819342,4114496 I would like it stacked like this (from bottom to top) CA,10604510,8819342,4499890,4114496,3853788,2704659,2159981 Just to be clear, I need to be able to do this on the client side (i.e. changing the order or format of the original data is not an option).
has title: Sorting a d3.js stacked bar chart
has answer: http://stackoverflow.com/a/25323291
accepted answer: http://stackoverflow.com/a/25323291
type: AnsweredQuestion

http://stackoverflow.com/a/25386059
answers question: http://stackoverflow.com/q/25382999
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39623753
accepted answer of: http://stackoverflow.com/q/25382999
has body: This is hard to answer without anything more specific than the error message so please try to whittle it down a bit more. With the info given: It could be one of the calls to .html(): ... html_element.html(value); ... html_element.html(html_element.attr('data-language')); .html() internally uses .innerHtml. Your error could occur because html_element is an element on which that can't be called (see the corresponding MSDN article), for example: elements without closing tag (input) elements where innerHtml is read-only (tr) If the page in question includes HTML5-only or custom elements that could also be the cause.

http://stackoverflow.com/q/25336468
type: Question
has comment: http://stackoverflow.com/comment/39500394
has body: I have the following JSON: { "firstArrayOfJSON": [ { "something" : "something" }, { "another" : "another" }, { "secondArrayOfJson" : [ { "something" : "something", "other" : "other" } ] } ] } On variable watch (Google Chrome), before any processing, the object appears as: [0]: Object something : "something" another : "another" secondArrayOfJson : Object [0]: something : "something", [1]: other : "other" And the following JQuery ajax: $.ajax({ type: "POST", url: url, data: data, success: success, dataType: "json" }); On the server (Express JS), I have a test service that just spits out the request body. I then proceed to check the response on the client. The response has changed: The first level array show as: [0]: Object something : "something" another : "another" secondArrayOfJson : Object [0][something] : "something", [1][other] : "other" I can still use the object normally: firstArrayOfJson[2].secondArrayofJson[0].something I have tested storing on a Mongo server and the array elements look really as [0][something] (Robomongo) When I add another object to the secondArrayOfJson, the "problem" disappears. So unless this is a viewer issue happening both on Google Chrome and Robomongo, this is really how the object is passed. I wonder if there is a logical reason for this or if I should worry about anything I am doing.
has title: JQuery JSON Array formatting/serializing before posting
score: 0
tagged with: http://stackoverflow.com/tag/json
answer count: 1
tagged with: arrays
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/25336933

http://stackoverflow.com/comment/39586081
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25381683
has text: Does it support transpilation of getter/setter syntax?
score: 0

http://stackoverflow.com/comment/39567041
comment on: http://stackoverflow.com/a/25372695
type: AnswerComment
has text: I understand asynchronous vs synchronous. I am new to angular though and your answer doesnt really tell me how to solve the issue.
score: 0
type: Comment

datetimepicker
type: Tag
tags question: http://stackoverflow.com/q/25254225
tag name: datetimepicker

http://stackoverflow.com/comment/39444034
comment on: http://stackoverflow.com/q/25306775
has text: When you hit enter the button will do its normal thing: submit the form. Is your `case 13: ...` inside a function ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25333238
tagged with: jquery
has comment: http://stackoverflow.com/comment/39624278
upvote count: 3
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39494706
favorite count: 0
has answer: http://stackoverflow.com/a/25333307
downvote count: 5
has comment: http://stackoverflow.com/comment/39494228
type: UnansweredQuestion
tagged with: php
has body: I'm building a contact form for my website and I would like users to enter their information, click submit, have the information process with php and to just have a message display on the bottom of the form. Originally, I was redirecting to another page and the form was working properly, but now I just want to append a small message and can't get it to work. This is what I have currently in my contactengine.php file for it to process all the variables and send the email. if ($success){ THIS IS WHAT I DID BEFORE THAT WORKED BUT HAS TO REDIRECT // print "&lt;meta http-equiv=\"refresh\" content=\"0;URL=index_thanks.html\"&gt;"; // //BELOW IS WHAT I WANT TO OCCUR &lt;script type="text/javascript"&gt; $("#contact-area").append("Thanks for your message!") &lt;/script&gt; }
has title: How to append to form "Thanks for the email!" after submit button is pressed?
tagged with: forms
has comment: http://stackoverflow.com/comment/39494304
type: Question
has comment: http://stackoverflow.com/comment/39494335
score: -2
has answer: http://stackoverflow.com/a/25333325
tagged with: javascript

http://stackoverflow.com/q/25335804
has answer: http://stackoverflow.com/a/25335850
has body: I have a string which I need to separate correctly: self.view.frame.size.height = 44 I need to get only view, frame, size, and height. And I need to do it with a regular expression. So far I've tried a lot of variants, none of them are even close to what I want to get. And my code now looks like this: var testString = 'self.view.frame.size.height = 44' var re = new RegExp('\\.(.*)\\.', "g") var array = re.exec(testString); console.log('Array length is ' + array.length) for (var i = 0; i &lt; array.length; i++) { console.log('&lt;' + array[i] + "&gt;"); } And it doesn't work at all: Array length is 2 &lt;.view.frame.size.&gt; &lt;view.frame.size&gt; I'm new at Javascript, so maybe I want the impossible, let me know. Thanks.
tagged with: arrays
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39499028
has comment: http://stackoverflow.com/comment/39500375
accepted answer: http://stackoverflow.com/a/25335872
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39506085
score: 1
tagged with: string
possible better answer: http://stackoverflow.com/a/25335896
favorite count: 0
has answer: http://stackoverflow.com/a/25335896
type: Question
has comment: http://stackoverflow.com/comment/39499039
upvote count: 1
has title: Using regular expression to split a string
tagged with: regex
has answer: http://stackoverflow.com/a/25335872
answer count: 3

http://stackoverflow.com/q/25295098
answer count: 1
has comment: http://stackoverflow.com/comment/39422710
tagged with: javascript
has comment: http://stackoverflow.com/comment/39422544
has comment: http://stackoverflow.com/comment/39422475
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25295260
has title: Angular UI Router: read child scope value
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39423076
has comment: http://stackoverflow.com/comment/39422488
has comment: http://stackoverflow.com/comment/39423139
has answer: http://stackoverflow.com/a/25295260
has body: I have a parent view with a button in it. Parent controller: 'ControllerA' Template: 'partials/viewA.html' Child controller: 'ControllerB' Template: 'partials/viewB.html' clicking a button in viewB sets a value in ControllerB Is it possible to read that value from viewA without doing an emit or broadcast? I basically want viewA (parent view) button disabled until the button in viewB is clicked. EDIT essentially it'd be nice to just do: Parent Button
type: Question
tagged with: angular-ui-router
has comment: http://stackoverflow.com/comment/39422481
score: 0
has comment: http://stackoverflow.com/comment/39422620

http://stackoverflow.com/a/25388454
score: 3
has comment: http://stackoverflow.com/comment/39596916
upvote count: 3
has body: You can use the Array.filter function. You call it directly on your array then provide a callback. If that callback returns true, the element is included in a new array that's returned from filter. For example: var newArr = array.filter(function(item) { return (item.WeekNo &gt;= 29 &amp;&amp; item.WeekNo &lt; 32); }); Here's an updated JSfiddle with this included.
type: AcceptedAnswer
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25388371
accepted answer of: http://stackoverflow.com/q/25388371

http://stackoverflow.com/comment/39406795
type: QuestionComment
comment on: http://stackoverflow.com/q/25286647
has text: add an onclick handler in your template onclick="openLbox(this)" or add a click handler to the parent and get the target element that was clicked.
score: 0
type: Comment

http://stackoverflow.com/a/25321238
has comment: http://stackoverflow.com/comment/39471325
has comment: http://stackoverflow.com/comment/39471366
score: 1
has comment: http://stackoverflow.com/comment/39471285
has comment: http://stackoverflow.com/comment/39471425
downvote count: 0
answers question: http://stackoverflow.com/q/25320758
has body: I could see the blue you mean on loading the page. From using the element inspector I can see the default link colour is blue and your links in .mainnav are green in a larger font. Your mainnav links also have a css transition, and what you are seeing is the transformation from the initial small blue text to the larger green text on pageload. The best way to troubleshoot something like this is to strip back everything and see what happens as you add it back piece by piece. e.g. Are you adding classes via Javascript that cause the transition to trigger? For a quick fix, try changing the default link colour in foundation.css to green so there is no colour transition. FYI you have normalize.min.css and foundation.min.css commented out in your code, so no its nothing to do with how you are importing them :)
has comment: http://stackoverflow.com/comment/39471252
type: Answer
upvote count: 1

http://stackoverflow.com/a/25283486
answers question: http://stackoverflow.com/q/25283410
score: 0
type: Answer
has body: Check the return value before button clicked 2nd time and before timeout of 400 seconds , if(! increase) increase = setTimeout(increasing, 400); Then clear timeout : clearTimeout(increase);

http://stackoverflow.com/a/25303571
downvote count: 0
type: Answer
has body: There is nothing wrong. You are just seeing the fact that Parse.com CloudCode and nearly all JavaScript you will encounter runs asynchronously. console.log doesn't print immediately to the console like some code would running in a shell on your local system. It's more like saying to the system "Please print this console.log message as soon as you can" it's up to the system when that gets executed. All that you know is that it will happen sometime. Logging isn't that important (and Parse.com console sucks) so there isn't a way to control this behaviour but for operations where ordering is important, you can get a callback when the operation is complete in order to schedule your next operation. E.g. console.log("Count : 0", { success: function() { console.log("Count : 1", { success: function() { console.log("Count : 2", { success: function() { }); }); }); Note that this is just an example - you can't actually run that code because console.log doesn't support callbacks. Check out Parse.Query which does. The code can get a little cumbersome and over indented so as you get further into it, you should start to learn how to use promises. See Parse.Promise.
upvote count: 1
has comment: http://stackoverflow.com/comment/39438315
score: 1
accepted answer of: http://stackoverflow.com/q/25303160
answers question: http://stackoverflow.com/q/25303160
type: AcceptedAnswer

http://stackoverflow.com/comment/39349918
has text: sorry, I misunderstood your question before. Just realize that when you hover on the sub area it will close after the delay that you put in mouseleave, so what you want is to make it not close right?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25255409

http://stackoverflow.com/comment/39563229
comment on: http://stackoverflow.com/a/25371243
score: 0
type: AnswerComment
type: Comment
has text: See the other answer. It's a tiny fraction of the amount of code to just write out the HTML and wrap it in `$()`.

http://stackoverflow.com/a/25298164
has comment: http://stackoverflow.com/comment/39428706
upvote count: 3
has comment: http://stackoverflow.com/comment/39428726
type: Answer
answers question: http://stackoverflow.com/q/25298064
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25298064
has body: Right now you are returning a promise, and you need to be accessing the data.: Feed.showFeeds().success( function(data) { $scope.feeds = data.feeds; });
type: AcceptedAnswer

http://stackoverflow.com/q/25318198
tagged with: javascript
has comment: http://stackoverflow.com/comment/39466317
linked to: http://stackoverflow.com/q/13349573
type: Question
possible better answer: http://stackoverflow.com/a/25318347
has comment: http://stackoverflow.com/comment/39466795
has answer: http://stackoverflow.com/a/25319930
upvote count: 1
has comment: http://stackoverflow.com/comment/39465926
downvote count: 0
has comment: http://stackoverflow.com/comment/39467153
has body: I'm using Django for my webapp. I'm sending a JSON data to my views but I'm not able to access Nodes and edges by calling decoded_data['nodes'] and it gives me : 'NoneType' object is not subscriptable error message. Here is how I send json to to my view: var a={ nodes: thisGraph.nodes, edges: saveEdges }; //send data to server $(document).ready(function(){ function change(){ $.ajax({ type:"POST", url: "/", data: {'data': JSON.stringify(a)}, dataType: "json", success: function(){ console.log("Ajax worked"); $('#message').text("Ajax worked"); }, headers:{'X-CSRFToken': csrftoken} }); here is my view: data = request.POST.get("data") json_encoded = json.dumps(data) decoded_data = json.loads(json_encoded) logger.error(decoded_data['nodes']) the decoded_data looks like this: {"nodes":[{"type":"node","title":"new concept","id":0,"x":658,"y":100},{"type":" constraint","id":2,"title":"new Constraint","x":371,"y":95}],"edges":[{"source": 2,"target":0}]} I appreciate your help
has comment: http://stackoverflow.com/comment/39465693
favorite count: 0
has comment: http://stackoverflow.com/comment/39467035
has comment: http://stackoverflow.com/comment/39466056
has answer: http://stackoverflow.com/a/25320059
has comment: http://stackoverflow.com/comment/39466688
accepted answer: http://stackoverflow.com/a/25320059
has comment: http://stackoverflow.com/comment/39465989
answer count: 3
has comment: http://stackoverflow.com/comment/39467455
has comment: http://stackoverflow.com/comment/39466275
has comment: http://stackoverflow.com/comment/39465838
tagged with: python
has comment: http://stackoverflow.com/comment/39467658
has comment: http://stackoverflow.com/comment/39467213
has comment: http://stackoverflow.com/comment/39467699
has comment: http://stackoverflow.com/comment/39468495
has answer: http://stackoverflow.com/a/25318347
has title: Reading Json in python (Django)
tagged with: django
has comment: http://stackoverflow.com/comment/39465992
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39467532
has comment: http://stackoverflow.com/comment/39467283
score: 1
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/39533413
type: QuestionComment
score: 0
has text: From the code above, only the position should change (as it's a percentage), but there's no reference to size at all. If the size changes too, it must be defined somewhere as a percentage. If not, I'd love to see a demo.
comment on: http://stackoverflow.com/q/25355441
type: Comment

http://stackoverflow.com/q/25326911
type: Question
tagged with: twitter-bootstrap
answer count: 2
has answer: http://stackoverflow.com/a/25327459
upvote count: 1
has answer: http://stackoverflow.com/a/37715047
has title: Two different bootstrap menu collapse on same button
tagged with: css
tagged with: wordpress
downvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has body: I have a Wordpress site with Bootstrap 3.2 and I'm trying to make 2 different menus to collapse in the same bootstrap button is this posible? How? Actually it has the two menus that collapse in different buttons (Top one is not working and don't know why) but I want them to collapse in the same. <a title="<?php bloginfo('name'); ?>" href="<?php echo home_url(); ?>"> Toggle navigation <a class="navbar-brand" href="<?php echo home_url(); ?>"> <?php wp_nav_menu(array( 'menu' => 'primary', 'theme_location' => 'primary', 'depth' => 2, 'container' => 'div', 'container_class' => 'collapse navbar-collapse navbar-right', 'container_id' => 'topbar', 'menu_class' => 'nav navbar-nav', 'fallback_cb' => 'wp_bootstrap_navwalker::fallback', 'walker' => new wp_bootstrap_navwalker()) ); ?> <img id="zapatero" src="<?php bloginfo("template_url"); ?>/img/circulo-logo.png" height="160px" class="img-responsive" /> Toggle navigation <?php wp_nav_menu(array( 'menu' => 'secondary', 'theme_location' => 'secondary', 'depth' => 2, 'container' => 'div', 'container_class' => 'collapse navbar-collapse ', 'container_id' => 'bs-example-navbar-collapse-2', 'menu_class' => 'nav navbar-nav', 'fallback_cb' => 'wp_bootstrap_navwalker::fallback', 'walker' => new wp_bootstrap_navwalker()) ); ?> <?php get_search_form(); ?>
score: 1
favorite count: 0

http://stackoverflow.com/q/25305078
favorite count: 0
tagged with: angularjs
answer count: 0
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39989479
tagged with: angular-ui-router
has comment: http://stackoverflow.com/comment/39479702
has body: I use the AngularJS ui.router in my application. For a new use case I want to change the view from index.html to my partialview options.html. My options.html has different sections. The routing between the different views is working correctly, but I want to change the view and go directly to the section on this view. Means from resources/html/index.html to resources/html/index.html#/options with a specific section. I have a dropdown-menu with different ui-sref (some for tests) and there I want to call the view and section. Dropdown Menu in index.html Home //works fine Optionen //works fine option1 //here should be the call of the view and section options.html with some sections option1 ... option2 app.js App.config(['$stateProvider', function ($stateProvider, $urlRouterProvider) { $stateProvider .state('home', { url : '/home', templateUrl: 'home/homeLayout.html' }) .state('options', { url : '/options', templateUrl: 'options/options.html' }); }]); Does anybody have a solution for this? Thanks in advance. EDIT If I hit the URL resources/html/index.html#/options#option2 directly in the browser, I come to the options page and to the correct section. But this is what I dont want.
type: Question
has title: AngularJS ui.router change page and go to specific section
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39537184
has comment: http://stackoverflow.com/comment/39991496
score: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39896273

http://stackoverflow.com/q/25319783
accepted answer: http://stackoverflow.com/a/25319813
tagged with: class
possible better answer: http://stackoverflow.com/a/25319809
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
has title: jQuery "Class" troubles - "Unexpected token this"
has answer: http://stackoverflow.com/a/25319813
type: AnsweredQuestion
has body: I am currently using a script for Classes: http://digg.googlecode.com/files/Class-0.0.2.js I have the latest version of jQuery loaded. This is my code. var Deck = Class.create({ init: function() { var this.list = []; }, console: function() { console.log(this.list); }, addCards: function (elemone, elemtwo, elemthree) { $(elemone).each(function(i, el) { var values = $(elemtwo, this).text(); if ($(elemthree, this).text() == "2") { this.list.push(values); } this.list.push(values); }); } }); I'm getting the error "Unexpected token this" just by loading the above code. The expected behavior is creating an object with this var deck = new Deck(); Then adding a list of cards found by addCards with this deck.addCards(elements, go, here); And finally accessing it with deck.list or within the functions by this.list (the latter of which I believe causes the error). Changing var this.list to just this.list causes another error - Cannot read property 'push' of undefined
type: Question
has answer: http://stackoverflow.com/a/25319809

http://stackoverflow.com/comment/39413578
score: 0
type: AnswerComment
type: Comment
has text: @FelixKling In the time that it took you to explain why you couldn't answer... you could have answered. ;) hahaha
comment on: http://stackoverflow.com/a/25289789

http://stackoverflow.com/comment/39339010
comment on: http://stackoverflow.com/a/25249798
has text: What about `console.log( data[0].7 )` or `console.log( data[0]['7'] )`?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25304387
has body: The problem with your attempted code is that you do not have an array of numbers, you have an array of objects. If you want to count the most values then you have to use that value, rather than the whole object. In regards to the code you have attempted, you just need to change the following line: var el = array[i].values; Here is the full code: function mode(array) { if(array.length == 0) return null; var modeMap = {}; var maxEl = array[0], maxCount = 1; for(var i = 0; i &lt; array.length; i++) { var el = array[i].values;// This is the change. if(modeMap[el] == null) modeMap[el] = 1; else modeMap[el]++; if(modeMap[el] &gt; maxCount) { maxEl = el; maxCount = modeMap[el]; } } return maxEl; } Here is a working example
type: Answer
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25304109
upvote count: 3

http://stackoverflow.com/comment/39552857
comment on: http://stackoverflow.com/a/25366071
type: Comment
type: AnswerComment
has text: Or long_random_int.toString(36) for random 0-9A-Za-z without a dictionary
score: 0

http://stackoverflow.com/comment/39305474
has text: You can do this much more simply with pure CSS: `#header-wrapper { min-height: 100vh; }`
comment on: http://stackoverflow.com/q/25232403
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/39485671
score: 0
type: Comment
type: AnswerComment
has text: ok. thanks man. I will work on it.I appreciate your time for us.
comment on: http://stackoverflow.com/a/25318064

http://stackoverflow.com/q/25379226
has body: I had create a Object to store key &amp; value like var labReportMap = new Object(); And put some value like labReportMap ["1"] = "one"; And i am getting value back using statement like, labReportMap["one"] , so it returns value one in all the internet explorer versions over 8. It is displays undefined in version 8.
has comment: http://stackoverflow.com/comment/39578249
linked to: http://stackoverflow.com/q/1168807
has comment: http://stackoverflow.com/comment/39578135
has comment: http://stackoverflow.com/comment/39578059
answer count: 0
score: 0
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39578568
tagged with: internet-explorer
tagged with: internet-explorer-8
has comment: http://stackoverflow.com/comment/39578296
tagged with: javascript
has title: Can not get value from Object(Key-value) in Javascript for IE8
has comment: http://stackoverflow.com/comment/39578188

http://stackoverflow.com/q/25279827
has answer: http://stackoverflow.com/a/25280252
has comment: http://stackoverflow.com/comment/39436348
type: AnsweredQuestion
tagged with: casperjs
has answer: http://stackoverflow.com/a/25280890
linked to: http://stackoverflow.com/q/15739263
has comment: http://stackoverflow.com/comment/39430307
has comment: http://stackoverflow.com/comment/39425647
has comment: http://stackoverflow.com/comment/39397572
upvote count: 1
tagged with: web-crawler
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39470041
has answer: http://stackoverflow.com/a/25320765
tagged with: javascript
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/39394187
has body: target html is like 2014年 2013年 is not a simple anchor tag, so in my browser, when i click the span tag, it will call the config.js to do something(i dont know what does it did), it will get change the content. but when i use this.click() to simulate the mouse action, it doesnot work. because i know the casperjs can work like a browser. if i want to crawl different years content, how can i do my code is var casper = require("casper").create({ clientScripts: [ "jquery-1.7.2.js", "config.js"], //in url page call this js remoteScripts: ["http://static.qiyi.com/js/qiyi/config.js"],//also the config.js stepTimeout: 120 * 1000, //单步超时时间 pageSettings: { loadImages: false }, verbose: true, logLevel: "error" }); var fs = require('fs'); var filename = 'content.txt'; casper.on('resource.received', function(resource) { casper.echo(resource.url); }); casper.on('click', function(resource) { casper.echo("click"); }); casper.on("page.error", function(msg, trace) { this.echo("Error: " + msg, "ERROR"); }); casper.on("resource.error", function(resourceError { console.log(JSON.stringify(resourceError));}); casper.start("http://www......"); casper.then(function() { this.evaluate(function(){ document.querySelectorAll('[data-value="2013"]')[0].click(); //it does not work }); this.echo("click"); }); casper.then(function() { this.click('span[data-value="2013"]'); //it does not work fs.write(filename, this.getHTML(), 'w'); this.echo("click"); }); casper.run();
has comment: http://stackoverflow.com/comment/39429867
has comment: http://stackoverflow.com/comment/39470199
favorite count: 0
has comment: http://stackoverflow.com/comment/39474754
accepted answer: http://stackoverflow.com/a/25320765
possible better answer: http://stackoverflow.com/a/25280252
has title: how can casperjs click() tag not an anchor
has comment: http://stackoverflow.com/comment/39395142
has comment: http://stackoverflow.com/comment/39470204

http://stackoverflow.com/q/25359905
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39541727
type: Question
downvote count: 2
has body: I am using a pure JavaScript count down timer that I shared below to redirect to a URL after some time and show the left time to visitor also. DEMO: JSFiddle You Will Be Redirected To Next Page After Seconds. Now I want the same function and features and work in pure PHP as you know that many old mobile browsers still does't not support JavaScript and many are using JavaScript blocker. So Is this possible to do the same in Pure PHP, no tags. UPDATE: I know the below codes but I want a count down timer too to show to the visitor. <?php header('Refresh: 5; URL=http://jsfiddle.net/'); ?>
tagged with: javascript
linked to: http://stackoverflow.com/q/1447842
favorite count: 0
possible better answer: http://stackoverflow.com/a/25360351
has title: CountDown Timer Before Redirect In Pure PHP
has comment: http://stackoverflow.com/comment/39541785
has answer: http://stackoverflow.com/a/50765202
answer count: 5
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25360003
upvote count: 4
has answer: http://stackoverflow.com/a/50765137
tagged with: http-redirect
has answer: http://stackoverflow.com/a/25361279
has answer: http://stackoverflow.com/a/25360003
tagged with: php
has answer: http://stackoverflow.com/a/25360351

http://stackoverflow.com/comment/39593822
type: QuestionComment
comment on: http://stackoverflow.com/q/25387326
has text: @isherwood, I don't think I'm understanding quite right. When I use that substring statement it only returns a few characters...and none of the ones I need to show up.
score: 0
type: Comment

http://stackoverflow.com/q/25280400
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/25280999
has answer: http://stackoverflow.com/a/25280752
tagged with: angular-ui-router
has comment: http://stackoverflow.com/comment/39397559
has body: I've generated an angular project using yeoman. I had an index.html with ng-view and I was showing claims.html, claim-details.html through corresponding controllers and they get rendered in ng-view properly. Now, I've a signin.html page with specific css and it's a full structured HTML page. I want to show this when user is not logged in. As soon as he's authenticated, he should be redirected to above said views. How can I configure this? I've following routing app.config(function ($routeProvider) { $routeProvider .when('/', { templateUrl: 'views/claims.html', controller: 'ClaimsCtrl' }) .when('/signin', { templateUrl: 'views/signin.html', controller: 'SigninCtrl' }) .when('/dashboard', { templateUrl: 'views/dashboard.html', controller: 'DashboardCtrl' }) .otherwise({ redirectTo: '/' }); }); Is it possible to mention, which .html should be rendered as part of ng-view and which should be a standalone html file? i.e. I want claims.html and dashboard.html to be part of ng-view, but signin.html should be standalone
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has title: How to show a custom html page and view based page conditionally in angularjs
tagged with: http://stackoverflow.com/tag/html
score: 1
tagged with: ng-view
favorite count: 0
tagged with: angularjs
type: Question

http://stackoverflow.com/comment/39585166
comment on: http://stackoverflow.com/q/25383124
type: Comment
type: QuestionComment
has text: Can you fix the app so it just returns an array of strings, instead of those confusing objects?
score: 0

http://stackoverflow.com/q/25307641
has answer: http://stackoverflow.com/a/25308033
favorite count: 0
has title: Is there possible to loop inside JavaScript object literal
has comment: http://stackoverflow.com/comment/39445583
has answer: http://stackoverflow.com/a/25307730
has comment: http://stackoverflow.com/comment/39445882
has body: So this is my question (maybe stupid), is there any possible to do this: var data { "label" : value, "sets" : [ for (var i=0; i &lt; item.length; i++) { somedata: "data" } ] } to reach result: var data { "label" : value, "sets" : [ { somedata: "data1" }, { somedata: "data2" } ] } Much thx for help.
has comment: http://stackoverflow.com/comment/39445719
has comment: http://stackoverflow.com/comment/39445611
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25307730
has answer: http://stackoverflow.com/a/25308362
has answer: http://stackoverflow.com/a/25307758
score: 1
accepted answer: http://stackoverflow.com/a/25308033
has comment: http://stackoverflow.com/comment/39445566
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25307814
has comment: http://stackoverflow.com/comment/39445568
answer count: 6
has comment: http://stackoverflow.com/comment/39445773
has answer: http://stackoverflow.com/a/25307818
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39516009
type: QuestionComment
has text: @CJRamki Yeah, If a user choose "Math" it would lead them to a differing input or fieldset than if they chose "Science".
comment on: http://stackoverflow.com/q/25345635
score: 0
type: Comment

http://stackoverflow.com/a/25346094
has body: Take a look at this jQuery plugin You can enable any action at the end of a video with something like this: onPlayerEnded: function(){ // Do something here }, I found a post that could help you out HERE
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25346009
type: Answer
upvote count: 1

http://stackoverflow.com/comment/75774791
score: 0
type: AnswerComment
type: Comment
has text: Thank you for this. <Recharts /> requires you to set an explicit width and height so this was very helpful
comment on: http://stackoverflow.com/a/36626909

http://stackoverflow.com/comment/39452089
type: AnswerComment
has text: I made a proxy, and it's successfully returning the XML I need, but my Seadragon viewer is failing to load the tiles when I pass in the XML. I tried both OpenSeadragon() and Seadragon.Viewer.openDzi() but neither works; OpenSeadragon opens the viewer but fails to load the tiles, and Seadragon.Viewer.openDzi loads a 400 error.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25291176

http://stackoverflow.com/comment/39653762
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25381269
type: Comment
has text: thx Daniel I wil give it a try. Meanwhile I settle with ajax call to controller to retrieve values when 1st dropdown changed,

http://stackoverflow.com/comment/39561747
type: Comment
has text: Awesome, thanks for all the help! I didn't think about browser rendering as separate from my js code. I'll go ahead and read up on the event loop and concurrency model.
comment on: http://stackoverflow.com/a/25368765
type: AnswerComment
score: 0

http://stackoverflow.com/a/25297359
has comment: http://stackoverflow.com/comment/39427144
score: 5
answers question: http://stackoverflow.com/q/25297332
accepted answer of: http://stackoverflow.com/q/25297332
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39427282
has comment: http://stackoverflow.com/comment/39427178
upvote count: 5
has comment: http://stackoverflow.com/comment/39427269
type: Answer
has body: The standard way in JavaScript is just an object: var map = {}; map["any key you like"] = any_value_you_like; // Also: map.any_name_you_like_that_fits_identifer_name_rules = any_value_you_like; The keys are always strings (for now, ES6 will add symbol/name keys), the values are any JavaScript value. When you use dot notation (obj.foo), the property name is a literal (and subject to JavaScript's rules for IdentifierName); when you use brackets notation and a string (obj["foo"]), the property name can be just about anything (and can be the result of any expression, such as a variable lookup). Example: Live Copy var map = {}; map["a"] = "alpha"; map["b"] = "beta"; map["c"] = "gamma"; ["a", "b", "c"].forEach(function(key) { display("map['" + key + "'] = " + map[key]); }); Output: map['a'] = alpha map['b'] = beta map['c'] = gamma dandavis raises an interesting point: When you create an object via {}, it inherits properties from Object.prototype, but as of ES5 you can use Object.create(null), which doesn't: var map = Object.create(null); map["any key you like"] = any_value_you_like; // Also: map.any_name_you_like_that_fits_identifer_name_rules = any_value_you_like; That way, if you happen to have the potential for keys with names like toString or valueOf (which are on Object.prototype), you won't get false positives when looking them up on an object where you haven't set them explicitly.
downvote count: 0
has comment: http://stackoverflow.com/comment/39427568

http://stackoverflow.com/a/25289403
has comment: http://stackoverflow.com/comment/39411859
has comment: http://stackoverflow.com/comment/39411761
type: Answer
has comment: http://stackoverflow.com/comment/39411830
has comment: http://stackoverflow.com/comment/39411735
downvote count: 0
score: 6
has comment: http://stackoverflow.com/comment/39411796
has body: You can try to use nextSibling DOM property: $( 'br' ).each( function() { console.log( $( this ).get( 0 ).nextSibling.nodeValue ); }); jsFiddle
has comment: http://stackoverflow.com/comment/39412271
answers question: http://stackoverflow.com/q/25289309
accepted answer of: http://stackoverflow.com/q/25289309
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39412127
upvote count: 6

http://stackoverflow.com/comment/39539295
has text: id's should be used as they are unique items.. Also im not sure how this answers the question ..
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25358818
type: Comment

http://stackoverflow.com/a/25358080
has body: Just after posting this question, i realised the problem. My tooltip exists inside a cart, that is rebuilt each time I add a product to it. I needed to re initiate my tooltip each time I rebuild my cart.
score: 1
accepted answer of: http://stackoverflow.com/q/25302104
answers question: http://stackoverflow.com/q/25302104
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/comment/39533035
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25355262
type: Comment
has text: Also, `this` *can* be `null` or `undefined` when in strict mode. The proper approach would not be to do `return this`, but rather to throw the proper error as required by ECMAScript.

http://stackoverflow.com/a/25376822
score: 5
type: AcceptedAnswer
upvote count: 5
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25376711
type: Answer
answers question: http://stackoverflow.com/q/25376711
has body: You then shouldn't use the iconSrc / view icon setting of the column. Instead you have to compute your own HTML as a value in that column and set the FA-class depending on your column value(s). Make sure you set the content type for the column to "HTML" and not "Text".

http://stackoverflow.com/comment/39345371
has text: Without ever having used ng-grid, is there a way for you to have a secret option for all 1000 to be viewed, exported, and then back to whatever view they were using before?
comment on: http://stackoverflow.com/q/25253204
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25266545
has comment: http://stackoverflow.com/comment/39376716
has comment: http://stackoverflow.com/comment/39377322
has comment: http://stackoverflow.com/comment/39370744
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39369510
has comment: http://stackoverflow.com/comment/39372266
has comment: http://stackoverflow.com/comment/39375680
has body: You can do an ajax call to get the data: var x = (new Date()).getTime(); // get data from python script $.ajax({ type: "GET", url: "/get_data", data: data, // your "template" data goes here success: function(my_value) { var y = my_value; series.addPoint([x, y], true, true); } }); And in your server make Flask get the data: @app.route('/get_data', methods=['GET']) def get_data(): df = sqlio.read_sql(query, conn) value = df['my_column'][0] return value
has comment: http://stackoverflow.com/comment/39376232
has comment: http://stackoverflow.com/comment/39375801
type: Answer
has comment: http://stackoverflow.com/comment/39375914
has comment: http://stackoverflow.com/comment/39377271
has comment: http://stackoverflow.com/comment/39375536
has comment: http://stackoverflow.com/comment/39373558
has comment: http://stackoverflow.com/comment/39371441
has comment: http://stackoverflow.com/comment/39370663
accepted answer of: http://stackoverflow.com/q/25266354
has comment: http://stackoverflow.com/comment/39371600
has comment: http://stackoverflow.com/comment/39376638
has comment: http://stackoverflow.com/comment/39369689
has comment: http://stackoverflow.com/comment/39375577
answers question: http://stackoverflow.com/q/25266354
has comment: http://stackoverflow.com/comment/39370425
has comment: http://stackoverflow.com/comment/39372291
has comment: http://stackoverflow.com/comment/39375668
has comment: http://stackoverflow.com/comment/39370453
has comment: http://stackoverflow.com/comment/39369662
has comment: http://stackoverflow.com/comment/39374718
has comment: http://stackoverflow.com/comment/39369940
has comment: http://stackoverflow.com/comment/39372693
has comment: http://stackoverflow.com/comment/39376439
has comment: http://stackoverflow.com/comment/39369846
has comment: http://stackoverflow.com/comment/39371021
score: 0
has comment: http://stackoverflow.com/comment/39370527

http://stackoverflow.com/a/25340999
accepted answer of: http://stackoverflow.com/q/25340923
has body: Found it in the docs: $view.find('ul').on('click', 'a', function() { var view = $.view(this); $.observable(tags).remove(view.index); });
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25340923
score: 0
type: Answer

http://stackoverflow.com/comment/39430377
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25299179
has text: It sounds like you've answered your own question. Remove the timeout and add click methods to your next and previous buttons. Also I would recommend avoiding the use of `eval()`
type: Comment

http://stackoverflow.com/comment/39349734
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25255484
has text: That's consistent with not removing the handler. When you finally click `confirm`, all three event handlers are firing with the value of `id` from previous assignments of the handler.

http://stackoverflow.com/comment/39439539
type: Comment
comment on: http://stackoverflow.com/a/25304074
has text: can you show me your `<s:checkbox ... /s:checkbox>` source after you compile it?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39462526
type: Comment
comment on: http://stackoverflow.com/q/25316629
score: 0
type: QuestionComment
has text: You should investigate using the Safari web debugger: http://webdesign.tutsplus.com/articles/quick-tip-using-web-inspector-to-debug-mobile-safari--webdesign-8787

http://stackoverflow.com/comment/39510341
score: 0
type: Comment
has text: @Friend I added the duplicate count to the answer.
comment on: http://stackoverflow.com/a/25342247
type: AnswerComment

http://stackoverflow.com/comment/39398028
comment on: http://stackoverflow.com/q/25282063
has text: What if you add `cache: false` to your ajax call, to make it not look for the cached response? This typically occurs when you navigate back to a form that cannot be cached.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25349725
has comment: http://stackoverflow.com/comment/39523503
has body: I have the following javascript function that posts back some data to my Django backend: // event_id/csrf_token is declared outside of this scope function requestInivtation(some_param) { $.ajax({ type: "POST", url: "/requestInvitation/", data: {"event_id" :event_id.toString(), "some_param" : some_param, "csrfmiddlewaretoken": csrf_token}, success: function(data) { alert("Requested."); } }); } I've set up this view on the backend... Here's the urls.py entry: url(r'^requestInvitation/$', views.requestInvitation, name='requestInvitation'), and the view: @login_required def requestInvitation(request): print "This is a test." return HttpResponse() When this javascript call is made, I am getting a 500 error back. The data seems valid going into the function, and the URL routing seems to be ok. I'm not sure what the next step is for debugging. In the django console, the only thing I'm seeing is this: [17/Aug/2014 08:26:43] "POST /requestInvitation/ HTTP/1.1" 500 9918 So my question is: How do I debug these 500 errors from javascript -> Django and how can I solve this scenario?
has comment: http://stackoverflow.com/comment/39523797
has comment: http://stackoverflow.com/comment/39523267
has comment: http://stackoverflow.com/comment/39523922
has comment: http://stackoverflow.com/comment/39523168
has comment: http://stackoverflow.com/comment/39523140
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39523785
has comment: http://stackoverflow.com/comment/39523496
tagged with: python
has comment: http://stackoverflow.com/comment/39523885
has comment: http://stackoverflow.com/comment/39523652
has comment: http://stackoverflow.com/comment/39523828
has comment: http://stackoverflow.com/comment/39523713
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39523130
tagged with: django
has comment: http://stackoverflow.com/comment/39523985
type: Question
has title: How to debug a 500 error from javascript to Django that isn't hitting the view

http://stackoverflow.com/comment/39397739
has text: @user2864740 and 'Salman A' I think i've figured it out from your pointers, I removed two of the jquery calls and lined the plugin scripts below a single 1.9.1 call. Seems to be working now :) Thanks for the guidance, this is all new and a very steep learning curve.
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25269778

http://stackoverflow.com/comment/68744361
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25311205
has text: I have the same issue with ogg/opus, have you managed to fix it?

http://stackoverflow.com/comment/39413399
comment on: http://stackoverflow.com/q/25289688
has text: Ok thanks, would you wanna leave this as an answer so I can accept it?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25369784
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25369947
has comment: http://stackoverflow.com/comment/39560624
has comment: http://stackoverflow.com/comment/39560996
has title: jQuery/JavaScript regex return matched text from string
has comment: http://stackoverflow.com/comment/39560383
has comment: http://stackoverflow.com/comment/39560425
has comment: http://stackoverflow.com/comment/39560264
has comment: http://stackoverflow.com/comment/39560258
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39560493
answer count: 3
has answer: http://stackoverflow.com/a/25370209
has answer: http://stackoverflow.com/a/25370084
has body: I am trying to create a fairly complex system for my website. I want to be able to write some pseudo like code and then parse it to make it do something in my back-end. My data is inside two $.each loops as this is an Object of data with multiple levels to it. For instance, I want to take a string like this: "&lt;!this!&gt; == &lt;!PropertyStreetNumber!&gt;" Then how I would like for the above code to executed is this: FormData[parentKey][this] == FormData[parentKey]["PropertyStreetNumber"] Thanks for any help! Here's some of my code, the code where this would need to go in (see commented area) http://jsbin.com/liquvetapibu/1/
tagged with: regex
has comment: http://stackoverflow.com/comment/39560398
score: 0

http://stackoverflow.com/a/25270001
score: 0
has body: For this kind of purposes there is a notification plugin in phonegap which also can be used as prompt http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#notification.alert // Amazon Fire OS / Android / BlackBerry 10 (OS 5.0 and higher) / iOS / Tizen // function alertDismissed() { // do something } navigator.notification.alert( 'You are the winner!', // message alertDismissed, // callback 'Game Over', // title 'Done' // buttonName ); Don't forget to see the quirk section to get it work in windows phone Windows Phone 7 and 8 Quirks There is no built-in browser alert, but you can bind one as follows to call alert() in the global scope: window.alert = navigator.notification.alert; Both alert and confirm are non-blocking calls, results of which are only available asynchronously.
answers question: http://stackoverflow.com/q/25269836
type: Answer

http://stackoverflow.com/comment/39512111
score: 0
has text: Oh, I see you edited the question again ;) If I knew that you need a image gallery I would already be done :) Check this answer [How to build a simple image gallery](http://stackoverflow.com/questions/24522439/how-to-build-a-simple-image-gallery-in-javascipt-using-popup-window) first and if you find it useful, I could go further and modify it to use a DIV instead of a popup window
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25342799

http://stackoverflow.com/a/25270211
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25265980
type: Answer
answers question: http://stackoverflow.com/q/25265980
downvote count: 0
score: 1
has body: I added my answer from your other question to this thread now as well to ensure it is not getting lost as I think your other question may get closed as a duplicate of this one. I had another look and you will have to add another class or data attribute to differentiate between an active-and-closed menu and a active-and-open menu or this won't work. The active "flag" is to ensure you only toggle the .open class on an active menu. In addition you also need to keep unbinding the hover event as otherwise you are constantly re-binding the hover, causing the element to have multiple hover events bound which then will all execute and contradict each other. Note that when unbinding the hover event using jQuery off('hover')/unbind('hover') doesn't work and you must unbind the mouseenter and mouseleave events as those are bound by jQuery when using selector.hover(...) The new JavaScript code is as follows: $('.menul').click(function () { $('#left').addClass('active'); $('#left').addClass('open'); $('#right').removeClass('active'); $('#right').off('mouseenter mouseleave').hover(function(){ if($('#left').hasClass('active')){ $('#left').toggleClass('open'); } }); }); $('.menur').click(function () { $('#right').addClass('active'); $('#right').addClass('open'); $('#left').removeClass('active'); $('#left').off('mouseenter mouseleave').hover(function(){ if($('#right').hasClass('active')){ $('#right').toggleClass('open'); } }); }); DEMO - Using a separate indicator for an active menu

http://stackoverflow.com/a/25334280
has comment: http://stackoverflow.com/comment/39496206
type: Answer
has comment: http://stackoverflow.com/comment/39496211
upvote count: 21
accepted answer of: http://stackoverflow.com/q/25333918
downvote count: 1
has comment: http://stackoverflow.com/comment/53797197
answers question: http://stackoverflow.com/q/25333918
score: 20
has body: Here's a Lodash solution using transform function deepMap(obj, iterator, context) { return _.transform(obj, function(result, val, key) { result[key] = _.isObject(val) /*&amp;&amp; !_.isDate(val)*/ ? deepMap(val, iterator, context) : iterator.call(context, val, key, obj); }); } _.mixin({ deepMap: deepMap });
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/65841725
has comment: http://stackoverflow.com/comment/105382997
has comment: http://stackoverflow.com/comment/39496398

http://stackoverflow.com/comment/39482030
comment on: http://stackoverflow.com/a/25326217
type: Comment
score: 0
has text: Yes, But when the application is running more reminder will be created... Is it easy to let my application communicate with the system cron to insert more events?
type: AnswerComment

http://stackoverflow.com/comment/39329005
type: Comment
score: 1
has text: Ok, thanks a lot! There are two problems about it: 1 value is a string instead a number and the match is done using the string representation of the number. I solved using mg-value in place of value.
type: AnswerComment
comment on: http://stackoverflow.com/a/25242837

http://stackoverflow.com/q/25378338
answer count: 0
type: UnansweredQuestion
tagged with: jquery-slider
has body: I want to use multiple Jquery slider for multiple filters, "Brightness / Contrast", "Denoise ", "Triangle Blur". GLFX plugin But applying filter is done with delay (about 1s) when the slide is fired. this is my code : window.onload = function () { var canvas = fx.canvas(); var image = document.getElementById('image'); var texture = canvas.texture(image); $('#image').replaceWith(canvas) canvas.draw(texture).triangleBlur(0).update(); canvas.draw(texture).denoise(50).update(); texture.destroy(); texture = canvas.contents(); $("#SliderTriangleBlur").slider({ range: "min", min: 0, max: 200, value: 0, slide: function (event, ui) { $("#AmountTriangleBlur").val(ui.value); var dNoise = $("#SliderDenoise").slider("option", "value"); var Brightness = $("#SliderBrightness").slider("option", "value"); var Contrast = $("#SliderContrast").slider("option", "value"); canvas.draw(texture).denoise(dNoise).brightnessContrast(Brightness, Contrast).triangleBlur(ui.value); canvas.update(); } }); $("#AmountTriangleBlur").val($("#SliderTriangleBlur").slider("value")); $("#SliderDenoise").slider({ range: "min", min: 0, max: 50, value: 50, slide: function (event, ui) { $("#AmountDenoise").val(ui.value); var triBlur = $("#SliderTriangleBlur").slider("option", "value"); var Brightness = $("#SliderBrightness").slider("option", "value"); var Contrast = $("#SliderContrast").slider("option", "value"); canvas.draw(texture).triangleBlur(triBlur).brightnessContrast(Brightness, Contrast).denoise(ui.value); canvas.update(); } }); $("#AmountDenoise").val($("#SliderDenoise").slider("value")); $("#SliderBrightness").slider({ range: "min", min: -1, max: 1, step: 0.01, value: 0, slide: function (event, ui) { $("#AmountBrightness").val(ui.value); var triBlur = $("#SliderTriangleBlur").slider("option", "value"); var dNoise = $("#SliderDenoise").slider("option", "value"); var Contrast = $("#SliderContrast").slider("option", "value"); canvas.draw(texture).triangleBlur(triBlur).denoise(dNoise).brightnessContrast(…
downvote count: 0
score: 1
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
has title: GLFX plugin delay in slider when multiple filter applies
upvote count: 1
favorite count: 0

http://stackoverflow.com/q/25378594
favorite count: 0
has body: I'm building a simple TODO app with ReactJS and need to sort todos with jQuery Sortable. I did most of the job, but finally got 2 problems which can't solve myself :( So here is the code: componentDidMount: function() { this.loadDataFromServer(); var jquery_sortable_config = {handle: '#handle'}; jquery_sortable_config.stop = this.handleSort; this.$jq = jQuery( this.refs.sortable.getDOMNode() ); this.$jq.sortable(jquery_sortable_config); }, toInt: function(id) { // I've got &lt;li id={"todo_" + todo.id}&gt;&lt;/li&gt; so I need to crop todo_ // was - todo_565 // return - 565 return parseInt(id.substring(5)); }, handleSort: function (event) { var order = this.$jq.sortable('serialize'); // sending new order to server, here is everything OK $.ajax ({ type: 'POST', url: 'update_order/', data: order }); var reordering = this.$jq.sortable('toArray').map(this.toInt); this.$jq.sortable('cancel'); // cancel direct DOM change, beacause React can't see it this.handleDOMUpdate(reordering); }, handleDOMUpdate: function(reordering) { console.log(reordering); // CONSOLE: // [566, 565] var newItems = []; var newState = {}; this.state.data.map(function(item, i, items) { // for testing there are just 2 elements in state and I just shuffle them newItems[0] = items[1]; newItems[1] = items[0]; }); newState = newItems; console.log(newState); // CONSOLE: // [Object, Object] // 0: Object // id: 566 // status: "done" // text: "Second task" // __proto__: Object // 1: Object // id: 565 // status: "" // text: "First task" // __proto__: Object // length: 2 // __proto__: Array[0] // so elements changed positions! // trying to set new state this.setState(newState); // and getting error: // Uncaught Error: Invariant Violation: Tried to merge an object, instead got [object Object],[object Object]. 10173493_255140104677950_2108691993_n.js:17078 // and futher: // invariant 10173493_255140104677950_2108691993_n.js:17078 // mergeHelpers.checkMergeObjectArg 10173493_255140104677950_2108691993_n.js:17652 …
accepted answer: http://stackoverflow.com/a/25394261
type: AnsweredQuestion
score: 2
downvote count: 0
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25394261
type: Question
tagged with: reactjs
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39603806
upvote count: 2
has title: Getting error: Tried to merge an object, instead got [object Object]
answer count: 1

http://stackoverflow.com/a/25347812
has body: I took a look at your code and see that there are a lot of elements in it, that you don't need. So I rearranged the HTML code (simplified it). Twitter YouTube ">Facebook Copyright goes here Twitter Youtube Facebook And the CSS that comes with it: #footer { box-sizing: border-box; margin-top: 40px; background: #21282e; overflow: auto; width: 100%; padding: 0 15%; color: #b0b6be; font-size: 18px; position:relative; } #footer p { width: 33.33%; float: left; } #footer p:nth-child(2) { text-align: center; } #footer p:nth-child(3) { text-align: right; } .icon { width: 32px; height: 32px; display: inline-block; border-radius: 4px; text-indent: 100%; white-space: nowrap; overflow: hidden; } .footer-twitter { background: url('...'); } .footer-youtube { background: url('...'); } .footer-facebook { background: url('...'); } What I've did is: Take away the #footerwrapper, instead of that I gave #footer a padding on the left and right of 15%. Adding a box-sizing: border-box to it aswell makes sure that the defined width is inclusive padding (and border when set). I've split the footer in three parts, using a p (semantically better then div) and give them all a width: 33.33%. The first automatically has a left alignment, the second will be centered and the last one on the right. Since all the paragraphs float, I gave the parent (#footer) a overflow: auto so it knows that there are floated items inside it, preventing them to flow out of the parent. Instead of wrapping the links in a div, you can display them as inline-blocks directly. This way you don't need the extra (meaningless) div. I also add a description between the starting and end tag of the link, and made sure to hide the text. You can find a demo here: JSFiddle.
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25347551
type: Answer
answers question: http://stackoverflow.com/q/25347551
score: 2
downvote count: 0

http://stackoverflow.com/comment/39547620
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25363371
has text: could show us what you already tried? perhaps put your code (including the results array) in a http://plnkr.co/ ?
score: 0

http://stackoverflow.com/a/25257305
has comment: http://stackoverflow.com/comment/39393610
has comment: http://stackoverflow.com/comment/39369248
has comment: http://stackoverflow.com/comment/39379888
accepted answer of: http://stackoverflow.com/q/25256837
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25256837
score: 0
has body: If you want to go with this code you should maybe use this: &lt;script&gt; $("#items a").click(function() { var id = $(this).attr("id"); $("#pages div, #pages2 div").siblings().hide("slow"); $("#pages div#" + id + "").toggle("slow"); }); &lt;/script&gt; I'm not sure if I understand the snippet correctly since I don't know the rest of your code :-) However, this isn't a good way to solve your issue. As in the comments already mentioned, it's a lot better to handle it with classes. Here is a jsfiddle which can easily solve your problem: JSFiddle However you might only change the effect, but this is a minor thing.
has comment: http://stackoverflow.com/comment/39391749
type: Answer

http://stackoverflow.com/a/25328750
score: 3
has comment: http://stackoverflow.com/comment/50107606
has comment: http://stackoverflow.com/comment/49957539
answers question: http://stackoverflow.com/q/25327282
has comment: http://stackoverflow.com/comment/39631318
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25327282
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39625979
has comment: http://stackoverflow.com/comment/49957715
type: Answer
has comment: http://stackoverflow.com/comment/49958025
has comment: http://stackoverflow.com/comment/49957376
has body: First observersation Never use DOMSubtreeModified that's a MutationEvent which was supposed to have been removed. You should use MutationObserver So in your case instead of container.addEventListener('DOMSubtreeModified, onChange, false); do this: const gMutationConfig = { subtree: true, childList: true }; var gMutationFunc = function(ms) { for (let m of ms) { console.log(m.type, m); //if (mutation.addedNodes &amp;&amp; mutation.addedNodes.length &gt; 0) { //this test if elements added onChange(); } }; var gMutationObserver = new this.DOMWindow.MutationObserver(container); Second thing is You probably should use nsIHTTPChannel for the redirect to be the fastest const { Ci, Cu, Cc, Cr } = require('chrome'); //const {interfaces: Ci, utils: Cu, classes: Cc, results: Cr } = Components; Cu.import('resource://gre/modules/Services.jsm'); Cu.import('resource://gre/modules/devtools/Console.jsm'); var observers = { 'http-on-modify-request': { observe: function (aSubject, aTopic, aData) { console.info('http-on-modify-request: aSubject = ' + aSubject + ' | aTopic = ' + aTopic + ' | aData = ' + aData); var httpChannel = aSubject.QueryInterface(Ci.nsIHttpChannel); var requestUrl = httpChannel.URI.spec if (requestUrl.indexOf('google.com') &gt; -1) { //httpChannel.cancel(Cr.NS_BINDING_ABORTED); //this aborts the load httpChannel.redirectTo(Services.io.newURI('data:text,url_blocked', null, null)); //can redirect with this line, if dont want to redirect and just block, then uncomment this line and comment out line above (line 17) } }, reg: function () { Services.obs.addObserver(observers['http-on-modify-request'], 'http-on-modify-request', false); }, unreg: function () { Services.obs.removeObserver(observers['http-on-modify-request'], 'http-on-modify-request'); } } }; To start observing To start start obseving all requests do this (for example on startup of your addon) for (var o in observers) { observers[o].reg(); } To stop observing Its important to stop observring (make sure to ru…
downvote count: 0
has comment: http://stackoverflow.com/comment/49957950
has comment: http://stackoverflow.com/comment/49957784
has comment: http://stackoverflow.com/comment/49957209

http://stackoverflow.com/q/25266551
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25266756
tagged with: datepicker
has comment: http://stackoverflow.com/comment/39369423
upvote count: 0
has comment: http://stackoverflow.com/comment/39369681
has comment: http://stackoverflow.com/comment/39369580
downvote count: 1
type: Question
tagged with: jquery-ui
has title: jquery ui datepicker error
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39370040
answer count: 1
tagged with: jquery
has body: This is the error message I get when try to implement the datepicker: Unhandled exception at line 133, column 9 - JavaScript runtime error: Object doesn't support property or method 'datepicker' This is the code I have added to the View: &lt;div class="form-group"&gt; @Html.LabelFor(model =&gt; model.Date, htmlAttributes: new { @class = "control-label col-md-2" }) &lt;div class="col-md-10"&gt; @Html.EditorFor(model =&gt; model.Date, new { htmlAttributes = new { @class = "form-control" } }) @Html.ValidationMessageFor(model =&gt; model.Date, "", new { @class = "text-danger" }) &lt;/div&gt; &lt;/div&gt;` Here is the script: &lt;script&gt; $(function () { $("#model.Date").datepicker(); }); This is my first jQuery element so I don't know what I am doing wrong. I don't understand the entire jQuery element process.
favorite count: 0

http://stackoverflow.com/q/25240267
type: Question
tagged with: javascript
has body: I have 3 php files: view.php, edit.php and edit2.php. I use view.php to display content of my DB tables, edit.php to edit a specific row (I use textboxes etc.) and edit2.php to write any changes to my database. After the query is successfully executed, edit2.php uses header("Location: edit.php"); to display the chosen row again (I use session variables in edit.php and unset them on view.php). edit.php and edit2.php are opened in a small popup window. Now what I would like to have is when I close my small window, view.php should be refreshed. I tried using onunload but what it does it is triggers itself each time a button is clicked in edit.php to send data to edit2.php, so when it returns to edit.php, it's blank because session variables are unset due to refreshing of view.php. I have this strange feeling, that I might have explained it in a twisted way... Nevertheless, I would need some help.
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39320526
linked to: http://stackoverflow.com/q/7353838
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25240495
accepted answer: http://stackoverflow.com/a/25240495
has title: Javascript refresh main page after closing child window (popup)

http://stackoverflow.com/q/25374656
has answer: http://stackoverflow.com/a/25374675
score: -1
type: Question
downvote count: 2
has comment: http://stackoverflow.com/comment/39569891
has answer: http://stackoverflow.com/a/25374715
upvote count: 1
accepted answer: http://stackoverflow.com/a/25374715
tagged with: function
has comment: http://stackoverflow.com/comment/39569820
tagged with: javascript
has comment: http://stackoverflow.com/comment/39569867
tagged with: typeerror
answer count: 3
possible better answer: http://stackoverflow.com/a/25374675
has answer: http://stackoverflow.com/a/25374921
has body: var userChoice = prompt("Do you choose rock, paper, or scissors?") var computerChoice = Math.random() if(computerChoice(0 &lt; 0.33)) { computerChoice = ("Paper"); } else if(computerChoice(0.34 &lt; 0.66)) { computerChoice = ("Rock"); } else { computerChoice = ("Scissors"); } Is there something I'm missing in this code? It looks fine to me.. Anyway, as I said, when I run this, I get the TypeError mentioned above. I am trying to get Paper if the random number is below .33, and Rock if it is .34-.66, and Scissors if it is .67-1.
favorite count: 0
has title: When I run this, I get "TypeError: Number is not a function"
has comment: http://stackoverflow.com/comment/39570120
type: AnsweredQuestion

http://stackoverflow.com/a/43184700
has body: Maybe too late to answer it. But your selector is returning null because at this line document.getElementById('#iframetest').style.display='block'; You need to change it to: document.getElementById('iframetest').style.display='block'; When you specify getElementById, then your JS will directly go to the element with the id of 'iframetest'. There is no need of '#'.
downvote count: 0
score: 1
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25235389

http://stackoverflow.com/q/25329590
downvote count: 0
has answer: http://stackoverflow.com/a/40099393
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has body: Amchart (bar chart) with scrolling has some zooming effect also when the scroll bar reaches to the end. How can i disable this zooming effect and have only scrolling. Here's the Fiddle ScrollBar Settings: "maxSelectedSeries": 10, "mouseWheelScrollEnabled": true, "chartScrollbar": { "graphType": "column", "resizeEnabled": false, "scrollbarHeight": 21, "scrollDuration": 0, "updateOnReleaseOnly": true } PS: I cannot disable the scrolling through mouse.
score: 2
tagged with: amcharts
type: Question
tagged with: javascript
tagged with: jquery
has title: Amcharts Only Scrolling ( no zooming )
has comment: http://stackoverflow.com/comment/39491706
answer count: 1

http://stackoverflow.com/comment/39406447
comment on: http://stackoverflow.com/q/25286488
type: QuestionComment
type: Comment
has text: @Braiam What's the point of trying to access something in another way than the prescribed `$(...).data` way? It's like saying, you would like to use some API's features, but without going through that API. Pointless?
score: 3

http://stackoverflow.com/comment/46973776
score: 0
type: Comment
has text: there's a new version of the ACT that might address this issue?
comment on: http://stackoverflow.com/a/26975843
type: AnswerComment

http://stackoverflow.com/q/25368547
has answer: http://stackoverflow.com/a/25368619
has answer: http://stackoverflow.com/a/25370730
upvote count: 11
favorite count: 0
type: UnansweredQuestion
tagged with: python
score: 11
has comment: http://stackoverflow.com/comment/39558336
has body: Have used python selenium script to trigger selenium server to run JavaScript code. It works fine. drv.execute_script('&lt;some js code&gt;') However, I can't figure out how to run javascript code on an element that was retrieved using get_element_by_*() api. For example, I ele = get_element_by_xpath('//button[@id="xyzw"]'); #question: how do I change the "style" attribute of the button element? If I were on developer console of the browser, I can run it as ele = $x('//button[@id="xyzw"]')[0] ele.setAttribute("style", "color: yellow; border: 2px solid yellow;") Just don't know how to do it in python selenium script. Thanks in advance.
tagged with: selenium-webdriver
has comment: http://stackoverflow.com/comment/39558664
tagged with: selenium
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39558636
downvote count: 0
tagged with: javascript
has title: Selenium Python bindings: how to execute JavaScript on an element?

http://stackoverflow.com/q/25283642
type: Question
has comment: http://stackoverflow.com/comment/39401238
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39400773
has body: I have a main page containing two pages that appears with certain action in panel, first one is view as the user log in to the website, $(document).ready(function(e) { $.get("activePages.xhtml", function(data) { $(".parent-panel").append(data); });}); the main page contains a button that on click it clears the panel and append the second page $('.main-button2').click(function(e) { $(".parent-panel").empty(); $.get("history.xhtml", function(data) { $(".parent-panel").append(data); }); }); my problem is that the first page may take too much time to be loaded then appended so if I click the button without giving time to the first page load, the first page and the second will be both appended under each other, how to stop this?
has answer: http://stackoverflow.com/a/25283814
accepted answer: http://stackoverflow.com/a/25283814
has comment: http://stackoverflow.com/comment/39400788
type: AnsweredQuestion
has title: Stop jquery action if another is in progress
has comment: http://stackoverflow.com/comment/39400781

http://stackoverflow.com/comment/39417526
has text: See [here](https://rawgit.com/operasoftware/devopera-static-backup/master/http/dev.opera.com/articles/view/the-opera-plug-in-interface/index.html) or [here](https://rawgit.com/operasoftware/devopera-static-backup/master/http/dev.opera.com/addons/extensions/index.html) for the old docs. For Opera Next, [extension are basically Chrome extensions](http://dev.opera.com/extensions/index.html).
score: 0
comment on: http://stackoverflow.com/q/25285042
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39544871
score: 1
comment on: http://stackoverflow.com/a/25358201
has text: By 'right now' I just want to state that this is not possible at the moment but might be in the future, this is for the case that someone comes across this answer in the future where things might have changed. I just want to outline that my answer is based on the facts at this very moment :-)
type: AnswerComment
type: Comment

java
tags question: http://stackoverflow.com/q/25294258
tags question: http://stackoverflow.com/q/25236619
tags question: http://stackoverflow.com/q/25268305
tags question: http://stackoverflow.com/q/25332208
tags question: http://stackoverflow.com/q/25273808
tags question: http://stackoverflow.com/q/25364756
tags question: http://stackoverflow.com/q/25284608
tags question: http://stackoverflow.com/q/25341980
tags question: http://stackoverflow.com/q/25381568
tags question: http://stackoverflow.com/q/25323388
tags question: http://stackoverflow.com/q/25232239
tags question: http://stackoverflow.com/q/25306170
tags question: http://stackoverflow.com/q/25270372
tags question: http://stackoverflow.com/q/25375649
tags question: http://stackoverflow.com/q/25303420
tags question: http://stackoverflow.com/q/25379340
tags question: http://stackoverflow.com/q/25319271
tags question: http://stackoverflow.com/q/25261839
tags question: http://stackoverflow.com/q/25364377
tags question: http://stackoverflow.com/q/25233804
tags question: http://stackoverflow.com/q/25265340
tags question: http://stackoverflow.com/q/25303859
tags question: http://stackoverflow.com/q/25239348
tags question: http://stackoverflow.com/q/25282874
tags question: http://stackoverflow.com/q/25380963
tags question: http://stackoverflow.com/q/25290599
tags question: http://stackoverflow.com/q/25280911
tags question: http://stackoverflow.com/q/25379122
tags question: http://stackoverflow.com/q/25280088
tags question: http://stackoverflow.com/q/25286558
tags question: http://stackoverflow.com/q/25355022
tags question: http://stackoverflow.com/q/25359786
tags question: http://stackoverflow.com/q/25357166
tags question: http://stackoverflow.com/q/25307958
tags question: http://stackoverflow.com/q/25239777
tags question: http://stackoverflow.com/q/25373902
tags question: http://stackoverflow.com/q/25260674
tags question: http://stackoverflow.com/q/25309540
tag name: java
tags question: http://stackoverflow.com/q/25319909
tags question: http://stackoverflow.com/q/25350609
tags question: http://stackoverflow.com/q/25366779
tags question: http://stackoverflow.com/q/25372515
tags question: http://stackoverflow.com/q/25307459
tags question: http://stackoverflow.com/q/25283846
tags question: http://stackoverflow.com/q/25255028
tags question: http://stackoverflow.com/q/25365054
tags question: http://stackoverflow.com/q/25370751
tags question: http://stackoverflow.com/q/25280220
tags question: http://stackoverflow.com/q/25261715
tags question: http://stackoverflow.com/q/25286791
tags question: http://stackoverflow.com/q/25350621
tags question: http://stackoverflow.com/q/25292728
tags question: http://stackoverflow.com/q/25287890
tags question: http://stackoverflow.com/q/25247162
type: Tag
tags question: http://stackoverflow.com/q/25288330
tags question: http://stackoverflow.com/q/25337976
tags question: http://stackoverflow.com/q/25235457
tags question: http://stackoverflow.com/q/25354484
tags question: http://stackoverflow.com/q/25350078
tags question: http://stackoverflow.com/q/25380952
tags question: http://stackoverflow.com/q/25298063
tags question: http://stackoverflow.com/q/25385911
tags question: http://stackoverflow.com/q/25287724
tags question: http://stackoverflow.com/q/25250438

http://stackoverflow.com/a/25352491
has body: You can't use variables in property names inside object literals (the precise syntax and semantics are specified in §11.1.5). The solution is to define the object first with any static properties, then add any dynamic properties to the object. In your case, I'd recommend creating the the plugins object separately, like this: var vpath = myarr[0]; var plugins = {}; plugins['http//www.test.com/image.swf'] = {link:"http://www.test.com/image.jpg"} plugins['http//www.test.com/'+ vpath +'/proxy.swf'] = {link:"http://www.test.com/link.php"}; jwplayer("player").setup({ flashplayer: "player.swf", config:"config.xml", autostart: false, allowscriptaccess: "always", height: 500, width: 625, plugins: plugins }); Another alternative, which might be useful in certain scenarios, is to use an IIFE: var vpath = myarr[0]; jwplayer("player").setup({ flashplayer: "player.swf", config:"config.xml", autostart: false, allowscriptaccess: "always", height: 500, width: 625, plugins: (function() { var obj = {}; obj['http//www.test.com/image.swf'] = {link:"http://www.test.com/image.jpg"} obj['http//www.test.com/'+ vpath +'/proxy.swf'] = {link:"http://www.test.com/link.php"}; })() });
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25352464
answers question: http://stackoverflow.com/q/25352464
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/39566517
type: Comment
type: QuestionComment
has text: I'll try it later (don't have gm for now), but I'm curious why the error message says the input file is empty if it's not.
comment on: http://stackoverflow.com/q/25372402
score: 0

http://stackoverflow.com/comment/39434762
has text: The text in #myDiv (h2 element) don't get the values i want after the user clicks a button
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25301636
type: QuestionComment

http://stackoverflow.com/comment/39526597
has text: @m90 if I have something like `[["1","0","0","0","0","0","0"],["0","0","0","0","0","0","0"]]`, how would I get the first section of this in js? I'd appreciate it
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25351232
type: Comment

http://stackoverflow.com/comment/39318503
comment on: http://stackoverflow.com/q/25239045
score: 0
has text: Have you enabled Universal Analytics for that property?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39348243
comment on: http://stackoverflow.com/a/25254274
type: Comment
has text: Why use a regex and convert a numeric keycode to a string just to check if a keycode is between two values?
score: 0
type: AnswerComment

http://stackoverflow.com/q/25230993
has title: Automatically login to gmail using javascript code
score: 0
answer count: 1
tagged with: autofill
has body: I am new to javascript programming and I am trying to write some javascript code that can automatically fill up and submit the login form of Google. The code below works fine when the current page is https://accounts.google.com/ServiceLogin?sacu=1&amp;continue=https%3A%2F%2Fwww.google.com.hk%2F%3Fgfe_rd%3Dcr%26ei%3DaaHnU563DIaL8Qeu-oG4Cw%26gws_rd%3Dssl&amp;hl=en var inputs = document.getElementsByTagName('input'); for(var k=0;k&lt;inputs.length;k++) { var input = inputs[k] ; var type = input.getAttribute('type'); if(type == 'email') input.value = "abc@gmail.com"; if(type == 'password') input.value = "1234"; } var forms=document.getElementsByTagName('form'); forms[0].submit(); Then I tried to add some codes so that if the browser is currently on another webpage, the program will direct to Google and login automatically. Here is what I have written: function autoSubmit(){ var inputs = document.getElementsByTagName('input'); for(var k=0;k&lt;inputs.length;k++) { var input = inputs[k] ; var type = input.getAttribute('type'); if(type == 'email') input.value = "abc@gmail.com"; if(type == 'password') input.value = "123"; } var forms=document.getElementsByTagName('form'); forms[0].submit(); } document.location.href="https://accounts.google.com/ServiceLogin?sacu=1&amp;continue=https%3A%2F%2Fwww.google.com.hk%2F%3Fgfe_rd%3Dcr%26ei%3DaaHnU563DIaL8Qeu-oG4Cw%26gws_rd%3Dssl&amp;hl=en"; window.onload=autoSubmit(); However, this doesn't work. It seems that the function autoSubmit() is executed before the Google webpage has been completely loaded. Could anyone please help me solve this problem?
has comment: http://stackoverflow.com/comment/39302596
has comment: http://stackoverflow.com/comment/39302610
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/18048338
has comment: http://stackoverflow.com/comment/39302626
type: Question
has answer: http://stackoverflow.com/a/25231048
has comment: http://stackoverflow.com/comment/39302698
tagged with: javascript

http://stackoverflow.com/comment/39454007
comment on: http://stackoverflow.com/q/25311937
score: 0
type: Comment
type: QuestionComment
has text: Then it's probably ok, I'm used to EJS which uses .html

http://stackoverflow.com/comment/39515897
score: 0
type: Comment
has text: Please note that the `split` method plays total havoc with multi-byte unicode characters used by some languages.
comment on: http://stackoverflow.com/a/25345121
type: AnswerComment

http://stackoverflow.com/comment/39525514
type: Comment
score: 1
has text: Thanks! I'll be saving this!
type: AnswerComment
comment on: http://stackoverflow.com/a/25350765

http://stackoverflow.com/a/25231962
has body: did some fixes on your functions and here we go: DEMO // Check if elem is in viewport function isElementInViewport(elem) { var $elem = elem; // Get the scroll position of the page. var scrollElem = ((navigator.userAgent.toLowerCase().indexOf('webkit') != -1) ? 'body' : 'html'); var viewportTop = $(scrollElem).scrollTop(); var viewportBottom = viewportTop + $(window).height(); // Get the position of the element on the page. var elemTop = Math.round($elem.offset().top); var elemBottom = elemTop + $elem.height(); return ((elemTop &lt; viewportBottom) &amp;&amp; (elemBottom &gt; viewportTop)); } // Check if it's time to start the animation. function checkAnimation(elem) { var $elem = elem; if ($elem.hasClass('start')) return; if (isElementInViewport($elem)) { $elem.addClass('start'); //animated progess bars bar_width = $elem.attr('aria-valuenow'); $elem.css('width',bar_width + '%'); } } // Capture scroll events $(window).scroll(function () { $('.progress-bar').each(function(){ checkAnimation($(this)); }); });
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25231805

http://stackoverflow.com/comment/39473376
type: Comment
comment on: http://stackoverflow.com/a/25321109
has text: @user3919801 I don't understand... The URL in my example is to the php script providing the content.
score: 0
type: AnswerComment

http://stackoverflow.com/a/25265409
upvote count: 1
answers question: http://stackoverflow.com/q/25264076
score: 1
has comment: http://stackoverflow.com/comment/39367683
has comment: http://stackoverflow.com/comment/39368135
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39369235
has body: Success is called when it is successful - http://api.jquery.com/jquery.ajax/: success Type: Function( PlainObject data, String textStatus, jqXHR jqXHR ) A function to be called if the request succeeds. The function gets passed three arguments: The data returned from the server, formatted according to the dataType parameter; a string describing the status; and the jqXHR (in jQuery 1.4.x, XMLHttpRequest) object. As of jQuery 1.5, the success setting can accept an array of functions. Each function will be called in turn. This is an Ajax Event. Use "success" if you want to check what data is returned... otherwise you should use "complete". Something like this should work: $.ajax({ data: $data, cache: false, async: false, beforeSend: function() { $('#btn-login').html('Logging In...'); }, success: callback() }, complete : function() { getUser(); initNavSwipeGestures(); $('#page-index').removeClass('active'); }, error: function(data, status) { alert(status); } }); var callback = function(response) { ///stuff to do after success here };
has comment: http://stackoverflow.com/comment/39368708

http://stackoverflow.com/q/25233667
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39308575
favorite count: 0
upvote count: 0
type: UnansweredQuestion
tagged with: iframe
has answer: http://stackoverflow.com/a/25234555
tagged with: internet-explorer
score: -1
type: Question
has body: have a problem with shopping cart JS ( add to cart ) - it does work normally as expected in Chrome, FF, Sarafi but doens't work in IE 11 and earlier ( suprisingle works in IE 8 ) JS file-https://volleyballcoachemag.com/jscripts/product.js add to shopping cart / add to wishlist do not work in IE. Probably the issue with window.location in IE, version with iframe ( not working in IE ): http://softballcoachemag.com/iframe-test/index.html version that works in IE ( without iframe ) https://volleyballcoachemag.com/s-1-frame_tharrett.aspx Solution needed so it will work within iframe
answer count: 1
downvote count: 1
tagged with: javascript
tagged with: jquery
has title: Javascript error in IE / iframe

http://stackoverflow.com/q/25348900
has comment: http://stackoverflow.com/comment/39521795
has comment: http://stackoverflow.com/comment/39522230
type: Question
has body: I don't know if I have understood the right context of 'storage', but according to some tutorials I used the following Javascript code, to enable a page to locally store (no session) submitted data, but when I close the page and reopen the page, the content do not appear. script.js function initiate() { var saveButton = document.getElementById('save'); var retrieveButton = document.getElementById('retrieve'); var deleteButton = document.getElementById('delete'); var reviewButton = document.getElementById('review'); saveButton.addEventListener('click', saveItem); retrieveButton.addEventListener('click', retrieveItem); deleteButton.addEventListener('click', deleteItem); reviewButton.addEventListener('click', reviewAll); } function saveItem() { var key = document.getElementById('key').value; var value = document.getElementById('value').value; localStorage[key] = value; } function retrieveItem() { var data = document.getElementById('data'); var key = document.getElementById('key').value; var value = localStorage[key]; data.innerHTML = ' ' + key + ': ' + value + ' '; } function deleteItem() { if (confirm('Delete?')) { var key = document.getElementById('key').value; localStorage.removeItem(key); data.innerHTML = ' Deleted. '; } } function reviewAll() { for(var i = 0; i < localStorage.length; i++) { var key = localStorage.key(i); var value = localStorage[key]; data.innerHTML += ' ' + key + ': ' + value + ' '; } } addEventListener("load", initiate); index.html Demo HTML5 Key: Value: No data
score: 3
has answer: http://stackoverflow.com/a/25428917
has comment: http://stackoverflow.com/comment/39537642
has comment: http://stackoverflow.com/comment/39522342
has comment: http://stackoverflow.com/comment/39521359
has comment: http://stackoverflow.com/comment/39562005
upvote count: 3
has comment: http://stackoverflow.com/comment/39522204
has comment: http://stackoverflow.com/comment/39522137
answer count: 1
has title: HTML5 local storage not storing correctly
has comment: http://stackoverflow.com/comment/39522348
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39555274
has comment: http://stackoverflow.com/comment/39522243
has comment: http://stackoverflow.com/comment/39521943
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39553465
has comment: http://stackoverflow.com/comment/39522451
has comment: http://stackoverflow.com/comment/39521413
has comment: http://stackoverflow.com/comment/39555633
downvote count: 0
has comment: http://stackoverflow.com/comment/39523456

http://stackoverflow.com/q/25356392
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39534845
has comment: http://stackoverflow.com/comment/39534830
score: 0
has comment: http://stackoverflow.com/comment/39534844
has comment: http://stackoverflow.com/comment/39534853
has title: Javascript function doesn't do a transition
type: UnansweredQuestion
has body: I want to make my list in my nav to have the transition applied. The call animate(0,"mainNav",.04,0.03); The function function animate(num, element, transitionUnit, delayUnit){ var transition = 0; var delay = 0; var x = document.querySelectorAll('nav &gt; ul &gt; li'); for (i=0; i&lt;x.length; i++){ x[i].style.WebkitTransform = "translate3d("+num+"px,0px,0)"; x[i].style.opacity = "1"; x[i].style.transition = transition + "s " + delay +"s !important"; delay += delayUnit; transition += transitionUnit; } } This function applies changes to everything except that It just completely misses x[i].style.transition = ""; and x[i].innerHTML = ""; What could be the problem? I've tried changing everything including the querySelector, but this is what I've had found to work except the two I have mentioned above. P.S. It works with animate(0,"viewNav",.04,0.03); I just need it to work with mainNav
tagged with: css
has comment: http://stackoverflow.com/comment/39534865
answer count: 0
has comment: http://stackoverflow.com/comment/39534813
type: Question

http://stackoverflow.com/comment/39547410
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25361132
type: QuestionComment
has text: Glad it helped you.... I have marked it as duplicate.

http://stackoverflow.com/a/25241056
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39324263
answers question: http://stackoverflow.com/q/25240844
type: Answer
accepted answer of: http://stackoverflow.com/q/25240844
has body: Heard of Ajax? or jQuery Ajax? Well basically this is I would do it: PHP file - To be the back - end only create response and controll the Database.. HTML file - to be the View. JS\jQuery - to be the controller. Ajax allows you to Asynchronously request for data from other servers or send data. Description of Ajax by jQuery + Examples So the structure would be more like :
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39321981

http://stackoverflow.com/a/25341354
type: Answer
upvote count: 6
accepted answer of: http://stackoverflow.com/q/25341321
answers question: http://stackoverflow.com/q/25341321
has comment: http://stackoverflow.com/comment/39508926
score: 6
has comment: http://stackoverflow.com/comment/39508946
has body: the function that are to be called you should not put them in document.ready() make them global so that they can be accessible. change your code to this: &lt;script&gt; function getFirstDay() { var date = new Date(); var firstDay = new Date(date.getFullYear(), date.getMonth(), 1); return firstDay; } function getToday() { return new Date(); } &lt;/script&gt; and now call it: &lt;script&gt; $(function(){ $('.datepicker').datepicker({ format : 'yyyy-mm-dd', todayHighlight : true }); $("#from_date").datepicker("setDate", getFirstDay()); $("#to_date").datepicker("setDate", getToday()); $("#from_date").datepicker('update'); $("#to_date").datepicker('update'); }); &lt;/script&gt;
type: AcceptedAnswer
downvote count: 0

angular-strap
tag name: angular-strap
type: Tag
tags question: http://stackoverflow.com/q/25319494

shadow-dom
tags question: http://stackoverflow.com/q/25339932
tags question: http://stackoverflow.com/q/25335305
tag name: shadow-dom
type: Tag
tags question: http://stackoverflow.com/q/25259098

http://stackoverflow.com/q/25239391
has answer: http://stackoverflow.com/a/25254981
tagged with: openframeworks
tagged with: graphics
tagged with: opencv
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25239556
accepted answer: http://stackoverflow.com/a/25260174
score: 4
type: Question
upvote count: 4
has title: OpenFrameworks alternative for JavaScript
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/23884074
favorite count: 0
has answer: http://stackoverflow.com/a/37581734
linked to: http://stackoverflow.com/q/5593274
tagged with: http://stackoverflow.com/tag/html
has body: Recently I've been looking into the field of Visual Regression Testing. I intend to give it a shot developing a tool that compares the visual representation of a site (a screenshot, for example) to the provided design to see if they're a match. A few years back I had a chance to develop an interactive art installation with OpenFrameworks, which has the capability of proper graphical processing. My question is, though - is there any decent alternative to OpenFrameworks in JavaScript?
answer count: 4
has answer: http://stackoverflow.com/a/25260174
possible better answer: http://stackoverflow.com/a/25254981

gmail
type: Tag
tags question: http://stackoverflow.com/q/25306948
tag name: gmail
tags question: http://stackoverflow.com/q/25297607

http://stackoverflow.com/comment/39504413
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25338868
type: QuestionComment
has text: Convert into an array with ```split```, iterate that array to make another array with the values, and convert this second array to a string with ```join('')```. Please give it a try before asking.

http://stackoverflow.com/q/25342320
answer count: 4
favorite count: 0
has body: I know the code is very little and I'm missing something small. fiddle : http://jsfiddle.net/0oa9006e/1/ code : var veri = "+???+Girdiğiniz eposta adresi 'adfadf' geçersiz.-???-"; var a = veri.match(/\+[\?]*\+(.*)*\-[\?]*\-/g); a = a.replace(/[\+\-\?]*/g , ""); alert(a);
type: UnansweredQuestion
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/25342355
has answer: http://stackoverflow.com/a/25342364
type: Question
has answer: http://stackoverflow.com/a/25342356
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25342367
has title: TypeError : undefined is not a function when calling replace method
has comment: http://stackoverflow.com/comment/39510432

http://stackoverflow.com/a/25384569
has body: I should be using a callback to know when the library is successfully loaded As I said in a comment, I don't know the Google Loader Library -- so take this as hypothetical until someone confirm or infirm it, but... Though, you have to remember your callback is a function. So it will be invoked by the library without being bound there to any object. So, you have to somehow bound your callback to this yourself. In CoffeeScript the fat arrow =&gt; exists for that exact purpose. You could use it either when defining your callback or when passing it: When passing the callback google.load 'visualization', '1.0', { 'packages':['corechart'], 'callback': =&gt; @pageLoaded() } # ^^ ^^ pageLoaded: -&gt; @log.debug "google library loaded" @ready = true When defining the callback Alternatively, you might use the fat arrow to bound pageLoaded on its definition site: google.load 'visualization', '1.0', { 'packages':['corechart'], 'callback': @pageLoaded } pageLoaded: =&gt; # ^ @log.debug "google library loaded" @ready = true
answers question: http://stackoverflow.com/q/25378838
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39633735
has comment: http://stackoverflow.com/comment/39634797
upvote count: 1
type: Answer

http://stackoverflow.com/q/25277936
tagged with: javascript
tagged with: jquery
has body: I want to add a floating component in my site that highlights a bullet based on scroll. Like I scroll to second section then second bullet should be highlighted.How do I do that?
has title: Floating component on the right to indicate section in the page
has comment: http://stackoverflow.com/comment/39390484
has comment: http://stackoverflow.com/comment/39391237
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
has comment: http://stackoverflow.com/comment/39390441
has answer: http://stackoverflow.com/a/25278264
downvote count: 1
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/25278164
has answer: http://stackoverflow.com/a/25278164
type: Question
upvote count: 4
answer count: 2
accepted answer: http://stackoverflow.com/a/25278264

http://stackoverflow.com/a/25290594
score: 3
has comment: http://stackoverflow.com/comment/39416153
has comment: http://stackoverflow.com/comment/39414227
accepted answer of: http://stackoverflow.com/q/25290562
has comment: http://stackoverflow.com/comment/39414259
answers question: http://stackoverflow.com/q/25290562
has comment: http://stackoverflow.com/comment/39415867
has comment: http://stackoverflow.com/comment/39413906
type: AcceptedAnswer
upvote count: 3
has comment: http://stackoverflow.com/comment/39414058
type: Answer
has comment: http://stackoverflow.com/comment/39414362
downvote count: 0
has comment: http://stackoverflow.com/comment/39414397
has body: For the last three statements to work, the elements have to exist. You are executing those methods before the Ajax response was received. Move the calls inside the $.get callback, after you added the elements (i.e. after the loop). Kind of related (because they explain how async stuff works): Why is my variable unaltered after I modify it inside of a function? - Asynchronous code reference How do I return the response from an asynchronous call?
has comment: http://stackoverflow.com/comment/39414023
has comment: http://stackoverflow.com/comment/39413883

http://stackoverflow.com/q/25364405
has title: Extjs 3.4 reload grid after remove records
tagged with: javascript
tagged with: extjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25367400
has answer: http://stackoverflow.com/a/25367799
possible better answer: http://stackoverflow.com/a/25367799
type: Question
has body: In Extjs 3.4 I am removing some records from a JsonStore using the remove() method. After I save the pending changes by calling the save() method. In the db the delete is executed, so records are removed but in the front-end I see the records just removed. gridStore.remove(checkColumn.getSelections()); gridStore.save(); //calling the server. after the save() the grid is not reloaded. How can I reload the grid after the save?
answer count: 2
score: 0
has answer: http://stackoverflow.com/a/25367400

http://stackoverflow.com/a/25308860
answers question: http://stackoverflow.com/q/25307567
score: 0
has comment: http://stackoverflow.com/comment/39452162
type: Answer
has body: In this plugin you can pass name and value both for option and it will generate value that you pass in option. This link https://github.com/nimbly/angular-formly/blob/master/src/directives/formly-field-select.html show you how this plugin creating select in form . it treated option as service so you can pass value like this [ {name: "red", value: "dgdsg"}, {name: "white", value: "1dgsg"}, ]
has comment: http://stackoverflow.com/comment/39450513
has comment: http://stackoverflow.com/comment/39450986
has comment: http://stackoverflow.com/comment/39451947
has comment: http://stackoverflow.com/comment/39451663
has comment: http://stackoverflow.com/comment/39450645
has comment: http://stackoverflow.com/comment/39451246

http://stackoverflow.com/comment/39576187
has text: I think the Problem is with the variable moveLeft in js.. so set moveLeft = 5;by default.. lem me know is it works?
comment on: http://stackoverflow.com/a/25377926
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25341114
tagged with: numbers
score: 1
tagged with: floating-point
accepted answer: http://stackoverflow.com/a/25341211
type: Question
answer count: 2
upvote count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/73397251
tagged with: javascript
has comment: http://stackoverflow.com/comment/39508795
tagged with: floating-accuracy
tagged with: floating-point-precision
has answer: http://stackoverflow.com/a/25341211
favorite count: 0
has title: JavaScript: Downsides of toFixed(...) method
has comment: http://stackoverflow.com/comment/39508759
has body: In my programs, I need "float" numbers rounded to the nearest two decimal digits, and after some research I decided to use toFixed(..) for this purpose, like shown in the example below. What are the downsides of using toFixed()? Does it work in all browsers correctly? If not, what are some cases that it does not work correctly? var numb = 123.23454; numb = +numb.toFixed(2);
has comment: http://stackoverflow.com/comment/39508935
possible better answer: http://stackoverflow.com/a/73397251
linked to: http://stackoverflow.com/q/11832914
type: AnsweredQuestion

http://stackoverflow.com/q/25328850
has title: How to create a counting generator/iterator cascade?
tagged with: generator
type: AnsweredQuestion
score: 3
downvote count: 0
accepted answer: http://stackoverflow.com/a/79273161
possible better answer: http://stackoverflow.com/a/25329374
type: Question
tagged with: iterator
has answer: http://stackoverflow.com/a/79273161
tagged with: arrays
has answer: http://stackoverflow.com/a/79274888
tagged with: javascript
tagged with: yield
upvote count: 3
answer count: 3
has answer: http://stackoverflow.com/a/25329374
favorite count: 0
has body: Newer versions of JavaScript allow to use generators/iterators in combination with the yield keyword. Background of my question Consider the following generator, which "produces" numbers (digits) from 0 to 9: // generator (produces numbers from 0 to 9, then stops) function *zcounter() { var i = 0; while (i<=9) { yield i; i++; } } Now I want to use it to replace the following function, which uses 3 nested for loops: // e.g.: var iArray=[0,0,0]; function IterateCascade1(iArray) { var iterations=0; for (var x=0; x<=9; x++) { iArray[0]=x; for (var y=0; y<=9; y++) { iArray[1]=y; for (var z=0; z<=9; z++) { iArray[2]=z; logArray(iArray); iterations++; } } } return iterations; } The problem If you invoke the function above like console.log("Iterations: "+IterateCascade1([0,0,0])); Then it will count 1000 times from 000 to 999, which is exactly doing what I want. The disadvantage is, that can only use arrays with 3 elements, you can't pass arrays with more elements. To solve it by using the generator zcounter(), I tried the following: // e.g.: var iArray=[0,0,0]; function IterateCascade2(iArray) { var iterations=0; // generate 3 iterators var gArray = []; for(var i=0; i<iArray.length; i++) { var g=zcounter(); gArray[i]=g; } // loop through for(var a in gArray) { //console.log("a:"+a); var g=gArray[a]; var gnext=g.next(); while (!gnext.done) { iArray[a]=gnext.value; logArray(iArray); gnext=g.next(); iterations++; } } return iterations; } If you invoke the function above like console.log("Iterations: "+IterateCascade2([0,0,0])); Then it will count only 30 times, and it will not go through all 1000 numbers as IterateCascade1 does it. Furthermore, if you pass larger arrays like console.log("Iterations: "+IterateCascade2([0,0,0,0])); then it will "count" every digit from 0 to 9, but will not go through all 10000 combinations. Question I know that somehow there is a recursion missing. How can IterateCascade2 be modified so it does the right thing (cycle through all combinations an…

http://stackoverflow.com/q/25360633
has comment: http://stackoverflow.com/comment/39542611
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39548441
has comment: http://stackoverflow.com/comment/39542760
has comment: http://stackoverflow.com/comment/39548800
has comment: http://stackoverflow.com/comment/39548351
has comment: http://stackoverflow.com/comment/39546738
has body: How do I parse HTML with AngularJS? I have tried to build an filter like this: gameApp.filter('unsafe', function($sce) { return function(val) { return $sce.trustAsHtml(val); }; }); I use it like this in my view: But that don't work. result contains tr and td tags that I want to fill my table with. Here is my controller: var gameApp = angular.module("gameApp", ['ngRoute']); gameApp.service('link', function() { this.user = false; }); gameApp.filter('unsafe', function($sce) { return function(val) { return $sce.trustAsHtml(val); }; }); function makeTableFrom(str) { var k = 1; result = ""; for(var i = 1; i <= 8; i++) { result += ' '; for(var j = 1; j <= 20; j++) { if(str[k] === '#') { result += ' # '; } else if(str[k] === '&') { result += ' & '; } else { result += ' '; } k++; } result += ' '; } return result; } gameApp.config(function($routeProvider) { $routeProvider .when('/', { templateUrl : 'partials/firstpage.html', controller : 'firstPageCtrl' }) .when('/game', { templateUrl : 'partials/game.html', controller : 'gameCtrl' }); }); gameApp.controller("firstPageCtrl", function($scope,$http,link,$location) { $scope.doLogin = function() { $http.post("lib/action.php", {username: $scope.username, password: $scope.password}).success(function(data) { if(data) { link.user = data; console.log(link.user); $location.path("/game"); } }).error(function(data) { console.log(data); }); }; }); gameApp.controller("gameCtrl", function($scope,$http,link,$location) { //$scope.trr = [1,2,3,4,5,6,7,8]; //$scope.tdd = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]; $scope.getMonsters = "1"; var map; $http.post("lib/action.php", {monsters: $scope.getMonsters}).success(function(data) { map = data; console.log(map); $scope.result = makeTableFrom(data); console.log($scope.result); }); if(link.user) { /*$scope.message = "fisk"; console.log(link.user);*/ } else { /*$scope.message = "Ledsen fisk"; console.log("Är inte satt");*/ } }); Anyone who can help me?
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/39545004
tagged with: html-parsing
has comment: http://stackoverflow.com/comment/39548280
has comment: http://stackoverflow.com/comment/39542620
score: 1
has answer: http://stackoverflow.com/a/55577987
has title: Parse html with angular
type: Question
tagged with: html-table

http://stackoverflow.com/comment/39482514
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25327013
has text: @FelixKling And if I do so, the rest of the function(s) (like reader.onload) are still executed?

http://stackoverflow.com/a/25342579
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25342056
has comment: http://stackoverflow.com/comment/60151766
type: Answer
accepted answer of: http://stackoverflow.com/q/25342056
downvote count: 2
has body: found it: Don't add other click-related listeners, they might consume the event and prevent the bound click-listener to be fired. The above code works quite well without any other click-listener involved...
score: -2
upvote count: 0

http://stackoverflow.com/q/25383415
has body: I have a little piece of code that should refresh part of a page. The refreshing part is working fine, only I notice on every refresh it blinks.. any suggestions how to get rid of the blinking? test And this is the php file; <?php echo "1test "; echo "32333 "; echo "2dddd2111 "; echo "2dddcvbcvbd2111 "; echo "2dsdfbddd2111 "; ?>
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25383564
has answer: http://stackoverflow.com/a/25383491
answer count: 4
type: UnansweredQuestion
has title: JQUERY refresh blinking
tagged with: php
has comment: http://stackoverflow.com/comment/39585750
has answer: http://stackoverflow.com/a/25384527
has answer: http://stackoverflow.com/a/25383522
type: Question

http://stackoverflow.com/comment/39556520
score: 0
type: AnswerComment
type: Comment
has text: I imagined something like this. TH.
comment on: http://stackoverflow.com/a/25362434

http://stackoverflow.com/q/25328084
has comment: http://stackoverflow.com/comment/54084849
tagged with: http://stackoverflow.com/tag/svg
type: Question
accepted answer: http://stackoverflow.com/a/25328337
answer count: 1
has title: Reusing SVG.js code for various SVG's
score: 0
has body: I'm getting to grips with SVG.js I have a pattern effect that I've created and would like to use in a number of SVG's. I can create it in one SVG with the following code... $( document ).ready(function() { var draw = SVG('geo').size(1200, 1700); // 100 lines of js creating geometric pattern, effectively this... var rect = draw.polygon(coordinates).fill('#fff').stroke({ width: 1, color:'#fff'}).opacity(0) }); This creates an SVG with ID geo. But I'd like to use this code again to generate various SVG's, ideally with different options (colour etc). SVG('geo') refers to a particular SVG, how do I make it so I can apply this to any SVG I want on the page? Hope that made sense
tagged with: javascript
has answer: http://stackoverflow.com/a/25328337
type: AnsweredQuestion
tagged with: svg.js

http://stackoverflow.com/comment/39419574
has text: I suggest creating all those `option`s with a JS loop.
comment on: http://stackoverflow.com/q/25293612
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39303981
type: QuestionComment
comment on: http://stackoverflow.com/q/25231668
has text: make sure you delegate the click on a selector thats there from the beginn, like $(document).on( ...
score: 3
type: Comment

http://stackoverflow.com/a/25347072
has body: I digg little more research and got the solution even still don't know if it is the right way or not. var block = document.getElementById('om_hammer'); var move, start, end; var hammertime = new Hammer( document.body ); hammertime.add(new Hammer.Swipe({ direction: Hammer.DIRECTION_HORIZONTAL })); hammertime.add(new Hammer.Pan({ direction: Hammer.DIRECTION_HORIZONTAL })); hammertime.on('panstart', function(e){ move = e.direction; start = e.distance; }); hammertime.on('panend', function(e){ move = e.direction; end = e.distance; var totalDistance = end - start; hammerInit(move, end); }); I detect the pan motion and did the staff that i want. Not yet tested on the mobile device yet just with the chorme emulator console.
type: Answer
answers question: http://stackoverflow.com/q/25346699
score: 0

spring
tags question: http://stackoverflow.com/q/25323388
type: Tag
tags question: http://stackoverflow.com/q/25237156
tag name: spring
tags question: http://stackoverflow.com/q/25255028
tags question: http://stackoverflow.com/q/25300284
tags question: http://stackoverflow.com/q/25385994

http://stackoverflow.com/comment/39355890
type: Comment
type: QuestionComment
has text: The code is executed into $(window).load(function() {});
comment on: http://stackoverflow.com/q/25258773
score: 0

http://stackoverflow.com/q/25273208
has title: Sequentially replace characters in textbox animation
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39382700
has answer: http://stackoverflow.com/a/25273408
has body: I've successfully been able to loop through a long string of characters in a textbox and replace them sequentially one by one with values randomly picked from an array. My issue is getting the timing correct. I want to be able to complete the animation in X seconds regardless of the string length, that is if the animation should take 2 seconds it should take 2 seconds regardless if the string is 10 characters long or 300. I think my math may just be off because it takes much longer than 2 seconds to complete the animation. It's probably easier to explain with the fiddle that I have. > Fiddle My loop looks something like: var totalSeconds = 1000; var stringLen = 100 setInterval(function(){ ... }, totalSeconds/(stringLen*1000)); Aside from the timing issue, is there a better approach than what I have and/or is there a library that I can use to achieve the same result? I saw http://jschr.github.io/textillate/ but couldn't figure out how to implement the character replacement into it. (Looks like it just does animation out of the box).
type: UnansweredQuestion
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25296168
score: 2
has comment: http://stackoverflow.com/comment/39436999
has comment: http://stackoverflow.com/comment/39439492
downvote count: 0
has comment: http://stackoverflow.com/comment/39436968
has comment: http://stackoverflow.com/comment/39424875
tagged with: javascript
tagged with: rxjs
favorite count: 0
has comment: http://stackoverflow.com/comment/39427628
has title: Promises vs Reactive vs?
has comment: http://stackoverflow.com/comment/39427108
answer count: 1
tagged with: promise
has answer: http://stackoverflow.com/a/25296383
has comment: http://stackoverflow.com/comment/39436588
upvote count: 2
has comment: http://stackoverflow.com/comment/39470544
accepted answer: http://stackoverflow.com/a/25296383
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39426393
has body: so I know Promises and Functional Reactive Programming. What I want to do is to call an async function and .then(callback) do something, but I do not want to define the callback right away. It reminds me of RxJS Observable, just without all the fancy features.. Maybe someone knows what I am looking for.
type: Question

http://stackoverflow.com/a/25370530
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39565127
has comment: http://stackoverflow.com/comment/39594994
accepted answer of: http://stackoverflow.com/q/25370443
has comment: http://stackoverflow.com/comment/39594341
has comment: http://stackoverflow.com/comment/39565453
answers question: http://stackoverflow.com/q/25370443
has body: You could use an array to store the values you have already seen. Something like: $(document).ready(function() { $('#rootwizard').bootstrapWizard({ onNext: function(tab, navigation, index) { if (index == 1) { // Make sure we entered the solutions if (!$('.selection:checked').val()) { alert('Please select a solution to try'); $('.selection').focus(); return false; } } var selections = []; // Show selections in next tab $('.selection:checked').each(function() { var value = $(this).val() if ($.inArray(value, selections) &lt; 0){ selections.push(value); } }) $('#showSelection').html('&lt;li&gt;' + selections.join('&lt;/li&gt;&lt;li&gt;') + '&lt;/li&gt;'); } }); }); fiddle: http://jsfiddle.net/2a460tfc/10/
has comment: http://stackoverflow.com/comment/39589807
has comment: http://stackoverflow.com/comment/39591308

http://stackoverflow.com/comment/39390749
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25278164
has text: When giving an answer, it's best not to guess or make assumptions. If possible, provide a working example of code that will do what the OP is asking for.
type: Comment

http://stackoverflow.com/comment/39573583
score: 0
type: Comment
type: QuestionComment
has text: OK. Now clear, will try with the longer codes.
comment on: http://stackoverflow.com/q/25376565

http://stackoverflow.com/comment/39398550
type: QuestionComment
comment on: http://stackoverflow.com/q/25282457
has text: I'll see if I can but there's a lot of other code to untangle from it
score: 0
type: Comment

http://stackoverflow.com/comment/39446616
has text: Thanks, I didn't realise I didn't need a loop!
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25307268

http://stackoverflow.com/q/25333765
tagged with: google-chrome-devtools
type: Question
has body: I need to know how i can access the direct media url from a file played in the JW Player by doing this with a chrome extension. That means I've got a website playing a video and I want to get the url of the video and use it in my script inside the extension.
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: jwplayer
has title: How to get media url from JW Player?
has comment: http://stackoverflow.com/comment/39534166
tagged with: google-chrome-extension
has answer: http://stackoverflow.com/a/25333909
has comment: http://stackoverflow.com/comment/41748435
upvote count: 2
type: UnansweredQuestion
tagged with: google-chrome
downvote count: 1
score: 1

http://stackoverflow.com/comment/39428118
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25297768
score: 0
has text: I think the problem is that because I'm placing the code into the page, it's putting it all in the body, therefore the portion of the code isn't placed in the actual part of the page

http://stackoverflow.com/q/25248402
has answer: http://stackoverflow.com/a/25249659
has title: Shuffle part of a jQuery object but return the whole object
has comment: http://stackoverflow.com/comment/39336307
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39339058
possible better answer: http://stackoverflow.com/a/25249659
accepted answer: http://stackoverflow.com/a/25262999
has comment: http://stackoverflow.com/comment/39336539
type: Question
has comment: http://stackoverflow.com/comment/39336055
tagged with: javascript
has comment: http://stackoverflow.com/comment/39342395
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39338386
tagged with: jquery
has answer: http://stackoverflow.com/a/25262999
has body: In a jQuery object, I'd like to shuffle all elements but the first. After different attempts I came up with this: var $shuffled = $('.slide').slice(1).shuffle().end(); However this returns an empty object. How can I first select part of an object (slice), then shuffle it (custom function) and then set back the filter (end) so that $shuffled returns the whole object and not just a subset of it? This is the shuffle code I use: (function($){ $.fn.shuffle = function() { var allElems = this.get(), getRandom = function(max) { return Math.floor(Math.random() * max); }, shuffled = $.map(allElems, function(){ var random = getRandom(allElems.length), randEl = $(allElems[random]).clone(true)[0]; allElems.splice(random, 1); return randEl; }); this.each(function(i){ $(this).replaceWith($(shuffled[i])); }); return $(shuffled); }; })(jQuery);
has comment: http://stackoverflow.com/comment/39339254

ecmascript-harmony
tags question: http://stackoverflow.com/q/25330777
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/25249617
tags question: http://stackoverflow.com/q/25314352
tags question: http://stackoverflow.com/q/25323162

http://stackoverflow.com/q/25373598
type: Question
score: 0
answer count: 2
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/25381644
has body: I'm new to using underscore so I'm sure there is a better way to do the following: var data = [ {"from": "Belgium", "to": "Belgium", "count": "0"}, {"from": "Belgium", "to": "France", "count": "3"}, {"from": "Belgium", "to": "Germany", "count": "5"}, {"from": "France", "to": "Belgium", "count": "4"}, {"from": "France", "to": "France", "count": "9"}, {"from": "France", "to": "Germany", "count": "1"}, {"from": "Germany", "to": "Belgium", "count": "7"}, {"from": "Germany", "to": "France", "count": "2"}, {"from": "Germany", "to": "Germany", "count": "5"}, ] to var formatted_data = [ [0, 0.08333333333, 0.13888888888], [0.11111111111, 0.25, 0.02777777777], [0.19444444444, 0.05555555555, 0.13888888888] ] Basically you group it by "from", then divide each count by the total (in this case 36). I don't really want to hardcode the number of countries, but the data will always include every combination of "from" and "to". This is my code (but I know it can probably be much better): var total = _.pluck(data, "count").reduce(function(memo, value) { return memo + parseInt(value, 10); }, 0); data = _.groupBy(data, function(value) { return value.from; }); formatted_data = []; _.each(data, function(value, key, list) { formatted_data.push(_.pluck(data[key], "count").map(function(value) { return value/total; })); });
possible better answer: http://stackoverflow.com/a/25374251
has answer: http://stackoverflow.com/a/25374251
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25381644
tagged with: underscore.js
has comment: http://stackoverflow.com/comment/39568029
has title: What's a more effective or shorter way to group, then get a percentage value of a 2-dimensional array using underscore?

http://stackoverflow.com/q/25267234
tagged with: node.js
score: 2
has title: Serving static files in a node.js cluster?
has answer: http://stackoverflow.com/a/25267396
type: Question
downvote count: 0
tagged with: javascript
has body: Let's say I have a cluster environment where I basically have the main process (the master) and then I have another 8 worker processes (my cluster). Should the static files be hosted by the main process or should they be hosted on the cluster processes?
answer count: 1
favorite count: 0
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/39347601
type: Comment
comment on: http://stackoverflow.com/a/25253593
has text: Version wocolukiyido is exactly the same as himesakonipo, but on rollover the images snap to position. Tested on OSX Chrome (latest) and Safari (latest).
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39527897
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25352468
has text: Any objection to jQuery tabs?
score: 0

http://stackoverflow.com/comment/39567167
type: QuestionComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/59548/discussion-between-matthew-harwood-and-psl).
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25373060

http://stackoverflow.com/comment/49008978
has text: question @pailhead - with this setup, would it be possible to send an updated _myVec2UniformArray uniform with a different size array? Would it work as long as that new array size is less than the ARRAYMAX?
comment on: http://stackoverflow.com/a/25255221
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/25381123
score: 0
has body: You can... use the Geolocation API: http://dev.w3.org/geo/api/spec-source.html - Pro: very accurate. Con: the user has to allow the usage of his geolocation. or you can use a service like http://www.ipinfodb.com/ip_location_api.php to get the location via IP. Pro: Works also with old browsers and without permission. Con: Inaccurate (the IP details don't point to the correct location in all cases).
type: Answer
has comment: http://stackoverflow.com/comment/39581310
answers question: http://stackoverflow.com/q/25380976
has comment: http://stackoverflow.com/comment/39581158

http://stackoverflow.com/q/25236655
tagged with: http://stackoverflow.com/tag/html
has title: how to take printout without URL of the site using html
has answer: http://stackoverflow.com/a/25236778
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25236808
has answer: http://stackoverflow.com/a/25236808
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25236778
score: 0
answer count: 2
has body: I give code for taking printout of the page. But the page is coming along with the URL. So while taking printout that URL is also showing in page.. My Javascript Code My html submit button is looking like, Also i have attached the screenshot.. Let me know is it possible or not?

http://stackoverflow.com/a/25511421
answers question: http://stackoverflow.com/q/25311644
accepted answer of: http://stackoverflow.com/q/25311644
type: AcceptedAnswer
has body: It seems that ExtJs have a bug in the Store.removeAll() function. (They clean all records, but forget to remove them from the store's snapshot). I had to remove all calls to the combo's underlying store.removeAll() to a while() removing the items one by one. Then it works just fine.
score: 0
type: Answer

http://stackoverflow.com/q/25325164
type: UnansweredQuestion
tagged with: ember.js
has body: I have a tabular form created in emberjs. I need to set the inputs name but it doesn't work. my model: Items.Item = DS.Model.extend({ title: DS.attr('string'), itemName: function() { return 'Item['+ this.id +'][title]'; } }); my original input &lt;td&gt;{{input name="Item[][title]" value=qty}}&lt;/td&gt; and the code with the itemName: &lt;td&gt;{{input name=itemName value=qty}}&lt;/td&gt; This doesn't work for me. if I put the itemName to the value attribute, it works, but with the name doesn't. How can I set the name attribute? It would be also good for me to set the name of the items in each loop with the {{@index}}.
type: Question
tagged with: javascript
score: 0
has title: How can be set the ember.js input name by model attribute?
answer count: 1
has answer: http://stackoverflow.com/a/25325467

http://stackoverflow.com/comment/39610552
has text: @dandavis: That takes care of strict mode, but not the edge case where your object is designed to extend the global object. In that case, `this.Array === Array` will always return true, and you'll end up in an infinite loop. But that is an edge case, and if you're knowledgeable enough to do it, you probably are knowledgeable enough to know why that check is bad.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25373540
type: AnswerComment

http://stackoverflow.com/a/25316024
answers question: http://stackoverflow.com/q/25315798
upvote count: 1
score: 1
has body: If you don't want to do the logic in a view, you can send the variable to the template using a context processor: def add_timestamp_context(request): return {'current_time': datetime.datetime.now()} Or something akin to that. See here for more details. You will need to add the new function to your TEMPLATE_CONTEXT_PROCESSORS variable in your settings.py, as noted by the documentation. You should also note that all variables sent to templates will be available in your base.html. So you can send the variable to the template from the associated view and it'll work, even if the frontend logic is in your base.html file. The best solution, in my opinion, is to calculate both stamps on the frontend, rather than the backend.
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25315798
has comment: http://stackoverflow.com/comment/39462623

http://stackoverflow.com/comment/39572087
comment on: http://stackoverflow.com/q/25375699
type: Comment
score: 0
type: QuestionComment
has text: Sorry forget to update it here. Now updated in above link. Thanks

http://stackoverflow.com/q/25312573
has body: At the moment, the circles are being appended to &lt;p&gt; in the html markup. You can see how I have done this below. But what I actually want is for the div to be created where the mouse cursor is the on the page. How might I get the position of the cursor and create a div there? Thanks. var count = 0; /* * Function(makeLetters) * Removes first character in text box. * Creates circle Letters using first character. */ $(document).click(function (makeLetters) { //Get characters currently entered into textbox var letters = $('#letters').val(); //Take the firstLetter only var firstLetter = letters.substr(0, 1); //Count how many characters currently entered var numberOfLetters = letters.length; //Use length of entry to take all characters except first var restOfLetters = letters.substr(1, numberOfLetters); //All characters except first set as textbox entry $("#letters").val(restOfLetters); //Check that there is a first character if (firstLetter != "") { count++; //Create a new circle letter by inserting new div class $("p").append('&lt;div class="circle' + count + '" style="border-radius: 50%;width: 36px;height:36px;padding:8px;background:#FF7D5C;color:black;text-align:center;font:32px Arial, sans-serif;display:inline-block;margin-right:4px;margin-bottom:4px;"&gt;' + firstLetter.toUpperCase() + '&lt;/div&gt;'); $("p").children().last().hide().fadeIn(); } });
score: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25312758
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25312703
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: UnansweredQuestion
has title: Create a new div and display it where the mouse cursor is on page
upvote count: 1

http://stackoverflow.com/q/25333667
type: AnsweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/39495426
type: Question
has comment: http://stackoverflow.com/comment/39495059
score: 1
has body: Cant wrap my head around arguments.callee and why truefactorial = 120. Some help would be much appreciated function factorial(num){ if (num &lt;= 1) { return 1; } else { return num * arguments.callee(num-1) } } var trueFactorial = factorial; factorial = function(){ return 0; }; alert(trueFactorial(5)); //120
has answer: http://stackoverflow.com/a/25333716
has comment: http://stackoverflow.com/comment/39495032
answer count: 2
has comment: http://stackoverflow.com/comment/39495687
downvote count: 0
has comment: http://stackoverflow.com/comment/39495093
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25333716
tagged with: factorial
has comment: http://stackoverflow.com/comment/39495160
possible better answer: http://stackoverflow.com/a/25334078
has answer: http://stackoverflow.com/a/25334078
has title: JavaScript factorial
favorite count: 0

http://stackoverflow.com/comment/39501977
score: 1
comment on: http://stackoverflow.com/q/25335478
has text: Have you tried having the content_script open a [persistent connection](https://developer.chrome.com/extensions/messaging#connect) to a script running in background.html that proxies messages from the popup?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39396581
type: Comment
type: QuestionComment
has text: Hi Hampus, I have now edited my question to answer your questions. - The addRow class is just a simple button. The content of $rooms, are an array of strings, but not important in the matter of making a new row using jQuery
comment on: http://stackoverflow.com/q/25281175
score: 0

http://stackoverflow.com/a/25307789
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25307671
has comment: http://stackoverflow.com/comment/39446305
type: Answer
has body: Using :contain() you can do: $("#hsubmenuitems a:contains('Rosters')").text('new link').attr('href', 'new href'); $("#hsubmenuitems a:contains('Forum')").text('new link').attr('href', 'new href'); For more ifo, http://api.jquery.com/contains-selector/ Here is a demo http://jsfiddle.net/cepdmfLo/ Remember to put the code in document ready. To update the target attribute, it is very similar to the href edition. The following example sets the target attribute to _blank $("element").attr('target', '_blank'); please see http://api.jquery.com/attr/ for more info You can chain the entire thing $("#hsubmenuitems a:contains('Rosters')").text('new link').attr('href', 'new href').attr('target', '_blank'); http://jsfiddle.net/cepdmfLo/2/ the 'Roster' new link has the target
answers question: http://stackoverflow.com/q/25307671
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/39446464

http://stackoverflow.com/comment/39491662
type: Comment
type: QuestionComment
has text: Your main problem stems from the fact that you are registering a click even to add the columns as well as draw the chart. I would seperate the initial drawing of the chart into the page-load and in the click handler you would just find the google-chart and update the series data on the chart.
comment on: http://stackoverflow.com/q/25331938
score: 0

http://stackoverflow.com/comment/39398549
score: 0
type: Comment
type: QuestionComment
has text: *"But when I try in js the zoom value is not updated and has the default value."* Just `update` the zoom value in client side then?
comment on: http://stackoverflow.com/q/25281991

http://stackoverflow.com/comment/39567545
comment on: http://stackoverflow.com/a/25373418
score: 0
type: AnswerComment
has text: I'm reading up on the $q library but does this fire the getPages API request ? or it rejects it when cache is available.
type: Comment

http://stackoverflow.com/q/25293505
has body: I'm struggling on how to make the following JSON array: { "location": [ [ 50.81040819, 4.92792551 ], [ 40.81040819, 4.92792551 ] ] } I pull the data from instagram where I get the following (with much more data): "location": { "latitude": 50.81040819, "longitude": 4.92792551 } But I need the coordinates grouped like the first example. Is there any way I can recreate this, basically without the key? thx in advance
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25294977
has comment: http://stackoverflow.com/comment/39419365
tagged with: http://stackoverflow.com/tag/json
score: -1
type: Question
has title: Javascript populate JSON
has answer: http://stackoverflow.com/a/25293805
downvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25294998
favorite count: 0
has answer: http://stackoverflow.com/a/25293589
has comment: http://stackoverflow.com/comment/39419345
answer count: 4
upvote count: 0

http://stackoverflow.com/q/25246431
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/25246525
has comment: http://stackoverflow.com/comment/39332256
has body: I'm having trouble getting data that I've put into a JSON string in javascript. I first add my values to a JSON object and then I stringify it. I'm not sure I understand why I can't get a value from it. All I see is 'undefined' in the alert. http://codepen.io/jimmykup/pen/wjJst var jsonObj = []; var name = "1stname"; var url = "firsturl"; item = {} item ["name"] = name; item ["url"] = url; jsonObj.push(item); var jsonString = JSON.stringify(jsonObj); alert (jsonString.url); I am converting my object to a string because I will be transferring that text somewhere and only THEN do I need to access the values.
type: Question
has comment: http://stackoverflow.com/comment/39332185
has answer: http://stackoverflow.com/a/25246525
tagged with: javascript
score: 0
has title: After creating a JSON string, how do I retrieve data from it?
answer count: 1
has comment: http://stackoverflow.com/comment/39332118
has comment: http://stackoverflow.com/comment/39332159
type: AnsweredQuestion

permissions
tag name: permissions
type: Tag
tags question: http://stackoverflow.com/q/25249423
tags question: http://stackoverflow.com/q/25367561

http://stackoverflow.com/comment/39464856
type: QuestionComment
has text: Have a look at this, it gives you the idea on how to update your charts. [NVD3 - How to refresh the data function to product new data on click](http://stackoverflow.com/questions/24689157/nvd3-how-to-refresh-the-data-function-to-product-new-data-on-click)
comment on: http://stackoverflow.com/q/25315624
score: 0
type: Comment

http://stackoverflow.com/comment/47846864
type: Comment
score: 1
has text: Cannot upvote this amazing answer hard enough. Good job!
comment on: http://stackoverflow.com/a/25344623
type: AnswerComment

http://stackoverflow.com/q/25295658
has comment: http://stackoverflow.com/comment/39423785
type: Question
has body: I have an array and I'm looking to create a new array, composed of the original array contents repeated 3 times. For example: var array = ["red", "green", "blue"]; newArray = ["red red red", "green green green", "blue blue blue"]; My code so far: var triples = myArray.map(function(){ for (x = 0; x &lt; myArray.length; x++){ return myArray[x].repeat(3); }; }); console.log(triples); But this only returns triples = ["redredred", "redredred", "redredred"]; Any suggestions for a newbie?
tagged with: arrays
has answer: http://stackoverflow.com/a/25297092
tagged with: javascript
has answer: http://stackoverflow.com/a/25295838
score: 0
answer count: 3
has title: Javascript - Array.repeat limitations?
has comment: http://stackoverflow.com/comment/39423763
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25297158

http://stackoverflow.com/q/25250883
has comment: http://stackoverflow.com/comment/39342203
favorite count: 0
possible better answer: http://stackoverflow.com/a/25251677
has comment: http://stackoverflow.com/comment/39341021
has answer: http://stackoverflow.com/a/25251677
has body: I wanna learn how to define a custom event, but not exactly as it is said over the net! let me illustrate: In the jQuery Website in the part Introducing Custom Events it teaches you how to create a custom event in your code: e.g. $(document).on('myEvent',function(){ alert('Hello World'); }); then on an event, you'll call: $(document).trigger('myEvent'); Well, no problem until here. to go further I have to give you another example: The Question: let's say we've defined: $.fn.myEvent=function(callback){ $(document).bind('contextmenu',this,callback); }; so we can use it as: $(document).myEvent(function(){ alert('Hello World'); }); my question here is, how can we define "myEvent" so that we can use it as: $(document).on('myEvent',function(){ alert('Hello World'); }); with the functionality of the $(document).myEvent(); so that we can pass a callback function to it without needing to actually trigger the event? More Explanation: for example, when we call $(document).on('click'); we don't actually need to trigger the click event elsewhere like $(document).trigger('click') in order to get it to work, so whenever click happens the function fires. I wanna have an event listener for "myEvent" so that when the conditions are matched, the function fires. In another word (as mentioned below in the comments), I wanna know if there's a way to let jQuery treat "myEvent" as if it is one of the default events (click, mousemove, submit, etc). Any answer or idea is highly appreciated.
has comment: http://stackoverflow.com/comment/39341501
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/25251696
has answer: http://stackoverflow.com/a/38138504
has title: Define custom event
upvote count: 3
has comment: http://stackoverflow.com/comment/39340964
has comment: http://stackoverflow.com/comment/39341082
linked to: http://stackoverflow.com/q/14280101
has comment: http://stackoverflow.com/comment/39340973
type: Question
has comment: http://stackoverflow.com/comment/39341029
has comment: http://stackoverflow.com/comment/39340926
tagged with: javascript
has comment: http://stackoverflow.com/comment/39341629
accepted answer: http://stackoverflow.com/a/38138504
answer count: 3
tagged with: events
downvote count: 0
tagged with: jquery

http://stackoverflow.com/a/25303254
type: Answer
has body: Try setting the span's content with .html, like this: $(document).ready(function(){ $("#name").click(function() { $("#name_display").html( $("#name").val() ); }); });
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25303175
downvote count: 0
has comment: http://stackoverflow.com/comment/39437563

sensors
type: Tag
tag name: sensors
tags question: http://stackoverflow.com/q/25255945

http://stackoverflow.com/comment/39469694
has text: yes, yes, yes, 1,000,000 times yes. Thank you, this is it. In 3 minutes you fixed what I'd been staring at for over an hour. Thank you! Will accept in 5 minutes when it allows me
comment on: http://stackoverflow.com/a/25320491
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39424292
type: QuestionComment
has text: YES! I have changed the elem = document.forms[0]["stato"].value; into elem = document.getElementById('stato').value AND IT IS WORKING :D
type: Comment
comment on: http://stackoverflow.com/q/25294899
score: 0

http://stackoverflow.com/comment/39444302
score: 0
has text: @Malki Is it something personal between you and jQuery?
type: QuestionComment
comment on: http://stackoverflow.com/q/25303757
type: Comment

http://stackoverflow.com/comment/39427126
has text: You are much better off re-thinking your approach. Google for "SPA" - Single Page Application.
comment on: http://stackoverflow.com/q/25297255
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39560728
type: QuestionComment
comment on: http://stackoverflow.com/q/25370021
has text: What happens right now? The enter key function doesn't fire?
score: 0
type: Comment

http://stackoverflow.com/a/25314786
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25314698
upvote count: 1
has body: Use .val() and change event. Also you don't need to escape quotes like \" $('input[type="radio"]').change (function(){ if($(this).val() =='yes'){ $('.showCta').show(); } if($(this).val() == 'no'){ $('.showCta').hide(); } }).change(); //Trigger intially

http://stackoverflow.com/q/25278251
has answer: http://stackoverflow.com/a/25367535
has answer: http://stackoverflow.com/a/28705456
tagged with: javascript
has answer: http://stackoverflow.com/a/28121188
has answer: http://stackoverflow.com/a/25279903
score: 12
tagged with: validation
has comment: http://stackoverflow.com/comment/39552802
has body: I need to create a validation directive for showing all input errors for each input automatically. This validation directive should show all errors at current moment and list of errors should be updated automatically while user is typing. I need to show all errors for input if input is dirty, not empty and invalid. I need to add all errors into html element near this input element. For example if input have type="email" and ng-minlength="5" and user typed 'abc' I need to show such errors near this input: 'Invalid email; Please enter at least 5 characters;' For example if input has type="number" attr and min="200" and min-model="minnumber" and minnumber model set to '300' and user typed '100' I need to show such errors near this input: 'Please enter the minimum number of 500; Should be greater than Min Number;' Also I need to update all errors messages for input in prev example if related model (min-model param) is updated. var app = angular.module('app', []); app.controller('appCtrl', function ($scope) { }); app.directive('validate', function () { return { restrict: 'A', require: 'ngModel', // require: '^form', link: function (scope, element, attrs, ctrl) { console.log('======================'); console.log(scope); console.log(element); console.log(attrs); console.log(ctrl); console.log(scope.form.$error); angular.forEach(scope.form.$error, function (value, key) { console.log('scope.form.$error = ' + key + ': ' + value); console.log(value); }); } }; }); app.directive('positiveInteger', function () { return { restrict: 'A', require: 'ngModel', link: function (scope, element, attrs, ctrl) { ctrl.$parsers.unshift(function (viewValue) { var INTEGER_REGEXP = /^\d+$/; if (INTEGER_REGEXP.test(viewValue)) { // it is valid ctrl.$setValidity('positiveInteger', true); return viewValue; } else { // it is invalid, return undefined (no model update) ctrl.$setValidity('positiveInteger', false); return undefined; } }); } }; }); app.directive('positiveFloat', function () { return { …
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
answer count: 4
upvote count: 13
downvote count: 1
has title: AngularJS form validation directive for showing input errors
type: Question
tagged with: angularjs-directive

http://stackoverflow.com/q/25244512
has answer: http://stackoverflow.com/a/30981836
tagged with: node.js
score: 28
answer count: 9
downvote count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/31913961
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/26418669
tagged with: bower
upvote count: 28
has body: I'm encountering the below error stack trace, while I try to install "jQuery" using Bower. Can someone offer some help? C:\study\meanApp&gt;bower install jquery --save bower not-cached git://github.com/jquery/jquery.git#* bower resolve git://github.com/jquery/jquery.git#* bower download https://github.com/jquery/jquery/archive/2.1.1.tar.gz bower retry Download of https://github.com/jquery/jquery/archive/2.1.1.t ar.gz failed, trying with git.. bower EPERM EPERM, unlink 'C:\Users\UserZ\AppData\Local\Temp\AUserZ\bower\jquery-8680-AaJIqU\archive.tar.gz' Stack trace: Error: EPERM, unlink 'C:\Users\UserZ\AppData\Local\Temp\A-UserZ\bower\jqu ery-8680-AaJIqU\archive.tar.gz' Console trace: Trace at StandardRenderer.error (C:\Users\UserZ\AppData\Roaming\npm\node_module s\bower\lib\renderers\StandardRenderer.js:72:17) at Logger.&lt;anonymous&gt; (C:\Users\UserZ\AppData\Roaming\npm\node_modules\bo wer\bin\bower:110:22) at Logger.EventEmitter.emit (events.js:95:17) at Logger.emit (C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\nod e_modules\bower-logger\lib\Logger.js:29:39) at C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\lib\commands\ind ex.js:40:20 at _rejected (C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\node_ modules\q\q.js:797:24) at C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\node_modules\q\q .js:823:30 at Promise.when (C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\no de_modules\q\q.js:1035:31) at Promise.promise.promiseDispatch (C:\Users\UserZ\AppData\Roaming\npm\no de_modules\bower\node_modules\q\q.js:741:41) at C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\node_modules\q\q .js:557:44 System info: Bower version: 1.3.9 Node version: 0.10.18 OS: Windows_NT 6.1.7601 ia32 P.S: I've gone through the StackOverflow could find nothing related to my error, hence posting this question. Thanks in advance, Dave
type: Question
has answer: http://stackoverflow.com/a/38953091
has title: Bower - EPERM, unlink error
has answer: http://stackoverflow.com/a/32456053
has answer: http://stackoverflow.com/a/31034645
has answer: http://stackoverflow.com/a/26933222
tagged with: mean-stack
has answer: http://stackoverflow.com/a/26351405
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/50522028

http://stackoverflow.com/a/25274910
has body: OK so you're pulling 12 posts here: function getPosts() { $.getJSON('(TUMBLR_API_KEY)', function(r) { var posts = r.response.posts; for (var i = 0; i < 12; i++) { var html = ""; if (posts[i].type === "text") { html = formatTextHTML(posts[i]); } else if (posts[i].type === "photo") { html = formatPhotoHTML(posts[i]); } appendPostToPage(html); } }); } You could use the modulas operator to work out every time you've looped through three posts like so instead: var html = ' '; for (var i = 0; i < 12; i++) { if( (i%3 == 0 ){ html += ' '; // opening row every 3 } html += ' '; html += ' '; html += ' '; if( i%3 == 2 ){ html += ' '; // closing row every 3 } } html += ' '; //closing container Mine's a bit rough but that should work...
answers question: http://stackoverflow.com/q/25274426
has comment: http://stackoverflow.com/comment/39385387
type: Answer
score: 0

http://stackoverflow.com/comment/39424899
type: AnswerComment
has text: Why the `$timeout` here? A+ Promises already defer execution to a later point.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25296229

http://stackoverflow.com/q/25287380
answer count: 2
type: UnansweredQuestion
tagged with: http-redirect
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39407862
has answer: http://stackoverflow.com/a/25287782
has answer: http://stackoverflow.com/a/25288105
has comment: http://stackoverflow.com/comment/39408007
has body: So we're using an online service to handle webinars on our site. I have full control of the HTML for the registration page but don't have control of the PHP file used in the registration. Currently, the registration form looks like this: First Name * Best Email * This submits the values from the form to "notify.php". notify.php apparently has code to force the iframe this code is hosted inside of, to redirect to another page. I don't want this to happen. I want the form to submit, but then I want to send the user to my own ThankYou page. I'm thinking that the best way to do this is by "hijacking" the submission and sending them to the page I want. I thought that maybe calling a custom javascript function using onsubmit might work. Here's what I have right now: First Name * Best Email * For some reason it's not working though. The iframe continues to redirect to the page I don't want, and the window itself isn't being redirected. Am I doing this right or is there a better way of achieving this? Thank you in advance for your help! Jason UPDATE: I've confirmed that the javascript is never executing. I added: window.alert("JAVASCRIPT EXECUTED"); and the pop-up never happens so this appears to be an issue with onSubmit rather than the javascript itself. Why won't the javascript execute in onSubmit? I tried changing it to onSubmit="JavaScript:doRedirect();" and that didn't work either.
type: Question
tagged with: javascript
tagged with: forms
has title: Hijacking from submit to redirect page (Javascript)
score: 0
has comment: http://stackoverflow.com/comment/39408667

http://stackoverflow.com/a/25243639
type: Answer
answers question: http://stackoverflow.com/q/25243569
upvote count: 1
score: 1
has body: You can use a jQuery function getJson : http://api.jquery.com/jquery.getjson/ or ajax : http://api.jquery.com/jquery.ajax/
downvote count: 0

http://stackoverflow.com/comment/39622728
comment on: http://stackoverflow.com/q/25379340
has text: As to reading (and setting) custom properties on java objects in javascript - it seems to be another flaw in Nashorn (I do not remember how it was in Rhino) - I'll give antoher edit to my answer later to address it.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25348385
has comment: http://stackoverflow.com/comment/39520738
has body: i want to search and replace an entire string that has changing text inside it Example: Australia Austria Azerbaijan Bahamas Bahrain Bangladesh To: Australia Austria Azerbaijan Bahamas Bahrain Bangladesh The problem is of course that changing value... meaning value="$var"... How can search and replace all occurrences using jquery / javascript. Would appreciate your help.
has answer: http://stackoverflow.com/a/25348427
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39522232
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25348664
tagged with: replace
tagged with: search
type: Question
accepted answer: http://stackoverflow.com/a/25348427
has comment: http://stackoverflow.com/comment/39522229
tagged with: javascript
tagged with: jquery
has title: Search and Replace with variable using jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25348417
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25348417
has comment: http://stackoverflow.com/comment/39520306

http://stackoverflow.com/a/25309749
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25309434
has body: You are parsing ISO-8601 timestamps without timezone information, thus a UTC timezone is assumed, but Date.prototype.toString() will provide a string representation of this timestamp in your current timezone which means that if you are in the UTC+2 timezone you will notice a shift by two hours.
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39438746
type: AnswerComment
has text: Could you explain a bit.
type: Comment
comment on: http://stackoverflow.com/a/25303569
score: 0

http://stackoverflow.com/comment/39561457
has text: @Dr.Molle I believe it's a start, it doesn't look exactly like the new icons though
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25368851
score: 0

http://stackoverflow.com/a/27025492
upvote count: 3
score: 3
has body: How hardcore are you willing to be? Here's a code that wraps every letter of a text in a span with a given width: var container = document.getElementsByClassName('mymonotext'); if (!container.length) { throw new Error('.mymonotext is not found'); } container = container[0]; container.normalize(); //Merge all the adjacent text nodes inside a container (see https://developer.mozilla.org/en-US/docs/Web/API/Node.normalize) var currentNode = container.firstChild; for (var i = 0, len = currentNode.textContent.length; i &lt; len - 1; i++) { var range = new Range(); //Create a range //Insert a first char into a range range.setStart(currentNode, 0); range.setEnd(currentNode, 1); var wrapper = document.createElement('span'); wrapper.className = 'letter'; //Wrap the range with a span tag wrapper.appendChild(range.extractContents()) range.insertNode(wrapper); //Detach the previous range and shift current node range.detach(); currentNode = currentNode.nextSibling.nextSibling; } Styles for the wrapper tag: .letter { width: .5rem; display: inline-block; overflow: hidden; } Same thing on jsfiddle: http://jsfiddle.net/enwyoy4y/ (use at your own risk, yada-yada, does not supports IE8 and such).
has comment: http://stackoverflow.com/comment/42603565
has comment: http://stackoverflow.com/comment/42600976
downvote count: 0
has comment: http://stackoverflow.com/comment/42602125
type: Answer
answers question: http://stackoverflow.com/q/25344376
has comment: http://stackoverflow.com/comment/42634522

http://stackoverflow.com/a/25320621
type: Answer
answers question: http://stackoverflow.com/q/25320540
score: 0
accepted answer of: http://stackoverflow.com/q/25320540
has body: My advice would be to simply replace the full block of HTML, rather than removing/adding in two separate steps. Use the jQuery html() method for this. function autoRefreshCommentsHomePage() { $.ajax({ url: 'GetActivity.sc', success: function(data) { // Off topic, but you only need one var statement to declare all these var resultStr = data, str = '', temp = '', ele = resultStr.split('@!@'), arrayLength = ele.length; for (var i = 1; i &lt; arrayLength - 1; i++) { // Note the variable change to += temp += '&lt;li&gt;&lt;a href="#"&gt;' + 'User1' + ' @&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a&gt;' + ele[i] + '&lt;/a&gt;&lt;/li&gt;'; i = i + 1; temp += '&lt;li&gt;&lt;a style="color: black;"&gt;' + ele[i] + '&lt;/a&gt;&lt;/li&gt;'; temp += '&lt;li style="float: right;"&gt;&lt;a href="#"&gt;Comment&lt;/a&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a href="#"&gt;Like&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br&gt;'; temp += '&lt;br&gt;'; } // Replace it all at once $('#activitylist').html(temp); ; } }); } ;
type: AcceptedAnswer

http://stackoverflow.com/comment/39349527
type: Comment
comment on: http://stackoverflow.com/a/25252913
type: AnswerComment
has text: Unfortunately that didn't work, either. I WAS able to run it without the debug flag set, but the source maps are still minified either way. Very strange.
score: 0

php
tags question: http://stackoverflow.com/q/25372321
tags question: http://stackoverflow.com/q/25361143
tags question: http://stackoverflow.com/q/25325678
tags question: http://stackoverflow.com/q/25388096
tags question: http://stackoverflow.com/q/25234767
tags question: http://stackoverflow.com/q/25277142
tags question: http://stackoverflow.com/q/25239953
tags question: http://stackoverflow.com/q/25284887
tags question: http://stackoverflow.com/q/25301008
tags question: http://stackoverflow.com/q/25381013
tags question: http://stackoverflow.com/q/25299419
tags question: http://stackoverflow.com/q/25383415
tags question: http://stackoverflow.com/q/25314243
tags question: http://stackoverflow.com/q/25266681
tags question: http://stackoverflow.com/q/25381516
tags question: http://stackoverflow.com/q/25323254
tags question: http://stackoverflow.com/q/25253282
tags question: http://stackoverflow.com/q/25266009
tags question: http://stackoverflow.com/q/25328985
tags question: http://stackoverflow.com/q/25377363
tags question: http://stackoverflow.com/q/25350168
tags question: http://stackoverflow.com/q/25307343
tags question: http://stackoverflow.com/q/25289848
tags question: http://stackoverflow.com/q/25279785
tags question: http://stackoverflow.com/q/25270007
tags question: http://stackoverflow.com/q/25231097
tags question: http://stackoverflow.com/q/25326827
tags question: http://stackoverflow.com/q/25256535
tags question: http://stackoverflow.com/q/25258491
tags question: http://stackoverflow.com/q/25385835
tags question: http://stackoverflow.com/q/25379244
tags question: http://stackoverflow.com/q/25294821
tags question: http://stackoverflow.com/q/25324418
tags question: http://stackoverflow.com/q/25261489
tags question: http://stackoverflow.com/q/25285075
tags question: http://stackoverflow.com/q/25233606
tags question: http://stackoverflow.com/q/25317308
tags question: http://stackoverflow.com/q/25272972
tags question: http://stackoverflow.com/q/25287785
tags question: http://stackoverflow.com/q/25242677
tags question: http://stackoverflow.com/q/25295857
tags question: http://stackoverflow.com/q/25287838
tags question: http://stackoverflow.com/q/25373510
tags question: http://stackoverflow.com/q/25346764
tags question: http://stackoverflow.com/q/25357990
tags question: http://stackoverflow.com/q/25369761
tags question: http://stackoverflow.com/q/25233670
tags question: http://stackoverflow.com/q/25255971
tags question: http://stackoverflow.com/q/25234269
tags question: http://stackoverflow.com/q/25349892
tags question: http://stackoverflow.com/q/25250345
tags question: http://stackoverflow.com/q/25376962
tags question: http://stackoverflow.com/q/25378473
tags question: http://stackoverflow.com/q/25326044
tags question: http://stackoverflow.com/q/25247050
tags question: http://stackoverflow.com/q/25255035
tags question: http://stackoverflow.com/q/25232512
tags question: http://stackoverflow.com/q/25359053
tags question: http://stackoverflow.com/q/25231540
tags question: http://stackoverflow.com/q/25318628
tags question: http://stackoverflow.com/q/25252696
tags question: http://stackoverflow.com/q/25370959
tags question: http://stackoverflow.com/q/25382768
tags question: http://stackoverflow.com/q/25243701
tags question: http://stackoverflow.com/q/25373388
tags question: http://stackoverflow.com/q/25377289
tags question: http://stackoverflow.com/q/25341786
tags question: http://stackoverflow.com/q/25336564
tags question: http://stackoverflow.com/q/25359453
tags question: http://stackoverflow.com/q/25269565
tags question: http://stackoverflow.com/q/25330527
tags question: http://stackoverflow.com/q/25264855
tags question: http://stackoverflow.com/q/25312284
tags question: http://stackoverflow.com/q/25348333
tags question: http://stackoverflow.com/q/25284012
tags question: http://stackoverflow.com/q/25379912
tags question: http://stackoverflow.com/q/25360904
tags question: http://stackoverflow.com/q/25279078
tags question: http://stackoverflow.com/q/25307467
tags question: http://stackoverflow.com/q/25367968

http://stackoverflow.com/comment/39515136
type: AnswerComment
type: Comment
has text: The one time keys you mention are the same thing as the nonces I mention. The wordpress docs have some decent information about using nonces (for wordpress). http://codex.wordpress.org/WordPress_Nonces
comment on: http://stackoverflow.com/a/25344791
score: 0

http://stackoverflow.com/a/55917617
score: 0
answers question: http://stackoverflow.com/q/25387081
has body: Short &amp; clear on ES-2015, for use with Babel: function getValueFromRadioButton( name ){ return [...document.getElementsByName(name)] .reduce( (rez, btn) =&gt; (btn.checked ? btn.value : rez), null) } console.log( getValueFromRadioButton('payment') ); &lt;div&gt; &lt;input type="radio" name="payment" value="offline"&gt; &lt;input type="radio" name="payment" value="online"&gt; &lt;input type="radio" name="payment" value="part" checked&gt; &lt;input type="radio" name="payment" value="free"&gt; &lt;/div&gt;
type: Answer

http://stackoverflow.com/comment/39405094
has text: Where you are accessing this sum variable and how you are accessing it.Show us how you are accessing it.
comment on: http://stackoverflow.com/a/25285887
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39377079
type: Comment
type: QuestionComment
has text: http://jsfiddle.net/j4ngoje7/ This is a fiddle of the html and jQuery. When it is just the fiddle, it works fine on both desktop and mobile browsers, but not within my actual website.
comment on: http://stackoverflow.com/q/25270044
score: 0

http://stackoverflow.com/q/25287935
score: 0
has body: I have a form field with a group of checkboxes and at least one of the many checkboxes must be selected in order to submit the form. How do I use YUI3 rules to make this happen? Many thanks, S rules: { fname: { required: true, }, email: { required: true, email: true }, tel: { required: true, digits: true, }, dob: { date: true, }, }, fieldContainer: '.form__item', containerErrorClass: 'form__item--error', HTML: A group of checkboxes Select one of them. One Two Three Four
answer count: 1
has comment: http://stackoverflow.com/comment/39436163
tagged with: alloy-ui
has comment: http://stackoverflow.com/comment/39421342
tagged with: yui3
has answer: http://stackoverflow.com/a/25311042
accepted answer: http://stackoverflow.com/a/25311042
has title: How do I validate a group of checkboxes with YUI3 AlloyUI?
type: AnsweredQuestion
type: Question
tagged with: yui
tagged with: javascript

http://stackoverflow.com/a/25331026
has comment: http://stackoverflow.com/comment/39490427
has comment: http://stackoverflow.com/comment/39489763
accepted answer of: http://stackoverflow.com/q/25330951
answers question: http://stackoverflow.com/q/25330951
score: 6
has comment: http://stackoverflow.com/comment/39490504
has body: $(myString) would convert the string of HTML (must start with a &lt; character) to a jQuery-wrapped DOM fragment, which you can use all of jQuery's object methods on for manipulation.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39490316
has comment: http://stackoverflow.com/comment/39489720
type: Answer
upvote count: 6

http://stackoverflow.com/comment/39555478
has text: @DanielA.White I mentioned how it could be accomplished, but I've added the specific code to better demonstrate.
type: QuestionComment
comment on: http://stackoverflow.com/q/25367347
type: Comment
score: 0

http://stackoverflow.com/comment/39591445
comment on: http://stackoverflow.com/q/25381286
type: Comment
type: QuestionComment
score: 1
has text: possible duplicate of [How to submit a form using javascript?](http://stackoverflow.com/questions/9855656/how-to-submit-a-form-using-javascript)

http://stackoverflow.com/a/25360689
has comment: http://stackoverflow.com/comment/39543285
has comment: http://stackoverflow.com/comment/39542924
type: Answer
has comment: http://stackoverflow.com/comment/39542686
has body: var btn = document.getElementById('btn'); btn.addEventListener('click', function(){ var items = document.getElementById('items').value; var i = document.getElementById('start').value; var e = document.getElementById('end').value; var output = document.getElementById('output'); for(i; i&lt;e; i++){ output.value = output.value + items + '/' + i + '\n'; } }, false); Add getting variables into click function, because they are undefined after load. This will output all items from-to.
has comment: http://stackoverflow.com/comment/39543054
has comment: http://stackoverflow.com/comment/39543366
has comment: http://stackoverflow.com/comment/39542817
answers question: http://stackoverflow.com/q/25360651
has comment: http://stackoverflow.com/comment/39542830
score: 0

http://stackoverflow.com/comment/39473974
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25321655
has text: @@Paulpro: I dont want to depend on JSON.stringify(poly_points) variable. Is there any other to return the poly_points something like obj.x ={47.53208121578362,47.53188401121172,47.53189169452062} and obj.y={7.705052197034092},7.704971730763646,7.705076336915226}?

http://stackoverflow.com/comment/39495717
comment on: http://stackoverflow.com/q/25316629
has text: Yes, should be the same on iPhone although I haven't tried that myself. Could be some additional factor at work here, but I don't know what it would be.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39593237
type: AnswerComment
comment on: http://stackoverflow.com/a/25384229
type: Comment
has text: It's a bit sloppy, I confess. ;)
score: 0

http://stackoverflow.com/comment/39369346
type: QuestionComment
has text: Have a look at this Answer to a similar Question on http://stackoverflow.com/a/9229043/3927116
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25266272

http://stackoverflow.com/comment/39447314
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25308514
score: 0
has text: What have you done so far? Can you show us some code with WebAudio?

http://stackoverflow.com/a/25386647
has body: Try something like this &lt;SELECT id="sel" NAME="fruit" SIZE="4" MULTIPLE &gt; &lt;OPTION SELECTED&gt; Apples &lt;OPTION value="Bananas.html"&gt; Bananas &lt;OPTION value="Oranges.html"&gt; Oranges &lt;OPTION value="Watermelon.html"&gt; Watermelon &lt;OPTION value="Kiwi.html"&gt; Kiwi &lt;/SELECT&gt; and your javascript document.getElementById("sel").onclick = function(d){ window.location = this.value; }; updated jsfiddle http://jsfiddle.net/pr6tvsxm/2/
upvote count: 2
score: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25386534
type: Answer
answers question: http://stackoverflow.com/q/25386534

http://stackoverflow.com/q/25314154
type: Question
has title: bind ng-model to array size in select
accepted answer: http://stackoverflow.com/a/25314992
has body: I have a select that is populated with integers 1 2 3 4 Lets say I have a collection of objects $scope.myCollection = [{"Color":"Red", "id":1},{"Color":"Blue", "id":2}, {"Color":"Green","id":3}] I would like to make a select that is bound to the number of items in the collection This might looks something like this 1 2 3 4 I realize that adding options like my example above is not really the way to go but it gets my question across.
linked to: http://stackoverflow.com/q/20862764
tagged with: javascript
has comment: http://stackoverflow.com/comment/39457940
has answer: http://stackoverflow.com/a/25315544
has comment: http://stackoverflow.com/comment/39461337
has answer: http://stackoverflow.com/a/25314571
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39457869
possible better answer: http://stackoverflow.com/a/25314293
has answer: http://stackoverflow.com/a/25314992
has answer: http://stackoverflow.com/a/25314293
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39485377
has comment: http://stackoverflow.com/comment/39458321
score: 0

http://stackoverflow.com/comment/39593744
type: Comment
type: QuestionComment
score: 1
has text: Post the rendered HTML, not the PHP.
comment on: http://stackoverflow.com/q/25387405

http://stackoverflow.com/comment/39458777
comment on: http://stackoverflow.com/q/25314564
score: 0
type: QuestionComment
type: Comment
has text: ret is an array of strings. There are no null values.

http://stackoverflow.com/comment/39425647
type: QuestionComment
has text: Please register to the [`resource.error`](http://docs.casperjs.org/en/latest/events-filters.html#resource-error) to see it is actually the resource error like this: `casper.on("resource.error", function(resourceError){console.log(JSON.stringify(resourceError));});`
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25279827

http://stackoverflow.com/q/25389207
score: 1
has answer: http://stackoverflow.com/a/25389281
favorite count: 0
type: Question
has title: Insert an array in the middle of an existing array. Keep the existing reference intact
has comment: http://stackoverflow.com/comment/39597166
tagged with: arrays
linked to: http://stackoverflow.com/q/14715459
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/25389410
accepted answer: http://stackoverflow.com/a/25389410
upvote count: 1
has body: Say I have two arrays: var numbers = [1,3,5,7,9,11]; var letters = ['a','b','c']; And say I have another reference to the numbers array: var anotherRef = numbers; I would like to insert one into the other in a way that modifies the existing array, so that after the operation, anotherRef === numbers. If I didn't need to maintain the original array, I would do this: function insert(target, source, position) { return target.slice(0, position).concat(source, target.slice(position)); } The problem is, after an insert with this method, the two references point at different arrays: numbers = insert(numbers, letters, 3); numbers !== anotherRef; // sadly, true. If I were adding to the end of the array, I could do this, which is kind of slick: function insertAtEnd(target, source) { Array.prototype.push.apply(target, source); } Is there a nice way to insert multiple values in place in a JS array?
has comment: http://stackoverflow.com/comment/39597103
has comment: http://stackoverflow.com/comment/39597100
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25389281
downvote count: 0

http://stackoverflow.com/comment/39308040
type: Comment
type: QuestionComment
has text: Probably not the cause but an _id_ (for maximum compatibility and usability) should begin with a _letter_ `a-zA-Z`
score: 0
comment on: http://stackoverflow.com/q/25233616

http://stackoverflow.com/comment/39381065
type: AnswerComment
has text: Not JavaScript. Whoops.
score: 0
comment on: http://stackoverflow.com/a/25272669
type: Comment

http://stackoverflow.com/comment/39349775
comment on: http://stackoverflow.com/a/25255555
has text: I've typed this so many times and I just read so many questions and I didn't notice I'd added (). Thanks.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39365906
type: Comment
comment on: http://stackoverflow.com/a/25264403
has text: +1. Never use `arguments.callee`, just name the function expression.
score: 1
type: AnswerComment

http://stackoverflow.com/comment/39478533
score: 0
comment on: http://stackoverflow.com/q/25325206
type: Comment
type: QuestionComment
has text: show how you tried to use `$.when`, it should do what you want

morris.js
tags question: http://stackoverflow.com/q/25304679
tags question: http://stackoverflow.com/q/25236937
tag name: morris.js
tags question: http://stackoverflow.com/q/25299173
type: Tag

http://stackoverflow.com/comment/39608323
type: Comment
comment on: http://stackoverflow.com/a/25290893
score: 0
type: AnswerComment
has text: @klyd An amazing detailed answer. Welcome to stack overflow.

http://stackoverflow.com/a/25313993
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25313715
has comment: http://stackoverflow.com/comment/39457577
downvote count: 0
has body: Firstly, to select only this particular "form-group" you will need to add another type of identifier to the markup. This can either be another class name, or perhaps an id, like so: ... Then you'd be able to single out this easily in jQuery like this: // Store the form-group wrapper for the states var $formGroupCountry = $('#form-group-country'); To answer your question about only adding the span once, you will want to keep some kind of flag to know that the error has already been added to the DOM. This should work: var hasErrorBeenAdded = false; $(".country").on('change', function() { country = $(this).find('option:selected').val(); $.get(Routing.generate('states', {country_id: country})).success(function(data) { if (data.message === "") { $('.state').empty().append(' Choose state '); $.each(data.entities, function(i, d) { $('.state').append(' ' + d.name + ' '); }); $('.state').removeAttr('disabled'); } else if($('.country .help-block').length==0 && !hasErrorBeenAdded) { $('.country').after('' + data.message + ''); hasErrorBeenAdded = true; } }).error(function(data, status, headers, config) { if (status == '500') { message = "No connection"; } }); }); Hope this helps.
upvote count: 2

http://stackoverflow.com/comment/39439100
type: AnswerComment
type: Comment
score: 0
has text: **1)** Man, how sad is this. It's a multi-million dollar banking website. They should provide decent developer documentation. If not, contact them, to improve that! They should provide a login example for copy/paste for working with their API.
comment on: http://stackoverflow.com/a/25296091

http://stackoverflow.com/comment/39350237
type: AnswerComment
comment on: http://stackoverflow.com/a/25243426
score: 0
type: Comment
has text: can you share some references or docs on how to use `depsScan`?

http://stackoverflow.com/comment/39594319
type: Comment
has text: defining the directive outside (like what you have commented) and then appending/compiling inside the link function is correct way to do this. defining the directive inside of the link function is not correct.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25387156

http://stackoverflow.com/q/25321415
has title: jQuery function .toPrecision do not work into .each() function
accepted answer: http://stackoverflow.com/a/25321444
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39471463
type: Question
has body: I solve problem. I have loaded data from JSON and when I want to manage format display of data using function .toPrecision() then function do not work. I think that restrictive is .each(). Why? Any ideas for remove my problem? Thanks $(document).ready(function(){ var timer = $.timer(function() { $.ajax({ url: '/others/files/jsonfile.json', dataType: 'json' }).success(function(data){ $(data.MCNT_19).each(function(index, element){ var varEfs1 = \$('#ajaxBerStatistics td.efs1'); varEfs1.text(element[index+2]); var pom = varEfs1.text(); /* example: 35266 */ alert(pom); if (pom &lt; 100000) { pom.toPrecision(1); } else { alert('Is it wrong'); } }); }); }); timer.set({ time : 1000, autostart : true }); });
tagged with: javascript
has answer: http://stackoverflow.com/a/25321444
score: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/comment/39514330
comment on: http://stackoverflow.com/q/25343388
has text: can you add some code you are using?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25360185
type: Answer
upvote count: 3
has body: Is there a way (using javascript , php or html) to hide url path from address bar? No, but you can create .htaccess file: RewriteBase / RewriteEngine on RewriteRule ^public/$ public/network.php [L]
score: 3
answers question: http://stackoverflow.com/q/25360123
has comment: http://stackoverflow.com/comment/39571726
downvote count: 0
has comment: http://stackoverflow.com/comment/39557838

http://stackoverflow.com/a/25499111
has comment: http://stackoverflow.com/comment/39818920
accepted answer of: http://stackoverflow.com/q/25387644
has comment: http://stackoverflow.com/comment/39962381
has body: I just posted an answer to a similar question with working code example here: Loading an array stored in a text file in phonegap I think Abhishek's answer is quite helpful by the way.
score: 2
answers question: http://stackoverflow.com/q/25387644
has comment: http://stackoverflow.com/comment/39823395
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/comment/39395897
type: Comment
has text: Works too! Thank You, Pranay.
type: AnswerComment
comment on: http://stackoverflow.com/a/25280669
score: 0

http://stackoverflow.com/a/25255140
accepted answer of: http://stackoverflow.com/q/25253703
has comment: http://stackoverflow.com/comment/39372179
type: AcceptedAnswer
score: 1
has comment: http://stackoverflow.com/comment/39387939
has comment: http://stackoverflow.com/comment/39374861
type: Answer
has comment: http://stackoverflow.com/comment/39374568
has comment: http://stackoverflow.com/comment/39374543
has comment: http://stackoverflow.com/comment/39552808
upvote count: 1
has body: Well... there is no real loading sequence (that's the Asynchronous in AMD). The dojo/domReady! module isn't loaded last either, its the module itself that delays the AMD callback being executed. The only reason why someone would put the dojo/domReady! last, is because the returned object has no use. However, use or no use, if you need a specific module that you put after it, then you still have to add an extra parameter, for example: require(["dojo/dom", "dojo/domReady!", "dojo/aspect"], function(dom, garbage, aspect) { }); The code above works and will stay working even if you scramble the order of the modules, the only problem here is that, because we want the aspect module, we need to add a second parameter for the domReady module. So, the common practice is to put all modules which you don't need (the returned object at least) at the end of the sequence, for example: require(["dojo/dom", "dojo/aspect", "dojo/domReady!"], function(dom, aspect, garbage) { }); And because parameters in JavaScript are optional, we can leave the ones we don't need away (if they're at the end), so the code above is the same as: require(["dojo/dom", "dojo/aspect", "dojo/domReady!"], function(dom, aspect) { }); And that's why it's often added as last parameter. Though there are other modules as well that are commonly placed at the end, for example: All dojo/NodeList-* modules: These modules add extra functionality to the NodeList module. However, they are applied directly and the returned object of these modules is not useful. dojo/parser: When you configure Dojo to automatically parse all HTML (using parseOnLoad), then you don't necessarily need a reference to the parser module. However, you have to add it to make it work. All widgets: If you're using declarative markup, you don't need an instance to the module itself, however, you have to load it to make it work.
answers question: http://stackoverflow.com/q/25253703
has comment: http://stackoverflow.com/comment/39386321
downvote count: 0

http://stackoverflow.com/a/25251765
has comment: http://stackoverflow.com/comment/39342897
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39343617
upvote count: 1
downvote count: 0
type: Answer
has body: You are importing jQuery in noConflict mode, so try changing this: $(window).load(function() { $("#flexiselDemo1").flexisel(); }); to this: jQuery(document).ready(function($) { $("#flexiselDemo1").flexisel(); }); Note: go back to using JHtml::_('jquery.framework');
accepted answer of: http://stackoverflow.com/q/25251726
score: 1
answers question: http://stackoverflow.com/q/25251726

http://stackoverflow.com/comment/39455775
comment on: http://stackoverflow.com/a/25312842
has text: Yeah, I'm thinking it's a problem with his HTML, not with the regexp or selector. (Using the `/ /g` regexp works just fine too in your fiddle...)
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39345998
type: AnswerComment
comment on: http://stackoverflow.com/a/25253368
has text: You could use something like this to parse the querystrings: http://css-tricks.com/snippets/javascript/get-url-variables/
type: Comment
score: 0

http://stackoverflow.com/comment/39404074
has text: i think this is what you want...
score: 0
comment on: http://stackoverflow.com/q/25285165
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25316574
has answer: http://stackoverflow.com/a/25317711
has body: We have a product as a service that we sell on our domain, and we sell it to other people to resell on their own domain. (We also have a system with has a ton of domains built into it, with more added relatively regularly) Most third-party APIs seem to require "authorized urls" that can grab the data. This is getting more and more impossible, especially as some programming interfaces have a limit of 5 or 10 or so domains per account. Is there any good way to get API data on an ever growing list of domain names? I thought about caching data on a xhynk.com/DOMAIN, and just adding "xhynk.com" to each API, but I feel like that isn't the best way to go. Do I have any other options?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39463673
type: UnansweredQuestion
tagged with: caching
has comment: http://stackoverflow.com/comment/39464496
tagged with: api
has comment: http://stackoverflow.com/comment/39463997
has title: Best way to use third-party APIs with many domains
type: Question
has comment: http://stackoverflow.com/comment/39463450
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/39464590
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39463969

http://stackoverflow.com/q/25332692
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/24168040
downvote count: 5
has body: I know my question might be blocked here but i really cant seem to make up my mind. I am a beginner in Web Development. I am a good designer with HTML CSS AND JQuery but have never worked with server side programming or anything other then pure designing. So i am working on my own website and i have designed everything perfectly. My question is about uploading. I have to allow users to upload a photo and then send it to a particular account of manufacturer for printing. There are only 2 accounts. So just give me an overview of should i use PHP or is JavaScript enough and just name the major concepts when uploading and sending the file on server.
type: UnansweredQuestion
score: -3
tagged with: php
has comment: http://stackoverflow.com/comment/39494656
has comment: http://stackoverflow.com/comment/39493194
has answer: http://stackoverflow.com/a/25333529
type: Question
has comment: http://stackoverflow.com/comment/39493208
has comment: http://stackoverflow.com/comment/39493118
tagged with: javascript
has answer: http://stackoverflow.com/a/25332758
has comment: http://stackoverflow.com/comment/39493399
has comment: http://stackoverflow.com/comment/39493308
has title: Uploading JavaScript or PHP
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/39493104
has comment: http://stackoverflow.com/comment/39493168

http://stackoverflow.com/comment/39375164
score: 0
has text: The jQuery `on` method does not bind event handlers to dynamically create elements, rather it utilizes JavaScript Event Delegation -- The event handler is on the ` ` element, given the example above.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25269296

http://stackoverflow.com/a/25301306
has body: If you are using ajax return response in json format return json_encode($res); Or just print response in script tag &lt;script&gt; var res = &lt;?php echo json_encode(login('username','password')); ?&gt; &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/25301083
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25301083
score: 0
type: Answer

http://stackoverflow.com/q/25304824
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has title: Bind function on Runtime for dynamically created html element
has answer: http://stackoverflow.com/a/25304936
score: 0
has answer: http://stackoverflow.com/a/25304949
has comment: http://stackoverflow.com/comment/39450482
has body: I have to dynamically create a &lt;ul&gt; html element with a specific class, say class_c, using an ajax call. class_c is used by a third party js file, which can neither be changed nor called manually as it is anonymous (like $('.class_c').click(function(e){})) so I can't bind using jQuery .bind(). Is there a way to rebuild the binding for all the elements with class_c, so that the new element can respond to this anonymous function?
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39440576
has comment: http://stackoverflow.com/comment/39450900
tagged with: jquery
type: Question

http://stackoverflow.com/a/25346403
type: Answer
answers question: http://stackoverflow.com/q/25247269
score: 0
has body: Seems to work: JsFiddle Added a container for B that was the width of A but the height of B. Works if you don't mind the horizontal scrollbar at the bottom of B (which you can hide using webkit-scrollbar: JsFiddle) :/
has comment: http://stackoverflow.com/comment/39586008

http://stackoverflow.com/comment/39385982
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25274014
score: 1
has text: @alejoss, you're simply supposed to call `.validate()` within the DOM ready handler function. `.validate()` should not be inside of any `submit` or `click` handlers. This is the most common reason needing to click submit twice with this plugin. Otherwise, open a new question and include all relevant code.

http://stackoverflow.com/comment/39667441
comment on: http://stackoverflow.com/a/25383578
score: 0
has text: Sorry, missed the part with various dropdowns, updated fiddle.
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/39563765
type: AnswerComment
score: 0
type: Comment
has text: Ah, I see now that I misunderstood how it functioned. I assumed it was async calls, so if one interval hadnt finished before the next one was due to start, they would have overlapped. I see that this is incorrect and only one interval function will run at a time
comment on: http://stackoverflow.com/a/25370566

http://stackoverflow.com/q/25260818
has comment: http://stackoverflow.com/comment/52355597
tagged with: node.js
type: AnsweredQuestion
score: 203
upvote count: 203
has answer: http://stackoverflow.com/a/30549313
has answer: http://stackoverflow.com/a/25304916
type: Question
answer count: 8
possible better answer: http://stackoverflow.com/a/30549313
has title: Rest with Express.js nested router
tagged with: javascript
tagged with: express
has answer: http://stackoverflow.com/a/25313301
has answer: http://stackoverflow.com/a/47939226
has answer: http://stackoverflow.com/a/25305272
downvote count: 0
accepted answer: http://stackoverflow.com/a/25305272
has body: Suppose I want to have REST endpoints which look roughly like this: /user/ /user/user_id /user/user_id/items/ /user/user_id/items/item_id CRUD on each if makes sense. For example, /user POST creates a new user, GET fetches all users. /user/user_id GET fetches just that one user. Items are user specific so I put them under user_id, which is a particular user. Now to make Express routing modular I made a few router instances. There is a router for user, and a router for the item. var userRouter = require('express').Router(); userRouter.route('/') .get(function() {}) .post(function() {}) userRouter.route('/:user_id') .get(function() {}) var itemRouter = require('express').Router(); itemRouter.route('/') .get(function() {}) .post(function() {}) itemRouter.route('/:item_id') .get(function() {}) app.use('/users', userRouter); // Now how to add the next router? // app.use('/users/', itemRouter); URL to item is descendents of the URL hierarchy of the user. Now how do I get URL with /users whatever to userRouter but the more specific route of /user/*user_id*/items/ to the itemRouter? And also, I would like user_id to be accessible to itemRouter as well, if possible.
favorite count: 0
has answer: http://stackoverflow.com/a/63116107
has answer: http://stackoverflow.com/a/70939610
has answer: http://stackoverflow.com/a/66807316

http://stackoverflow.com/comment/39418053
type: Comment
comment on: http://stackoverflow.com/a/25292566
type: AnswerComment
score: 0
has text: fyi... aspiring js/jQuery student.

http://stackoverflow.com/q/25277432
tagged with: javascript
score: 0
has body: I have a slider bar and want the its gripper starts at the left side. Here is what I tried to do, but it doesn't work. &lt;input type="range" id="{{'sa' + q.id}}" value="0" min="0" max="10" ng-model="q.answer" style="clear:both;"/&gt;&lt;span &gt;{{q.answer}}&lt;/span&gt; As you can see, I set the value of that slider bar to 0 but the gripper still shows at the middle of it. Do you have any clue? Update I tried to remove ng-model="q.answer" and found the problem is fixed. But I do need ng-model to do the data-binding. Do you have any clue to stop this happening? Update 2 I actually have a list of questions to add an attribute, "answer",and set its value to 0. Here is the code. $http.get("http://my.azurewebsites.net/api/Questions").success(function (data) { $scope.questions = data; angular.forEach($scope.questions, function (value, key) { console.log(this); // how to write the code to add an attribute "answer" to the question object and set its value to 0? }); Update 3 : Solution I found the issue was caused by the default value of q.answer and thus changed this value, here is how I did it. $scope.questions[key].answer = 0; Thanks to your input :)
has answer: http://stackoverflow.com/a/25277528
accepted answer: http://stackoverflow.com/a/25277528
answer count: 1
tagged with: jquery
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39389597
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39389618
has comment: http://stackoverflow.com/comment/39389586
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39389612
type: Question
has title: Use of ng-model incorrectly makes slider bar start at middle
has comment: http://stackoverflow.com/comment/39389595

http://stackoverflow.com/q/25341842
answer count: 2
tagged with: javascript
score: 0
has body: I have a responsive grid whitin images. I would like to make a random order of these pictures by a shuffle function but I don't know how to do. Any idea ? Thanks. Html Script $.shuffle('#grid div');
has answer: http://stackoverflow.com/a/25341998
has comment: http://stackoverflow.com/comment/39509661
has title: Shuffle images in a grid
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25341913
tagged with: shuffle
tagged with: grid
linked to: http://stackoverflow.com/q/5329201
type: Question

http://stackoverflow.com/q/25303595
has answer: http://stackoverflow.com/a/25303656
has title: jQuery append: can't get the quotes right
has answer: http://stackoverflow.com/a/25303723
answer count: 4
has body: I'm trying to add some HTML to a div, but I can't get the quotes right... This is what I thought would work, but doesn't...: success: function (data) { id = data.photo_id; $("#successtext").append('The linkLog Out'); $("#success").show(); $("#uploading").hide(); $("#turn").hide(); turnable = 0; } As you can see, this is part of an Ajax calls. Note that the append does work, just not with the right button markup. Note: the first link links to, for example, https://www.theurl.com/223424324 What am I doing wrong, and why? Thanks!
possible better answer: http://stackoverflow.com/a/25303723
accepted answer: http://stackoverflow.com/a/25303656
has comment: http://stackoverflow.com/comment/39438192
tagged with: quotes
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/39438127
type: Question
has answer: http://stackoverflow.com/a/25303681
tagged with: quoting
has answer: http://stackoverflow.com/a/25303872
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25283725
has body: How about using toggleClass method // Show/hide filters on mobile // $('#openMobileFilters').click(function(){ showOrHideFilter(true); }); $('.closeFilters').click(function(){ showOrHideFilter(false); }); function showOrHideFilter(show) { $( "#results-container, .navbar-inverse" ).toggleClass( "hidden-xs", show ); $('#filter-column').toggleClass("hidden-xs", !show); }
answers question: http://stackoverflow.com/q/25283375
accepted answer of: http://stackoverflow.com/q/25283375
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39414488
type: Answer

http://stackoverflow.com/a/25335432
answers question: http://stackoverflow.com/q/25335368
has comment: http://stackoverflow.com/comment/39498732
has body: This should do the work : $("#drop").change(function() { if( $('#drop option:selected').val() == "A") { //Do what you want } else if ( $('#drop option:selected').val() == "B") { //Do what you want } }); I don't know your level in js, if you need more explanations, please let me know.
type: Answer
has comment: http://stackoverflow.com/comment/39498485
score: 0

http://stackoverflow.com/comment/39394875
type: Comment
type: QuestionComment
has text: @NinjaDevelopers Yes please if you like to help
comment on: http://stackoverflow.com/q/25280241
score: 0

http://stackoverflow.com/a/25336019
answers question: http://stackoverflow.com/q/25335081
type: AcceptedAnswer
downvote count: 0
has body: At the bottom of the routes, make a default one: app.get('/dist/img/fileicons/*', function(req, res) { res.sendfile('path/to/blank.png') });
score: 4
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/39560912
accepted answer of: http://stackoverflow.com/q/25335081

http://stackoverflow.com/a/25442844
accepted answer of: http://stackoverflow.com/q/25231808
has comment: http://stackoverflow.com/comment/115460976
downvote count: 0
type: AcceptedAnswer
has body: It turns out that there are hard-limits put on the maximum size of strings, objects and arrays. The limts are a remnant of the old garbage collector. Here is the relevant ticket: https://code.google.com/p/v8/issues/detail?id=3505
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/25231808

http://stackoverflow.com/comment/39391710
type: QuestionComment
has text: put your css in ` `, then it works.
comment on: http://stackoverflow.com/q/25278728
score: 1
type: Comment

http://stackoverflow.com/a/25289902
has comment: http://stackoverflow.com/comment/39412758
upvote count: 3
has body: That is because in if you are using = not ==. &amp; you should also check for newLine character. I am assuming \n here. This line if(this.nextSibling.nodeValue = 'br1') should be if(this.nextSibling.nodeValue == 'br1\n') As @antyrat told just use remove for that $( this.nextSibling ).remove(); $( this ).remove(); FOR CONTAINS if(this.nextSibling.nodeValue.indexOf('br')&gt;-1){}
has comment: http://stackoverflow.com/comment/39412715
score: 3
answers question: http://stackoverflow.com/q/25289874
has comment: http://stackoverflow.com/comment/39412574
has comment: http://stackoverflow.com/comment/39412615
has comment: http://stackoverflow.com/comment/39412660
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39412569

http://stackoverflow.com/comment/39446656
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25308102
has text: flexslider 1 or 2? any code or example of you problem?
score: 0

http://stackoverflow.com/comment/39462895
type: Comment
score: 1
has text: it works for me... did you by any chance check the box that says prevent firefox grom opening the alerts etc... if you did or unsure, then restart browser, clear cookies history etc and try reloading again
type: AnswerComment
comment on: http://stackoverflow.com/a/25316562

oop
tags question: http://stackoverflow.com/q/25328854
tags question: http://stackoverflow.com/q/25242397
tags question: http://stackoverflow.com/q/25364098
tags question: http://stackoverflow.com/q/25239675
tag name: oop
tags question: http://stackoverflow.com/q/25303961
tags question: http://stackoverflow.com/q/25253831
tags question: http://stackoverflow.com/q/25308711
tags question: http://stackoverflow.com/q/25384213
tags question: http://stackoverflow.com/q/25266965
tags question: http://stackoverflow.com/q/25373907
tags question: http://stackoverflow.com/q/25285717
tags question: http://stackoverflow.com/q/25279974
tags question: http://stackoverflow.com/q/25321844
tags question: http://stackoverflow.com/q/25290573
tags question: http://stackoverflow.com/q/25337162
type: Tag

http://stackoverflow.com/comment/83956108
type: Comment
comment on: http://stackoverflow.com/a/33622881
has text: You are calling `downloadURL(url, filename, mimeType)` from within `downloadBlob` but the function is `downloadURL(data, filename)`, so unless there is same magic happening that I don't understand, it's not matching. I think it's a case of just removing the `mimeType` but when first trying to understand it it's still confusing.
type: AnswerComment
score: 0

http://stackoverflow.com/a/25371821
answers question: http://stackoverflow.com/q/25354462
type: Answer
score: 2
downvote count: 0
upvote count: 2
has body: Your problem is twofold. First: \b matches a word break on its position. A word break matches when on one of its sides you have a Word Character and on the other side a Not A Word Character. Your regex starts with "\\b"+sTerm and so it will fail for jason on \bason and \bson, but will match on \bj, \bjas and \bjaso. If there is 'nothing' on the left of a \b then it counts as 'not a word character' (there is no word character, see? :), and in the Fail cases there is something there, while in the Match cases there is not. Second: the characters ø and å are not considered "word characters" in Javascript, as this simple test will show you: alert ("østergård".match(/\W+/g)); Since they are not considered a word character, the behavior of \b is the reverse of what you think it does: alert ("østergård".match(/\bøster/)); // null It fails because \b sees a not-word character on its right (the ø) and so it should match a word character on its left (it doesn't, there is nothing there). A small test suite for your sample cases: var sTerm = [ [ "asbjørn", "asbjør", "asb", "ørn" ], [ "østergård", "øster", "østergård" ], [ "østergård", "stergård", "ård", "rd" ], [ "jason", "j", "jas", "jaso" ], [ "jason", "ason", "son" ] ]; var r = ''; for (s=0; s&lt;sTerm.length; s++) { for (s2=1; s2&lt;sTerm[s].length; s2++) { var regXSearch = "\\b"+sTerm[s][s2]; //sTerm is the value of my search field var regX = new RegExp(regXSearch,"gi"); var nameCheck = regX.test(sTerm[s][0]); r += "["+sTerm[s][s2]+"] on ["+sTerm[s][0]+"] is "+nameCheck+'\r'; } } alert (r); shows the same order of true and false as you reported. If you remove the \b in regXSearch you will see that all return true. Why does your own 'temporary fix' fix it? You replace the non-word characters (nothing personal, this is just according to Javascript!) with valid word characters, and so you get the expected behavior of \b back. A better fix is not to rely on this specific behavior of \b (and, by extension, \w). If these user nam…

http://stackoverflow.com/q/25234939
has body: I have a set of arrays of the form A= [1,2,3,4,5,6] B= [7,8,9] C= [5,6] D= [9] I want to "overlay" the right-sided (suffix) supersets (strictly speaking, super-sequences) on the subsets (subsequences) so that the result set looks like this: A= [1,2,3,4,5,6] (unchanged, because not a subset of anything) B= [7,8,9] (unchanged, because not a subset of anything) C= [1,2,3,4,5,6] (C overlayed with A, because C is a subset of A) D= [7,8,9] (D overlayed with B, because D is a subset of B) I'm doing this in node.js. I think partly it is a logic problem that I'm failing to grasp. I The real-world use case is merging path names in order to normalize a classification hierarchy that has many items with a mixture of full and truncated paths, e.g. /Science/Biology and /Biology gets normalized to /Science/Biology Many thanks for any pointers to how to do this.
has comment: http://stackoverflow.com/comment/39311695
has comment: http://stackoverflow.com/comment/39311120
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39311699
favorite count: 0
has title: Overlaying a superset array onto a subset array where order/sequence matters (in Javascript)
accepted answer: http://stackoverflow.com/a/25236691
tagged with: node.js
has answer: http://stackoverflow.com/a/25235703
has answer: http://stackoverflow.com/a/25236691
has comment: http://stackoverflow.com/comment/39311758
upvote count: 1
has comment: http://stackoverflow.com/comment/39311242
type: AnsweredQuestion
tagged with: algorithm
has comment: http://stackoverflow.com/comment/39311632
score: 1
type: Question
possible better answer: http://stackoverflow.com/a/25235703
has comment: http://stackoverflow.com/comment/39310952
answer count: 2

http://stackoverflow.com/comment/39441359
type: Comment
comment on: http://stackoverflow.com/a/25304074
score: 0
type: AnswerComment
has text: write this `alert($input.attr('id'));` after `var $input = $(this);` and tell me what you got ?

http://stackoverflow.com/comment/39550970
comment on: http://stackoverflow.com/a/25361714
has text: @YuC: Convinced that this is a bug in `.empty()`, I filed [an issue](http://bugs.jquery.com/ticket/13517) with jQuery and added [a PR on GitHub](https://github.com/jquery/jquery/pull/1643). Hopefully this will get fixed soon.
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/39595641
comment on: http://stackoverflow.com/a/25388416
has text: I like the session method and could see how it could be done if the user was to stay on the site (e.g. refreshing the page). However if the user was to close the browser i'm not sure how I would check the session variable and delete the image. any ideas?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/58060524
has body: You should validate before executing.... function FullScreen(divID) { fnFullScreen(divID, !IsFullScreen()); } function IsFullScreen() { return (document.fullscreenElement && document.fullscreenElement !== null) || (document.webkitFullscreenElement && document.webkitFullscreenElement !== null) || (document.mozFullScreenElement && document.mozFullScreenElement !== null) || (document.msFullscreenElement && document.msFullscreenElement !== null); } function fnFullScreen(divID, TurnOn) { if (TurnOn) { var docElm = $('#' + divID).parent()[0]; if (docElm.requestFullscreen) { docElm.requestFullscreen(); } else if (docElm.mozRequestFullScreen) { docElm.mozRequestFullScreen(); } else if (docElm.webkitRequestFullScreen) { docElm.webkitRequestFullScreen(); } else if (docElm.msRequestFullscreen) { docElm.msRequestFullscreen(); } $('#' + divID).css("min-height", "100vh"); $('.btnFullScreen').html('Exit Full Screen'); } else { if (document.exitFullscreen) { document.exitFullscreen().catch(() => { }); } else if (document.webkitExitFullscreen) { document.webkitExitFullscreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.msExitFullscreen) { document.msExitFullscreen(); } $('#' + divID).css("min-height", ""); $('.btnFullScreen').html('Full Screen'); } } Full Screen click to full screen
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25304853

http://stackoverflow.com/a/25312438
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25310454
has comment: http://stackoverflow.com/comment/39461178
type: AcceptedAnswer
has body: Ok, I managed to make it work without any javascript involved. The bootstrap syntaxed needed a UL>LI dropdown in which you added the form instead of a button and a DIV. You seemed to be adding the search twice, but in my example, there is no need for that. The dropdown/search form follows and adapt with resizing, althought a bit of media query could fix a horizontal scroolbar showing on mobile resolution. Bootply Example html: Toggle navigation Brand Link 1 Link 2 Submit css: .submitBtn{ margin-top:5px; background:#E7E7E7; } .submitBtn:hover{ background:#DADADA; } @media only screen and (max-width : 767px) { .navbar-form{ margin-right:0; margin-left:0; } }
answers question: http://stackoverflow.com/q/25310454
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39460777

http://stackoverflow.com/a/25270477
downvote count: 0
has comment: http://stackoverflow.com/comment/39377070
answers question: http://stackoverflow.com/q/25270392
upvote count: 2
has body: You need to set the ID of your tab-content and nav on the second panel to another id (you can't have more than 1 id per page). So change the second nav and tab to nav2 and tab2-content. $('#tab-content div').hide(); $('#tab-content div:first').show(); $('#nav li').click(function() { $('#nav li a').removeClass("active"); $(this).find('a').addClass("active"); $('#tab-content div').hide(); var indexer = $(this).index(); $('#tab-content div:eq(' + indexer + ')').fadeIn(); }); $('#tab2-content div').hide(); $('#tab2-content div:first').show(); $('#nav2 li').click(function() { $('#nav2 li a').removeClass("active"); $(this).find('a').addClass("active"); $('#tab2-content div').hide(); var indexer = $(this).index(); $('#tab2-content div:eq(' + indexer + ')').fadeIn(); }); Edit: Robust Function function initTabPanel( navid, tabid ) { $('#' + tabid + ' div').hide(); $('#' + tabid + ' div:first').show(); $('#' + navid + ' li').click(function() { $('#' + navid + ' li a').removeClass("active"); $(this).find('a').addClass("active"); $('#' + tabid + ' div').hide(); var indexer = $(this).index(); $('#' + tabid + ' div:eq(' + indexer + ')').fadeIn(); }); } // Initialzing the two tab panels initTabPanel( 'nav', 'tab-content' ); initTabPanel( 'nav2', 'tab2-content' );
has comment: http://stackoverflow.com/comment/39376915
type: Answer
score: 2

http://stackoverflow.com/q/25344368
type: AnsweredQuestion
downvote count: 0
upvote count: 28
type: Question
accepted answer: http://stackoverflow.com/a/25344423
tagged with: javascript
has answer: http://stackoverflow.com/a/25344423
answer count: 1
score: 28
favorite count: 0
has title: ng-model: empty strings should be null
tagged with: angularjs
has body: If I use ng-model for an input field and empty it, angular sets it to '' instead of null even if it was null before. This is a problem in my case because I need to send null to the server if the input field is empty, and not ''. Is there a way to tell angular setting "empty" input models to null?

http://stackoverflow.com/q/25385110
has comment: http://stackoverflow.com/comment/39589114
type: AnsweredQuestion
score: 2
downvote count: 0
has title: jQuery - Combine variables and strings inside .css() method
type: Question
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25385184
upvote count: 2
has answer: http://stackoverflow.com/a/25385184
answer count: 3
has body: How do you combine strings and variables as properties in the .css() method in jQuery? I can easily do it if setting background-position-x and background-position-y but they aren't supported in Firefox &amp; Opera. function bgPos() { jq('element').each(function() { var bgPosX = 10; var bgPosY = 20; jq(this).css("background-position", "bgPosX + 'px', bgPosY + 'px'"); }); }
has comment: http://stackoverflow.com/comment/39589190
favorite count: 0
has answer: http://stackoverflow.com/a/25385200
has answer: http://stackoverflow.com/a/25385372
accepted answer: http://stackoverflow.com/a/25385372

http://stackoverflow.com/q/25327260
has comment: http://stackoverflow.com/comment/39482309
linked to: http://stackoverflow.com/q/19616477
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39482313
has title: Why can't we use a for loop to create an animation?
upvote count: 6
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25327303
has answer: http://stackoverflow.com/a/25327328
has comment: http://stackoverflow.com/comment/39483058
downvote count: 0
has comment: http://stackoverflow.com/comment/39482307
favorite count: 0
has body: With the help of the jQuery library and the offset() method it seems logical to think that by writing this simple code the element will gradually change position for (i = 0; i &lt; 900; i = i + .5) { $('#moving-element').offset({ top: i }) } The browser will stop for a while and will finally move the element to a position 900px apart from the top, no transition can be observed. Out of curiosity i wrote this : for (i = 0; i &lt; 900; i = i + .5) { $('#moving-element').offset({ top: i }); console.log(i) } to see that the console is outputting the succession of numbers fine, but it only offsets the element once the for loop is over. Why is this not done gradually as the code is being executed?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39482379
score: 6
has comment: http://stackoverflow.com/comment/39482323
linked to: http://stackoverflow.com/q/16749664

http://stackoverflow.com/a/25302984
has comment: http://stackoverflow.com/comment/39438140
has comment: http://stackoverflow.com/comment/39438683
score: 0
has comment: http://stackoverflow.com/comment/39438713
has comment: http://stackoverflow.com/comment/39437992
has comment: http://stackoverflow.com/comment/39437693
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39437794
type: Answer
accepted answer of: http://stackoverflow.com/q/25302474
has body: You can put the whole ajax code inside a function and call that when the button is clicked. Executing http://jsfiddle.net/xmkn3mu4/1, an alert with the source code of abc.com is opened. $(document).ready(function () { $('button').click(function(){ request(); }); }); function request() { var fromData = { "version": $('input[name=version]').val(), "sensors": [{ "sensor": $('input[name=sensors_name]').val(), "output": [{ "name": $('input[name=sensors_name]').val(), "type": $('input[name=sensors_type]').val() }] }], }; var fromDatan = JSON.stringify(fromData); alert(fromDatan); $.ajax({ url: "abc.com", headers: { "x-api-key": "abcd=", "content-type": "application/json" }, type: "POST", data: fromDatan, success: function (fromData, status, jqXHR) { alert(JSON.stringify(fromData)); }, error: function (jqXHR, status) { alert(JSON.stringify(jqXHR)); } }); return false; };
answers question: http://stackoverflow.com/q/25302474
has comment: http://stackoverflow.com/comment/39438363

http://stackoverflow.com/q/25335487
favorite count: 0
has comment: http://stackoverflow.com/comment/39498445
downvote count: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25335516
has comment: http://stackoverflow.com/comment/39498459
upvote count: 1
has body: I saw the following code in an anonymous javascript function and can't understand how it is useful? (function($, undefined) { var src = $('script:last').attr('src'); // &lt;- how is this line of code useful // more code to follow..... })(jQuery);
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: -1
possible better answer: http://stackoverflow.com/a/25335510
has title: what does this jQuery code means?
has answer: http://stackoverflow.com/a/25335510
has answer: http://stackoverflow.com/a/25335516

http://stackoverflow.com/q/25259621
tagged with: javascript
has body: This is my slider code that outputs a value below Max Value £ The value is controlled by the following JS function updateTextInput(val) { document.getElementById('textInput').value=val; } I need to create a function that hides the following code block when the .plot-price is greater than the value in #sliderValue. Cornwall Plot 5 4 bedrooms 255995 View Plot Sold Thanks in advance for any help and apologies for any formatting/ question mistakes (first time)
answer count: 2
upvote count: 1
tagged with: jquery
favorite count: 0
has title: How to use jQuery or JavaScript to filter out results above a range
possible better answer: http://stackoverflow.com/a/25259725
tagged with: http://stackoverflow.com/tag/html
tagged with: input
has answer: http://stackoverflow.com/a/25259725
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/25260006
accepted answer: http://stackoverflow.com/a/25260006

html5-canvas
tags question: http://stackoverflow.com/q/25266276
tags question: http://stackoverflow.com/q/25338481
tags question: http://stackoverflow.com/q/25308025
tags question: http://stackoverflow.com/q/25277023
tags question: http://stackoverflow.com/q/25364769
tags question: http://stackoverflow.com/q/25373345
tags question: http://stackoverflow.com/q/25384903
tags question: http://stackoverflow.com/q/25280814
tags question: http://stackoverflow.com/q/25321889
tags question: http://stackoverflow.com/q/25265472
tags question: http://stackoverflow.com/q/25313839
tags question: http://stackoverflow.com/q/25259718
tags question: http://stackoverflow.com/q/25311019
tags question: http://stackoverflow.com/q/25281067
tags question: http://stackoverflow.com/q/25272889
tag name: html5-canvas
tags question: http://stackoverflow.com/q/25237146
tags question: http://stackoverflow.com/q/25315897
tags question: http://stackoverflow.com/q/25254668
type: Tag
tags question: http://stackoverflow.com/q/25336577

http://stackoverflow.com/comment/39441617
comment on: http://stackoverflow.com/a/25303519
has text: I get it, but as a counter example: jQueryUI :) Thanks for your thoughts.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25244891
has comment: http://stackoverflow.com/comment/39329337
score: 0
has body: I have large amounts of binary values that I want to (more) compactly store as strings, so I was using binary -> base36 conversion by using parseInt('0101010101010 etc', 2).toString(36) However, when attempting to reverse this calculation with parseInt('base36 value', 36).toString(2) there is a loss of accuracy as everything after some number of digits gets cut off, I would assume because of floating point limitations. What is the correct/better way to accomplish this? Ex: My base 36 is dkmgiancyx44so4ck8gwgkoc8gk4ks8ks48kook0co8w04sk4scokkgk800kk4w08s4s0oso0g8w0g8kkggskosw48s00wgo04wgw0g4okg04kg0okswc8ogg4s4skkscccg44o8so084ckocosoo4sokkgco8gg4ggocscg08goo4c0cw0kcscso but running parseInt(text,36).toString(2) yields 10000010100101100000000000000000001100011000001101111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
has comment: http://stackoverflow.com/comment/39329237
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/13408485
answer count: 0
has comment: http://stackoverflow.com/comment/39329422
type: Question
has title: Convert a large amount of base36 text to base 2 text
tagged with: javascript
has comment: http://stackoverflow.com/comment/39329404

http://stackoverflow.com/a/25286676
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
has body: Try the following: var input = [1,1,2,4,6,7,7,1]; input.sort() var output = []; var len = input.length; for (var i = 0; i &lt; Math.floor((len / 2)); i++) { output.push(input[i]); output.push(input[len - i - 1]); } if (len % 2) { var left_over = input[Math.floor(len / 2)]; if (left_over == output[0]) { output.push(left_over); } else { output.unshift(left_over); } } Or see http://jsfiddle.net/d0j3Lfa3/1. The solution sorts the numbers then alternates high and low. It deals with an odd number of elements, including corner cases such as [1,1,2] and [1,2,2] where it needs to push the middle element differently to pass. Since the input is sorted, input order doesn't affect the output. This answer may help simplify things a bit.
accepted answer of: http://stackoverflow.com/q/25284741
answers question: http://stackoverflow.com/q/25284741
upvote count: 1

http://stackoverflow.com/comment/39629657
has text: With iframe it still doesn't trigger event after video ends and it doesn't autoplay. But it works on IE.
type: Comment
comment on: http://stackoverflow.com/a/25390336
type: AnswerComment
score: 0

http://stackoverflow.com/q/25374991
linked to: http://stackoverflow.com/q/13441307
has answer: http://stackoverflow.com/a/25375081
duplicate of: http://stackoverflow.com/q/13441307
has comment: http://stackoverflow.com/comment/39574733
linked to: http://stackoverflow.com/q/17665489
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39570442
has body: Why does calling an object function straight from an addEventListener make this point to calling element, but calling from a third party function makes this point to the object and NOT the third party function? var obj = { me: 'obj', objFunction: function(){ document.body.innerHTML += this.me; } }; document.addEventListener('mousedown', obj.objFunction); document.addEventListener('mouseup', thirdParty); function thirdParty(){ obj.objFunction(); } The above code will print undefined on mousedown and 'obj' on mouseup. http://jsfiddle.net/ana353Lk/1/ Guess I'm curious if there is an advantage to why it works this way...
linked to: http://stackoverflow.com/q/1338599
accepted answer: http://stackoverflow.com/a/25375081
type: Question
has comment: http://stackoverflow.com/comment/39570463
answer count: 2
possible better answer: http://stackoverflow.com/a/25376500
has answer: http://stackoverflow.com/a/25376500
tagged with: javascript
has title: Why 'this' in object function is different when called directly from addEventListener
score: 0
has comment: http://stackoverflow.com/comment/39574710
linked to: http://stackoverflow.com/q/3127429
duplicate of: http://stackoverflow.com/q/3127429

http://stackoverflow.com/q/25341786
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: kendo-ui
has body: I am trying to implement Kendo UI scheduler. But I can't seem to get the datasource to work. My JS is: var diary = { open: function() { dialog('diary', function() { $('#diaryDialog').css('width', '1450px'); $('#calendar').kendoScheduler({ date: new Date("2013/6/13"), startTime: new Date("2013/6/13 07:00 AM"), height: 700, views: [ "day", {type: "workWeek", selected: true}, "week", "month", "agenda" ], timezone: "Etc/UTC", dataSource: { batch: true, transport: { read: { url: ROOT + "Diary/fetchDiary", type: "POST", dataType: "json" }, update: { url: "http://demos.telerik.com/kendo-ui/service/tasks/update", dataType: "json" }, create: { url: "http://demos.telerik.com/kendo-ui/service/tasks/create", dataType: "json" }, destroy: { url: "http://demos.telerik.com/kendo-ui/service/tasks/destroy", dataType: "json" }, parameterMap: function(options, operation) { if (operation !== "read" &amp;&amp; options.models) { return kendo.stringify(options.models); } } }, schema: { model: { id: "taskId", fields: { taskId: {from: "TaskID", type: "number"}, title: {from: "Title", defaultValue: "No title", validation: {required: true}}, start: {type: "date", from: "Start"}, end: {type: "date", from: "End"}, startTimezone: {from: "StartTimezone"}, endTimezone: {from: "EndTimezone"}, description: {from: "Description"}, recurrenceId: {from: "RecurrenceID"}, recurrenceRule: {from: "RecurrenceRule"}, recurrenceException: {from: "RecurrenceException"}, ownerId: {from: "OwnerID", defaultValue: 1}, isAllDay: {type: "boolean", from: "IsAllDay"} } } }, filter: { logic: "or", filters: [ {field: "ownerId", operator: "eq", value: 1}, {field: "ownerId", operator: "eq", value: 2} ] } }, }) }) } } And the when it initialises the data string that comes over is: [{"TaskID":4, "OwnerID":2, "Title":"Bowling tournament", "Description":"", "StartTimezone":null, "Start":"Date(1370811600000)", "End":"Date(1370822400000)", "EndTimezone":null, "RecurrenceRule":null, "RecurrenceID":null, "RecurrenceException":null,…
favorite count: 0
tagged with: kendo-scheduler
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/102531477
tagged with: php
score: 3
answer count: 0
upvote count: 3
type: Question
has title: Kendo UI Scheduler Datasource

http://stackoverflow.com/q/25293009
downvote count: 1
has body: this code returns "ReferenceError: work is not defined" when clicking the submit button and I haven't found why. (I'm also using CakePHP) My idea is to create a validator object, create functions in it, and then instantiate and use it. HTML: name mail comment JavaScript: var validator = function() { var name; name = form.name.value; var mail; mail = form.mail.value; var comment; comment = form.comment.value; validate: function() { form.name.value = "NO!"; } } function work(form) { v = new validator(); v.validate(); }
possible better answer: http://stackoverflow.com/a/25293939
accepted answer: http://stackoverflow.com/a/25332060
type: AnsweredQuestion
tagged with: javascript
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: Javascript Reference Error in html form
tagged with: reference
has answer: http://stackoverflow.com/a/25332060
has answer: http://stackoverflow.com/a/25293939
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25293959
upvote count: 1

http://stackoverflow.com/comment/39469035
type: Comment
has text: I just tried this and still doesn't work. I look at the code and it seems right, I don't see why it shouldn't work. Maybe I'm loading thje extension in the wrong way or I'm missing something. What do you think?
type: AnswerComment
comment on: http://stackoverflow.com/a/25319914
score: 0

http://stackoverflow.com/comment/39530546
comment on: http://stackoverflow.com/q/25353648
score: 0
type: Comment
type: QuestionComment
has text: @somecbusnerd usually `this` is the DOM element of the selector. If you are doing something abnormal you could always check out the value yourself either using debugging/breakpoints, or `console.log(this)` and find out. Just to confuse you :) … another thing you may consider is to use the plugin `each2()`, which is faster than `each()`, but instead of passing the DOM element it passed a jQuery wrapped DOM element, so that you don't have to do `$(this)` there are downsides to this, but in general it's much faster.

http://stackoverflow.com/comment/39373058
comment on: http://stackoverflow.com/a/25268092
score: 0
type: AnswerComment
has text: Awesome!!! It's exactly what I wanted. I knew for the syntax for creating the input but I had problems to post. I was also exploring the get(0) but I only put it in the function not in the definition of the element. Another way that I found is to trigger an event: $(div).on('yld',function(e){alert(div.animal)}); and in yeldAnimal: var action=$.Event('yld',{}) $(actElement).trigger(action) Anyway, thanks a lot for your help.
type: Comment

http://stackoverflow.com/a/25319951
score: 1
has comment: http://stackoverflow.com/comment/39486822
has comment: http://stackoverflow.com/comment/39491696
has body: In your option tags, you can have a property of "selected" Please select an option foobar For jQuery you can do this: $("select option").each(function(){ if($(this).prop("selected") == true) { alert("found the selected option. The value is: " + $(this).val()); } }); Fiddle: http://jsfiddle.net/o24g9feo/
upvote count: 1
answers question: http://stackoverflow.com/q/25319814
type: Answer
downvote count: 0

http://stackoverflow.com/comment/39577955
score: 0
type: AnswerComment
type: Comment
has text: I don't quite follow your code. Does this all happen on one page? And so you called $("#modal").dialog("close"); immediately after $(this).closest('tr').remove(); ?
comment on: http://stackoverflow.com/a/25334262

http://stackoverflow.com/q/25338169
has answer: http://stackoverflow.com/a/26222847
type: Question
answer count: 2
score: 10
tagged with: javascript
has comment: http://stackoverflow.com/comment/39505109
has comment: http://stackoverflow.com/comment/39506286
has answer: http://stackoverflow.com/a/25348434
has title: iron-router waitOn Meteor.user()
upvote count: 10
has comment: http://stackoverflow.com/comment/39506554
tagged with: meteor
favorite count: 0
has comment: http://stackoverflow.com/comment/39504847
tagged with: iron-router
type: UnansweredQuestion
has body: I would use Meteor.user() in data iron-router, but this is undefined at start... I'm trying with: waitOn: function() { return curretUserHandle; }, data: function() { // access to Meteor.user().username, give me undefined [...] var curretUserHandle = { ready: function () { return 'undefined' !== typeof Meteor.user(); } }; but data function of route is always call before curretUserHandle.ready() return true I know that i can add if(Meteor.user()) in data, but this option don't like. Why data don't wait that Meteor.user() is ready?
has comment: http://stackoverflow.com/comment/39504131
downvote count: 0
has comment: http://stackoverflow.com/comment/39503299

http://stackoverflow.com/comment/39566762
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25373060
score: 0
has text: I promise I will but say tl:dr; is it possible? or am I f'd?

http://stackoverflow.com/a/25312644
answers question: http://stackoverflow.com/q/25312284
type: Answer
has body: The problem here is the way you're creating your html object. By doing it in one line you can't attach a listener for the click event. I suggest to create elements in the javascript style: var container = document.createElement("div"); container.className = "expcolimage"; var link = document.createElement("a"); link.setAttribute("fid", $fid); var img = document.createElement("img"); img.src = "images/collapse_collapsed.gif"; img.id = "ann_" + $forum['fid'] + "_img"; img.className = "expander"; link.appendChild(img); container.appendChild(link); $forum['collapsed_image'] = container; link.click(function(event){ event.preventDefault(); //AJAX code }); Then I suggest you to look at these examples for choosing the best for you: http://www.w3schools.com/ajax/ajax_examples.asp
score: 0

http://stackoverflow.com/q/25282182
tagged with: vim
type: AnsweredQuestion
has body: I have a VIM buffer containing the following pieces of code: function foo () {...} foo (); foo(); if (foo ()) {...} function bar() {...} bar = function () {...} for (...) {} bar (foo()); I want only match the function declarations and function calls (that means that JavaScript statements and keywords will be excluded. e.g. if, for, switch etc) that contain a space between the last letter and opening bracket, but excepting function () {...} case. So, the matched parts in the example above will be: function foo () {...} foo (); if (foo ()) {...} bar (foo()); I tried to do: /[a-z] ( This matches all cases where the space preceds the opening bracket. What's the regular expression that matches these cases?
type: Question
answer count: 1
tagged with: javascript
score: 0
tagged with: regex
has answer: http://stackoverflow.com/a/25285669
accepted answer: http://stackoverflow.com/a/25285669
has title: Regex to match functions and function calls, but excluding JavaScript keywords

http://stackoverflow.com/q/25311974
accepted answer: http://stackoverflow.com/a/25313181
has comment: http://stackoverflow.com/comment/39455116
answer count: 1
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/39454596
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/39455882
has comment: http://stackoverflow.com/comment/39455528
has comment: http://stackoverflow.com/comment/39455074
has comment: http://stackoverflow.com/comment/39453987
has comment: http://stackoverflow.com/comment/39454662
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/39454487
has comment: http://stackoverflow.com/comment/39454765
has comment: http://stackoverflow.com/comment/39455176
has body: Masonry all of a sudden is just showing me 1 column Been messing with this one for a while, what can it be? float: left on the item doesn't fix the problem, leaves gaps obviously. $(function(){ var $container = $('#containermason'); $container.imagesLoaded(function(){ $container.masonry({ itemSelector: '.item', columnWidth: '260px' }); }); $container.infinitescroll({ navSelector : '.pagination', // selector for the paged navigation nextSelector : '.pagination a', // selector for the NEXT link (to page 2) itemSelector : '.item', // selector for all items you'll retrieve loading: { finishedMsg: ' that\'s all the content ', img: 'http://i.imgur.com/C1U8WRZ.gif' } }, // trigger Masonry as a callback function( newElements ) { // hide new items while they are loading var $newElems = $( newElements ).css({ opacity: 0 }); // ensure that images load before adding to masonry layout $newElems.imagesLoaded(function(){ // show elems now they're ready $newElems.animate({ opacity: 1 }); $container.masonry( 'appended', $newElems, true ); }); $("abbr.timeago").timeago(); }); }); the container is not positioned to absolute or anything, I can't understand why.I've been frustrated all night about this. the boxes are in the partial: <%= render :partial => "mypost", :locals => {mypost: mypost}, :collection => mypost %> and in the partial i have item: ...code.... and css for items: .item { background: #fff; margin: 10px; width: 241px; padding: 2px; border-radius: 10px; }
has comment: http://stackoverflow.com/comment/39454536
has answer: http://stackoverflow.com/a/25313181
has comment: http://stackoverflow.com/comment/39455013
has comment: http://stackoverflow.com/comment/39461882
has title: js masonry stuck in one column with infinite scroll
type: Question
has comment: http://stackoverflow.com/comment/39454287
tagged with: jquery-masonry
linked to: http://stackoverflow.com/q/25149318
tagged with: javascript
has comment: http://stackoverflow.com/comment/39454946

http://stackoverflow.com/q/25302104
has body: I'm using tooltips in Bootstrap v3.2.0. They all work as they should when the page first loads, but if I do anything on the page that involves running som js code, they stop working. At least that's my first impression of the problem. I initiate my tooltips like so: $('[data-toggle=tooltip]').tooltip(); And this is the code I use for a tooltip: As I said, the tooltip initially works, but when I do anything on the page that involves running some js, the tooltip stops working. Any ideas?
has title: Bootstrap tooltip stops working after any other event runs
accepted answer: http://stackoverflow.com/a/25358080
has comment: http://stackoverflow.com/comment/39485612
score: 2
tagged with: twitter-bootstrap-3
upvote count: 2
tagged with: twitter-bootstrap
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25358080
answer count: 1
tagged with: tooltip
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/25377701
has comment: http://stackoverflow.com/comment/39581118
downvote count: 0
has comment: http://stackoverflow.com/comment/39576549
has comment: http://stackoverflow.com/comment/39577547
has comment: http://stackoverflow.com/comment/39576856
type: Answer
has comment: http://stackoverflow.com/comment/39581613
has comment: http://stackoverflow.com/comment/39576795
has comment: http://stackoverflow.com/comment/39583516
has comment: http://stackoverflow.com/comment/39581152
has comment: http://stackoverflow.com/comment/39583194
has comment: http://stackoverflow.com/comment/39583794
upvote count: 1
has body: You can use .focus() or .click() event of Jquery: $("#dropdown1").focus(function(){......}); $('#dropdown1').click(function(){......}); Complete Example :- &lt;script&gt; $(document).ready(function () { $("#dropdown1").focus(function(){......}); }); &lt;/script&gt; &lt;script&gt; $(document).ready(function () { $('#dropdown1').click(function(){......}); }); &lt;/script&gt; As you are using Webforms(event based asp.net) not asp.net mvc then use above code the way given below :- &lt;script&gt; $(document).ready(function () { $("#&lt;%= dropdown1.ClientID %&gt;").focus(function(){......}); }); &lt;/script&gt; &lt;script&gt; $(document).ready(function () { $("#&lt;%= dropdown1.ClientID %&gt;").click(function(){......}); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/39576598
has comment: http://stackoverflow.com/comment/39583630
answers question: http://stackoverflow.com/q/25377640
has comment: http://stackoverflow.com/comment/39583981
score: 1

http://stackoverflow.com/a/25317852
type: Answer
answers question: http://stackoverflow.com/q/25317791
has body: The problem is that the click event was bound to all links that have the class "delete-link" on page load. When you create a new element through JS, it does not get automatically bound to that function because that link was not present on page load. You need to bind the link at the document level so that when the link is added, it will be automatically bound. Bind it this way instead: on(document, ".delete-link:click", function(){}) This is equivalent to jQuery's .live() function. Please note that you'll have to require dojo's on module (dojo/on)
score: 0

http://stackoverflow.com/q/25277215
has comment: http://stackoverflow.com/comment/39389263
has comment: http://stackoverflow.com/comment/39389139
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39390210
linked to: http://stackoverflow.com/q/25301412
score: 0
has title: javascript does no excute when using a href to pass information
answer count: 2
has answer: http://stackoverflow.com/a/25307188
tagged with: web
tagged with: jquery
has comment: http://stackoverflow.com/comment/39389766
has comment: http://stackoverflow.com/comment/39389189
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39393158
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25277274
accepted answer: http://stackoverflow.com/a/25277274
possible better answer: http://stackoverflow.com/a/25307188
has body: In the index.php I use href to send value to another php file; order and the orderinfo.php is like below. When I click the href in the main.php. it direct me to the orderinfo.php. but the function disableOption() will not excute till I refresh the website by myself. What's the problem here. I don't know why . but is I don't add the type=11.It works fine. order try to clear the cache.and also add still not work. I need to refresh the page manually, and the console will show the log info.. It's weird.should I put the whole web page here. because It's too big.. below is the whole webpage. index deal option 1 2 1 100 80 order 2 100 80 order 3 100 80 order 1 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse accumsan blandit fermentum. Pellentesque cursus mauris purus, auctor commodo mi ullamcorper nec. Donec semper mattis eros, nec condimentum ante sollicitudin quis. Etiam orci sem, porttitor ut tellus nec, blandit posuere urna. Proin a arcu non lacus pretium faucibus. Aliquam sed est porttitor, ullamcorper urna nec, vehicula lorem. Cras porttitor est lorem, non venenatis diam convallis congue. 2 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse accumsan blandit fermentum. Pellentesque cursus mauris purus, auctor commodo mi ullamcorper nec. Donec semper mattis eros, nec condimentum ante sollicitudin quis. Etiam orci sem, porttitor ut tellus nec, blandit posuere urna. Proin a arcu non lacus pretium faucibus. Aliquam sed est porttitor, ullamcorper urna nec, vehicula lorem. Cras porttitor est lorem, non venenatis diam convallis congue. 3 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse accumsan blandit fermentum. Pellentesque cursus mauris purus, auctor commodo mi ullamcorper nec. Donec semper mattis eros, nec condimentum ante sollicitudin quis. Etiam orci sem, porttitor ut tellus nec, blandit posuere urna. Proin a arcu non lacus pretium faucibus. Aliquam sed est porttitor, ullamcorper urna nec, vehicula lorem. Cras …

http://stackoverflow.com/q/25381748
type: Question
has answer: http://stackoverflow.com/a/25382645
has body: The current situation: I have two directives: A modal dialog from GitHub with for completeness the code of the modal plus an example in JSBin. A custom directive, branch finder, with the following directive code. angular.module('sfNgBranchFinder', ['sfNgFieldWrapper', 'sfNgLabelsService']) .directive('sfNgBranchFinder', function (sfNgLabelsService, sfNgBranchService) { return { restrict: 'A', required: '^modal-dialog', scope: { show: '=', submitted: '@', branchFinderTitle: '@' }, link: function (scope, element, attrs) { //Check the getLabel function in the branchfinder and scope.getLabel = function (key) { return sfNgLabelsService.getLabel(key); } scope.getErrorLabel = function (key) { var errorLabelKey = scope.errorLabelKey; if (!errorLabelKey) { errorLabelKey = 'EM_' + scope.labelKey; } return sfNgLabelsService.getLabel(errorLabelKey + "_" + key); } scope.searchBranch = function (branchFinderForm) { alert("searching!"); } return scope.hideModal = function () { scope.modalShown = false; return scope.show = false; } }, templateUrl: '/SFF/Content/UILib/3.0.0/directives/templates/sf-ng- branchfinder.tpl.html' }; }); In my html this looks like: &lt;modal-dialog show='modalShown' width='500px' class="sf-dialog"&gt; &lt;div sf-ng-branch-finder branch-finder-title="Find your branch" show='modalShown' &gt;&lt;/div&gt; &lt;/modal-dialog&gt; The custom directive has a template, nothing special in it, some basic html and that all works fine. I have only one problem. The problem An additional cancel button (so besides the X at the top right corner) doesn't trigger the show='modalShown' of the parent. So basically, my cancel button triggers the scope.hideModal function in the directive correctly and adjusts the scope.show as well, but the adjusted value doesn't get passed to the show of the parent or at least doesn't trigger the watch in the modal dialog logic: scope.$watch('show', function(newVal, oldVal) { if (newVal &amp;&amp; !oldVal) { document.getElementsByTagName("body")…
tagged with: javascript
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/25382645
favorite count: 0
tagged with: angularjs
has title: Pass value from child directive isolated scope to parent directive isolated scope and trigger watch of parent
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/comment/39416082
has text: I need to append the data in `$("header.mod_info_top")` but if I move `$(this).next().append(component);` inside `loadConsPerHour` nothing happens.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25291439

http://stackoverflow.com/a/45863263
answers question: http://stackoverflow.com/q/25384884
score: 0
type: Answer
has body: Extending @codehitman's answer, you can manage the plugin via bower with at least two approaches: Via CLI: bower install panelbutton=https://download.ckeditor.com/panelbutton/releases/panelbutton_4.7.2.zip --save The previous line will download the "panelbutton" addon and rename the downloaded addon to "panelbutton" (specified before the =) and the --save will write the command to bower.json (totally optional). Via bower.json: "dependencies": { "panelbutton": "https://download.ckeditor.com/panelbutton/releases/panelbutton_4.7.2.zip", "colorbutton": "https://download.ckeditor.com/colorbutton/releases/colorbutton_4.7.2.zip" } Just add the name you want to save the downloaded addon and the download url. EXTRA: since you might want to store the downloaded addons into a ckeditor path, you can accomplish creating .bowerrc and pasting the following: { "directory" : "my/path/to/ckeditor/addons" } WARNING: If there is only a js on the package, bower renames it to index.js. I solved it running a postinstall script like this (adapt to your needs). mv ./web/libraries/panelbutton/index.js ./web/libraries/panelbutton/plugin.js

http://stackoverflow.com/a/25234555
has comment: http://stackoverflow.com/comment/39321637
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25233667
has body: 'Uncaught ReferenceError: $ is not defined s-1-frame_tharrett.aspx:46' Looking through your page source I couldn't find a reference to jquery, are you sure you linked it properly? You have these two in the page you linked: However the server cannot find the linked file for me. JQuery defines '$', so I would reccomend ensuring it is linked correctly to run your JQuery script.

http://stackoverflow.com/a/25386604
has body: Why not use a list of links if you want them to go to another page? Apples Bananas Oranges Watermelon Kiwi
score: 0
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/25386534
has comment: http://stackoverflow.com/comment/39592145
type: Answer

http://stackoverflow.com/a/25329049
type: Answer
answers question: http://stackoverflow.com/q/25328854
has body: Your problem is that you're not calling the Part constructor when creating a BodyPart. If you change your BodyPart to look something like this: function BodyPart(y, diffFromCenter, y2) { this.x = canvas.width/2; Part.call(this, this.x, y, diffFromCenter, y2); } then it should work since you're calling Part with this set as your new BodyPart. Here's a jsfiddle showing it working correctly.
score: 0
accepted answer of: http://stackoverflow.com/q/25328854
type: AcceptedAnswer

http://stackoverflow.com/comment/39497057
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25334679
has text: Oh yeah, you can also add a pure javascript validation like dss suggested above. However, you should never fully trust a javascript validation since they easily can be manipulated by evil users. Always run a secondary validation on the server-side before actually inserting/updating data in your database. By using an AJAX call for the php validation instead of jQuerys built-in validation, you can reuse that same validation script for the server-side when you want to play around with the data (on the server side).

http://stackoverflow.com/comment/127032693
has text: perfect !! works
score: 0
type: Comment
comment on: http://stackoverflow.com/a/48549465
type: AnswerComment

http://stackoverflow.com/q/25267800
has answer: http://stackoverflow.com/a/25267950
has comment: http://stackoverflow.com/comment/39371843
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25268085
favorite count: 0
has comment: http://stackoverflow.com/comment/39371807
tagged with: ajax
has comment: http://stackoverflow.com/comment/39371968
has comment: http://stackoverflow.com/comment/39371997
has comment: http://stackoverflow.com/comment/39372094
tagged with: instagram
downvote count: 2
has title: My $.getJSON() script isn't working
upvote count: 1
has answer: http://stackoverflow.com/a/25268358
has answer: http://stackoverflow.com/a/25267952
has comment: http://stackoverflow.com/comment/39372158
has body: I'm just starting with this JSON / AJAX thing and I'm having a hard time figuring out why this is not working... I've searched in lots of places but no detailed description on how to use $.getJSON is provided. Can you please help me out? And Can you provide some info why my script wasn't working?! I suppose it's because of the i, item and data.response[i] but I can't find what they are needed for.. var url = "https://api.instagram.com/v1/users/3/media/recent/?access_token=18360510.5b9e1e6.de870cc4d5344ffeaae178542029e98b"; $.getJSON(url, function(data) { $.each(data.response, function (i, item) { instagram += ' '; instagram += ''; instagram += ' '; instagram += ' '; instagram += ' '; $('#instagram-cont').html(instagram); }); Update as suggested I've used console.log(data) and in the console it gave me a Object dropdown with inside data: Array[15] so I updated my code like this: var url = "https://api.instagram.com/v1/users/3/media/recent/?access_token=18360510.5b9e1e6.de870cc4d5344ffeaae178542029e98b"; $.getJSON(url, function(data) { $.each(data.data, function (i, item) { instagram += ' '; instagram += ''; instagram += ' '; instagram += ' '; instagram += ' '; $('#instagram-cont').html(instagram); }); and it worked!!! thanks everybody for the help
answer count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39371746
has answer: http://stackoverflow.com/a/25268365
tagged with: http://stackoverflow.com/tag/json
score: -1
has comment: http://stackoverflow.com/comment/39371707
type: Question
has comment: http://stackoverflow.com/comment/39371753
has comment: http://stackoverflow.com/comment/39372751

http://stackoverflow.com/q/25347775
upvote count: 2
answer count: 2
favorite count: 0
has title: Javascript regular expression pattern
tagged with: regex
has body: Can someone help me to figure what's wrong with my pattern? this is my text: sid='206' x='34.8395' y='32.1178'>×2&nbsp;(206) var regex = new RegExp("/x=\'[0-9]+\.[0-9]+\' y=\'[0-9]+\.[0-9]+\'/"); var match; do { match = regex.exec(text); if (match) { console.log(match[1], match[2], match[3], match[4]); } } while (match);
possible better answer: http://stackoverflow.com/a/25347791
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39519409
score: 1
has answer: http://stackoverflow.com/a/25347841
accepted answer: http://stackoverflow.com/a/25347841
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25347791

http://stackoverflow.com/comment/66207919
type: QuestionComment
comment on: http://stackoverflow.com/q/25283585
has text: Nice. I came here at the same point in my code/testing for my infinite scroll implementation. Is the keypress event the solution that you stuck with?
score: 0
type: Comment

http://stackoverflow.com/comment/39362372
comment on: http://stackoverflow.com/q/25259609
score: 0
has text: I don't have code for you so I'm not giving a full answer, but I know that http://openctm.sourceforge.net/ has been used successfully in WebGL to significantly shrink model sizes down. They went from 85MB .obj to 1.5MB .ctm
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25288268
type: AcceptedAnswer
upvote count: 3
type: Answer
has body: You just need to use your x-scale to set the x-coordinate of the rects based on the start date, and set the width to be the difference in the x-scaled values of the end and start dates. For example, if you want your rects to span the full height of your chart, you could do this: svg.selectAll('.time-span-rect') .data(data) .enter().append('rect') .attr('class', 'time-span-rect') .attr('x', function(d) { return x(d.start_dt); }) .attr('y', 0) .attr('width', function(d) { return x(d.end_dt) - x(d.start_dt); }) .attr('height', height); Then if you want them to be transparent, you can either set .attr('fill', 'transparent') or target the class in your css: .time-span-rect { fill: transparent; } HERE is an example you can look at using your time-span data and a random line graph. I've made the x-scale a d3.time.scale rather than a linear scale, since it makes working with the axes quite a bit simpler. You might want to consider doing the same. Also, I've made the rects' fill cyan just so they show up. Simply change the css fill to transparent. Hope that helps.
has comment: http://stackoverflow.com/comment/39411537
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39474777
accepted answer of: http://stackoverflow.com/q/25284570
has comment: http://stackoverflow.com/comment/39450222
answers question: http://stackoverflow.com/q/25284570
has comment: http://stackoverflow.com/comment/39541826

http://stackoverflow.com/comment/39488112
comment on: http://stackoverflow.com/q/25272020
has text: It's simply not possible to keep the native browser behaviour without the scrolling body. I've spent a lot of time looking at this in the exact same use case (transitioning pages in a single page app). I'd love to know what you end up doing!
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25372238
answers question: http://stackoverflow.com/q/25370751
score: 0
type: AcceptedAnswer
has body: Figured it out. The problem was that I wasn't passing my "response" to my success function, so: function alertHere(){ window.alert("Post Successful!") } should have been: function alertHere(response){ window.alert("Post Successful!") } It was probably posting correctly, but I wasn't getting a success because the response wasn't getting passed.
type: Answer
accepted answer of: http://stackoverflow.com/q/25370751

http://stackoverflow.com/comment/39539310
score: 0
type: QuestionComment
type: Comment
has text: Your *link to JS file* is completely useless at least for two reasons - the main is that the JS code is minified therefore completely unreadable and instead of pointing to a file on your server you should be pointing to the plugin's homepage while mentioning the version you are using. Also I doubt anybody here would search and debug the plugin's code. It would also help (everybody, but you the most!) if you try to search before, since putting the error `Uncaught ReferenceError: jQuery is not defined` into google would give you thousands of results similar to your problem with **solutions**.
comment on: http://stackoverflow.com/q/25352866

http://stackoverflow.com/comment/39565374
has text: What's wrong with my answer? I've provided a working example.
comment on: http://stackoverflow.com/a/25371882
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39382519
comment on: http://stackoverflow.com/a/25273421
score: 0
type: AnswerComment
type: Comment
has text: You are right! This is useful. Event handlers look like a good choice. With these line of code is actually does what I want - window.addEventListener("load",Main,false); -

http://stackoverflow.com/q/25373360
answer count: 1
tagged with: javascript
tagged with: tabular
has comment: http://stackoverflow.com/comment/39568259
score: 0
has comment: http://stackoverflow.com/comment/39567313
tagged with: printing
has comment: http://stackoverflow.com/comment/39567448
has comment: http://stackoverflow.com/comment/39567287
has comment: http://stackoverflow.com/comment/39567502
has title: Printing long tables with pretty page breaking behavior? possible?
type: UnansweredQuestion
has body: Can you use Javascript to do the following pseudocode? (in a browser) explanation of below code: similar to word processor behavior, it will take a long table that overflows a page break and split the cells so that there is no graphical breakage, and repeat the header row on the next page if the table has a header row (or multiple header rows). Example of problem: if printing page to pdf { if table is overflowing a page break { if table has header row { split table so that rows print without breaking and repeat header row on next page } else if table does not have header row { split table so that rows print without breaking } } }
linked to: http://stackoverflow.com/q/274149
type: Question
has answer: http://stackoverflow.com/a/25373401

http://stackoverflow.com/q/25330008
has body: Hello nice people of SO, I'm pretty new to javascript, JSON and D3.js and I'm trying to build a multi-line time series chart. My data comes as JSON from my server like this: { "t": ["2014-08-16T16:15:00", "2014-08-16T16:20:00", "2014-08-16T16:25:00", ...], "todd": [0,0,1,2,3,2,1,0,0, ...], "pete": [3,2,1,0,4,4,0,0,0, ...] } This I store in an array called 'dataset'. The datetimes are subsequently parsed. 't', 'todd' and 'pete' arrays are of equal length. Ultimately I want the time (t) values to be used for the x-axis, the other two as y values over time. Parsing the data works, however I can't get it to display properly. What works so far is: A: display my values one after the other without a reference to time, so I get two nice, colored lines but the x-axis holds no information, as it just displays 0 to N. OR B: have the x-axis show as a timeline based on the "t"-values (this tells me that the parsing works as it should). However, I can't get my two lines to show. In Variant A I was simply returning the index as x value like so: var line = d3.svg. .x(function(d,i) { return i; }) ... Now I'm trying to return the datetime from my "t"-array: var line = d3.svg. .x(function(d,i) { return dataset.t[i]; }) ... However, nothing is displayed. I get no errors at all in the console. I tried console logging the value of 'dataset.t[i]' but nothing shows. It's as if the code isn't even running so here is the for loop that calls the above code: for (var key in dataset) { if (dataset.hasOwnProperty(key) &amp;&amp; key!="t") { data=dataset[key]; svg.append("svg:path").attr("d", line(data)) .style("stroke", color(key)) .style("stroke-width", 2); //BELOW IS IRRELEVANT TO MY QUESTION, JUST FOR COMPLETENESS... svg.append("rect") .attr("x", w - 65) .attr("y", n*25) .attr("width", 10) .attr("height", 10) .style("fill", color(key)); svg.append("text") .attr("x", w - 50) .attr("y", n * 25 + 10) .attr("height",30) .attr("width",100) .style("fill", color(key)) .text(key); n+=1; // counter up…
type: AnsweredQuestion
type: Question
has title: Lines not showing in d3.js multi-line-chart with time axis
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39554745
score: 0
has answer: http://stackoverflow.com/a/25422716
has comment: http://stackoverflow.com/comment/39554841
has comment: http://stackoverflow.com/comment/39531920
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/25422716

http://stackoverflow.com/q/25290554
has title: radio button not showing the state checked in backbone code
tagged with: http://stackoverflow.com/tag/html
tagged with: marionette
type: AnsweredQuestion
has body: I am trying to maintain the checked state in the browser for the radio button... but i dont see the checked state in the browser... i am using backbone marionette code.. is it a bug when i use it in my backbone view js.. since when i use it as normal html i dont see that bug in fiidle.. providing my code below... templates Use new Soccer Use existing Soccer Lorem ipsum dolor sit amet **views** ui: { arrow: '.sports-carrousel__form-border-arrow', soccerOptions: 'input[name=soccer]' }, events: { 'click .sports-carrousel__form-close': 'closeForm', 'change @ui.soccerOptions': 'togglesoccerOptions' }, toggleSoccerOptions: function(e) { var inputName = $(e.currentTarget).prop('name'); debugger; switch(inputName) { case 'new-Soccer': this.isNewSoccer = true; this.isExistingSoccer = this.isNoSoccer = false; break; case 'existing-Soccer': this.isExistingSoccer = true; this.isNewSoccer = this.isNoSoccer = false; break; case 'no-Soccer': this.isNoSoccer = true; this.isExistingSoccer = this.isNewSoccer = false; break; } this.render(); },
type: Question
has answer: http://stackoverflow.com/a/25297357
has comment: http://stackoverflow.com/comment/39419411
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39416995
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25297357
tagged with: backbone.js

http://stackoverflow.com/q/25377600
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25396305
tagged with: ruby-on-rails
type: Question
has comment: http://stackoverflow.com/comment/39575434
linked to: http://stackoverflow.com/q/2412947
upvote count: 2
has comment: http://stackoverflow.com/comment/39575376
has comment: http://stackoverflow.com/comment/39576141
has answer: http://stackoverflow.com/a/25379631
answer count: 3
tagged with: google-maps
has comment: http://stackoverflow.com/comment/39575500
has comment: http://stackoverflow.com/comment/39575811
tagged with: javascript
has answer: http://stackoverflow.com/a/25378148
has title: Ruby on Rails how to pass data from controller to javascript in html
favorite count: 0
has comment: http://stackoverflow.com/comment/39575136
has comment: http://stackoverflow.com/comment/39575373
has body: I'm doing google maps on ruby on rails. I'm trying to implement dynamic marker text on the map. I find a way to add marker text in java script. How can I pass my controller data( string data retrieved from database) to java?I've searched other posts but cant understand their answer. The javascript in html is &lt;script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3&amp;amp;sensor=false"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="../src/markerwithlabel.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function initMap() { var latLng = new google.maps.LatLng(49.47805, -123.84716); var homeLatLng = new google.maps.LatLng(49.47805, -123.84716); var map = new google.maps.Map(document.getElementById('map_canvas'), { zoom: 12, center: latLng, mapTypeId: google.maps.MapTypeId.ROADMAP }); var marker1 = new MarkerWithLabel({ position: homeLatLng, draggable: true, raiseOnDrag: true, map: map, labelContent: *"text"*, labelAnchor: new google.maps.Point(22, 0), labelClass: "labels", // the CSS class for the label labelStyle: {opacity: 0.75} }); &lt;/script&gt; I want to replace this "text" to a variable called text,which copies @somestring from my controller,say gmaps_controller.rb I have tried add text: "&lt;%= @somestring %>" I put it just under var homelatlng,but no working. I also have tried $(document).ready(function(){ var text='&lt;%=j @somestring%&gt;' }) I put this in a individual javascript tag after &lt;script type="text/javascript" src="../src/markerwithlabel.js"&gt;&lt;/script&gt; also not working. Is there any otherway to pass data to controller?please tell me in detail Im quite a newbie. thanks in advance
has comment: http://stackoverflow.com/comment/39575523
score: 2
tagged with: ruby
has comment: http://stackoverflow.com/comment/39575942
linked to: http://stackoverflow.com/q/24832979

http://stackoverflow.com/comment/39528884
score: 1
has text: We need to see notifications_counter.php
comment on: http://stackoverflow.com/q/25353134
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25281753
has comment: http://stackoverflow.com/comment/39398167
accepted answer: http://stackoverflow.com/a/25282503
has comment: http://stackoverflow.com/comment/39397684
has comment: http://stackoverflow.com/comment/39397863
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39397999
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25282361
has body: I wanted to know if it was possible with JavaScript to validate a postcode AND format a postcode in the right format (if wrong format). So instead of asking the user to re-type the postcode in correct format, it does it automatically, if its validated correctly. The format I need is for UK postcodes (no space) e.g.: CB30AX cb30AX SG120JS sg120js So if the user types in a postcode like below, it gets converted: CB3 0ax --&gt; CB30AX cB3 0AX --&gt; CB30AX SG12 0JS --&gt; SG120JS sg12 0js --&gt; SG120JS Can this be done? I have almost 0 knowledge of JS but I did have a look for a solution and could not find one which did what I needed it to do above. I have also provided a FIDDLE
tagged with: javascript
has answer: http://stackoverflow.com/a/25282503
possible better answer: http://stackoverflow.com/a/25282361
has comment: http://stackoverflow.com/comment/39397388
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39397531
has title: Validate and Format a postcode dynamically
favorite count: 0

http://stackoverflow.com/comment/39319288
type: QuestionComment
has text: Well, for me it works properly: http://jsfiddle.net/sbochan/b5eLgno8/ ensure if s variable is correct.
type: Comment
comment on: http://stackoverflow.com/q/25238475
score: 0

http://stackoverflow.com/a/25244888
has body: Using the data attributes for mentioning the action and check it on click. HTML: OK Cancel JS: $(function(){ $('a.btn').click(function(e){ e.preventDefault(); var action = $(this).data("action"); switch(action) { case "ok": alert('Okay action'); break; case "cancel": alert('Cancel action'); break; } }); });
has comment: http://stackoverflow.com/comment/39335194
accepted answer of: http://stackoverflow.com/q/25244781
has comment: http://stackoverflow.com/comment/39331769
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25244781
has comment: http://stackoverflow.com/comment/39331320
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39331887
has comment: http://stackoverflow.com/comment/39331173

http://stackoverflow.com/a/25244162
accepted answer of: http://stackoverflow.com/q/25243924
answers question: http://stackoverflow.com/q/25243924
has comment: http://stackoverflow.com/comment/39328012
type: AcceptedAnswer
downvote count: 0
has body: I believe this will get everything you'll need for your database (value selected, cell and row it was selected in)... something like: JSFiddle $("td select").on("change", function() { var value = this.value; var $cell = $(this).parent(); var $row = $cell.parent(); alert("Selected ["+value+"] in cell ["+$cell.index()+"] of row ["+$row.index()+"]"); });
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/40233237
comment on: http://stackoverflow.com/q/25265667
has text: From the error within jquery, follow the stack trace until it reaches your code. If it never reaches your code, what does it go to that isn't jquery core?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25321428
has body: In iOS7, when you scroll down (swipe up) the menu bar on the bottom hides, when you scroll back up, it appears again. Is there any event send out when this happens? I have an overlay that fills the entire screen vertically, but when a user scrolls on the page, this overlay doesn't fill anymore due to the menu bar hiding. I don't want to listen to a scroll event constantly, although for now that seems like the only option.
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39471916
tagged with: css
tagged with: safari
answer count: 0
upvote count: 2
type: Question
tagged with: javascript
has title: iOS7 safari, event when menu bar hides
has comment: http://stackoverflow.com/comment/39472309
score: 2
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/25345184
has body: For some reason, I keep getting the following error: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:". scripts.js:37. I have no clue what the issue is. I am trying to display time into the html page using window.setinterval and document.getElementById. Here are my files: Manifest.json { "manifest_version": 2, "name": "The REAL Motivation", "description": "This extension extension makes sure you are always motivated", "version": "1.0", "chrome_url_overrides": { "newtab": "home.html" }, "background": { "scripts": ["scripts.js"] }, "permissions": [ "tabs" ], "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'" } Home.html I am a chrome extension Please Enter Your Birthday Timer.html Scripts.js function getAge() { var age = document.getElementById("hi").value; if(age.getTime()>0) { localStorage.setItem("userage", age); } console.log('hi') } function showTime() { var personTime = new Date(localStorage.getItem("userage")); // console.log(personTime); var deathMonth = personTime.getMonth(); var deathDay = personTime.getDay(); var milliTime = personTime.getTime(); // console.log("Milliseconds on birthday:" + milliTime); var bornYear = personTime.getFullYear(); var deathYear = bornYear + 78; var deathDate = new Date(deathYear,deathMonth,deathDay); var deathDateMilli = deathDate.getTime(); // console.log("Milliseconds Death: " + deathDateMilli); var today = new Date(); var currentTime = today.getTime(); var timeLeft = (deathDateMilli - today.getTime()); console.log("Time Left: " + timeLeft); // console.log("Death Date: " + deathDate); // console.log("Death Year: " + deathYear); // console.log("Death Month:" + deathMonth) // console.log("Current time: " + currentTime) window.setInterval(displayTime(timeLeft), 1000); } function displayTime(time) { var timer = document.getElementById("whatever"); timer.in…
has title: window.setinterval isn't working with my chrome extension
type: Question
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/25345205
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
upvote count: 2
accepted answer: http://stackoverflow.com/a/25345205
tagged with: google-chrome
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/39411649
comment on: http://stackoverflow.com/q/25286864
type: Comment
type: QuestionComment
has text: @Bergi I can't change the position of that element using just the CSS (design doesn't let me do this), so the only option is moving the menu or duplicate the menu.
score: 0

http://stackoverflow.com/comment/39412655
type: AnswerComment
type: Comment
has text: Your example shows a hardcoded value of `600px` in the media query. If the value is in fact dynamically generated somehow, or wrong, you need to state that. That is a problem with the question. Consider actually trying the solution, though. You do it no justice by entertaining hypotheticals; the browser's CSS interpreter is superior, I assure you.
comment on: http://stackoverflow.com/a/25289177
score: 0

http://stackoverflow.com/comment/39446186
has text: @palx End result might be the same but I don't see how using a much simpler approach isn't valid
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25307816

http://stackoverflow.com/comment/39511537
comment on: http://stackoverflow.com/a/25335551
score: 0
type: AnswerComment
type: Comment
has text: Great to hear. Thanks for all your help Ken.

http://stackoverflow.com/q/25285143
has title: why the background image is not set using angular?
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25285238
has answer: http://stackoverflow.com/a/25285226
score: 0
has body: Hi can you please tell me why my background image not set .?I need to set same image in all views ?And Can you please tell me how to show different images in different views how I can achieve this ? plunker http://plnkr.co/edit/KfY9Xo2br3AD6UOzoZlE?p=info
answer count: 3
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25285238
tagged with: angularjs
has answer: http://stackoverflow.com/a/25285248
accepted answer: http://stackoverflow.com/a/25285248

http://stackoverflow.com/comment/39569066
type: Comment
type: QuestionComment
has text: thanks again, let me give that a try.
comment on: http://stackoverflow.com/q/25374189
score: 0

http://stackoverflow.com/comment/39459562
comment on: http://stackoverflow.com/a/25290893
score: 0
type: AnswerComment
type: Comment
has text: Thanks again. Hmm, ok, I will check into that. Actually your code here is almost identical to my js code before I made the changes. And while this code generates the right Handlebar data into the right place in the HTML, it is the thing of putting the variable data into another function that makes the players show up weird. Can you see any other way of declaring tracks[0].title to a variable that can be read at the right moment in variable data?

http://stackoverflow.com/comment/39369240
has text: We really need to see the php... Are you sure you used session_start() on the page you think your session is getting lost?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25266426
score: 0

http://stackoverflow.com/a/25252677
answers question: http://stackoverflow.com/q/25252479
upvote count: 0
type: Answer
has body: You need to parse the string into a javascript object, use JSON.parse(data) function myFunction() { $.ajax({ type : 'GET', url : 'http://api.glassdoor.com/api/api.htm?t.p=19754&amp;t.k=IFuttOxoRG&amp;userip=127.0.0.1&amp;useragent=&amp;format=json&amp;v=1.1&amp;action=jobs&amp;q=&amp;l=San+Francisco&amp;pn=1&amp;ps=50', crossDomain : true, contentType: "application/json", success : function(data){ // turn the string response into a javascript object! data = JSON.parse(data) for( var i=0; i&lt;5; i++) { document.getElementById("demo").innerHTML = data[i].occupation; } }, error : function(XMLHttpRequest,textStatus, errorThrown) { alert("error"); } }); alert("here"); }
downvote count: 1
has comment: http://stackoverflow.com/comment/39344343
score: -1

http://stackoverflow.com/q/25258740
has title: How to pass a value inside javascript to managed bean property without using hidden tags in JSF?
tagged with: primefaces
type: Question
has answer: http://stackoverflow.com/a/25263448
accepted answer: http://stackoverflow.com/a/25263448
downvote count: 0
has comment: http://stackoverflow.com/comment/39362872
tagged with: javascript
upvote count: 2
tagged with: portlet
answer count: 1
favorite count: 0
has body: we wonder that if it is possible to get managed bean property value inside the javascript method in facelets or pass a javascript value to managed bean property but without using hidden tags? When we search about them what we see are all about the examples or solutions that use html hidden tags or hidden button's click events. But this method is not useful for us when we need much data exchange between managedbean and javascript as it needs lots of hidden tags.
type: AnsweredQuestion
score: 2
tagged with: jsf

http://stackoverflow.com/q/25298984
has comment: http://stackoverflow.com/comment/39429971
tagged with: javascript
has comment: http://stackoverflow.com/comment/39430272
accepted answer: http://stackoverflow.com/a/25299181
has comment: http://stackoverflow.com/comment/39429985
answer count: 2
has answer: http://stackoverflow.com/a/25299100
has comment: http://stackoverflow.com/comment/39430302
has answer: http://stackoverflow.com/a/25299181
favorite count: 0
has title: variable within a object not updating in javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/39429969
has body: I have an object which is initialized like var x = function(){ var result = 5, clear = function(){ result = 0; }; return { result: result, clear: clear } } I am later creating a new instance of x using var y = new x(); but when i try setting the value y.result = 5; and want to clear the result value to 0 I call y.clear(); However it is not resetting the y.result to 0... Not sure why? Anything that i am doing wrong?
has comment: http://stackoverflow.com/comment/39430226
has comment: http://stackoverflow.com/comment/39429924
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39430403
has comment: http://stackoverflow.com/comment/39430444
score: 1
possible better answer: http://stackoverflow.com/a/25299100
downvote count: 1
has comment: http://stackoverflow.com/comment/39429956
type: Question
has comment: http://stackoverflow.com/comment/39429949

http://stackoverflow.com/a/25358449
type: Answer
score: 0
has body: Well, you simply create a function in Javascript that does exactly the same : function makeTableFrom(str) { var k = 1, result = ""; for (var i = 1; i <= 8; i++) { result += ' '; for (var j = 1; j <= 20; j++) { if (str[k] === '#') { result += ' # '; } else if (str[k] === '&') { result += ' & '; } else { result += ' '; } k++; } result += ' '; } return result; } and call it from the success function of your post request : $http.post("lib/action.php", {monsters: $scope.getMonsters}).success(function(data) { map = data; console.log(map); // say result is declared outside result = makeTableFrom(data); // now use it as intended }); However, let me be clear about the fact that, in your php function or in this one, your calls to $string[$k] or str[k] should be with k-1 because of the offset in string indexing... Here is a link to a JSFiddle that illustrates the difference : http://jsfiddle.net/jpreynat/hmutk1y5/ UPDATE: To use the resulting string as inner HTML for your table, you should use ng-bind-html in combination with the ngSanitize module, like so : Then don't forget to add angular-sanitize.js to your resources and to add it to your app : angular.module('gameApp', ['ngSanitize']) And edit your $http.post().success() function : $http.post("lib/action.php", {monsters: $scope.getMonsters}).success(function(data) { map = data; console.log(map); $scope.gameTable = makeTableFrom(data); // Where you update the table depending on your ajax call }); Link to the updated JSFiddle : http://jsfiddle.net/jpreynat/hmutk1y5/1/
accepted answer of: http://stackoverflow.com/q/25357990
answers question: http://stackoverflow.com/q/25357990
has comment: http://stackoverflow.com/comment/39539368
has comment: http://stackoverflow.com/comment/39541209
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39540894

download
tags question: http://stackoverflow.com/q/25314981
type: Tag
tags question: http://stackoverflow.com/q/25321852
tag name: download
tags question: http://stackoverflow.com/q/25334196

http://stackoverflow.com/comment/39370633
score: 0
type: AnswerComment
type: Comment
has text: that did help as well.but now i am getting a different error. Uncaught Error: Row given with size different than 2 (the number of columns in the table).Uncaught Error: Row given with size different than 2 (the number of columns in the table). format+en,default+en,ui+en,orgchart+en,corechart+en.I.js:184 T.sY format+en,default+en,ui+en,orgchart+en,corechart+en.I.js:184 T.Cz format+en,default+en,ui+en,orgchart+en,corechart+en.I.js:185 drawChart
comment on: http://stackoverflow.com/a/25266881

http://stackoverflow.com/comment/39386080
type: AnswerComment
score: 0
type: Comment
has text: Thank you very much, @RollYourOwnEd. Now I know that my code works. It's just a problem with the site. Awesome improvement you did there, I really appreciate it. :)
comment on: http://stackoverflow.com/a/25275279

http://stackoverflow.com/comment/39368698
score: 0
comment on: http://stackoverflow.com/a/25266144
type: Comment
has text: @user3605309: I've just added a suggestion.
type: AnswerComment

http://stackoverflow.com/q/25298813
answer count: 1
tagged with: build
has answer: http://stackoverflow.com/a/25298844
score: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has body: Is there a way to obtain or compile a stripped down version of jQuery, that just contains the $.ajax function, and anything that it depends on? NOTE: Background: Wish to create a script which includes just this function in-lined within my own (with proper attributions of course) Including the entire jQuery would be overkill for my requirements A great example of what I am looking for is Modernizr: http://modernizr.com/download/ The download page allows you to select which parts you want, and it will work out the dependencies, and give your a partial build, containing just what you have asked for.
favorite count: 0
tagged with: ajax
type: Question
has title: A partial build of jQuery just for $.ajax (XMLHttpRequest) functionality?
upvote count: 2

http://stackoverflow.com/comment/39440486
type: Comment
comment on: http://stackoverflow.com/a/25303970
type: AnswerComment
has text: getElementsByName not getElementByName
score: 0

http://stackoverflow.com/comment/39489555
comment on: http://stackoverflow.com/q/25330514
has text: This does not seem to work for me.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39380330
type: Comment
type: QuestionComment
has text: Possible duplicate of http://stackoverflow.com/questions/9293423/can-one-controller-call-another-in-angularjs
score: 0
comment on: http://stackoverflow.com/q/25272236

http://stackoverflow.com/comment/39303753
comment on: http://stackoverflow.com/a/25230656
has text: I would think that this should work, but for some reason it doesn't. The callback is still the same as before. Also, I have to mention that this is server side code.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25268397
has comment: http://stackoverflow.com/comment/39372911
has comment: http://stackoverflow.com/comment/39373007
answers question: http://stackoverflow.com/q/25268118
has body: Using JQuery will make your life much easier: $('.keys span').click(function() { alert(this.innerHTML); });
upvote count: 0
score: -1
downvote count: 1
has comment: http://stackoverflow.com/comment/39372960
type: Answer

http://stackoverflow.com/comment/39305387
has text: Because callback functions in jquery are asynch, which means you have to wait until parent's closure ends. So, you will be able to use `response2` after while loop is over. You can set callback funcs as sync, but you need to use $.ajax() and use `async: false`
comment on: http://stackoverflow.com/q/25231954
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25309844
has answer: http://stackoverflow.com/a/25309910
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25309910
has comment: http://stackoverflow.com/comment/39449632
possible better answer: http://stackoverflow.com/a/25310016
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25310016
type: Question
has answer: http://stackoverflow.com/a/25310071
has body: I have a section of a form that can be duplicated indefinitely, and I'm attempting to create a validation condition for it (using the ajaxForm plugin, although this aspect is relatively incidental). The condition looks a bit like this: if(formData[i].name == 'create-flight[fields][0][scheduled-departure-time]' &amp;&amp; formData[i].value == ''){ // Do stuff } Note the 0 in create-flight[fields][0][scheduled-departure-time]. This could be a 0, a 1, or even a 37. Importantly I don't need to know, as the function handles everything dynamically and this condition triggers within a foreach, so every field will be checked. Is there a way to add a wildcard here? i.e. create-flight[fields]['+any_integer+'][scheduled-departure-time] ? Often this would be catered for with an or operator, but it could be any number, so that's not practical.
tagged with: javascript
score: 0
answer count: 3
has title: Wildcard integer in javascript condition

http://stackoverflow.com/a/25267245
has body: Take a look at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Timers. You can set a relative timeout by first determining what time it is, and using the offset to sunrise/sunset.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25267173
answers question: http://stackoverflow.com/q/25267173
type: Answer
has comment: http://stackoverflow.com/comment/39370760
has comment: http://stackoverflow.com/comment/39371375
upvote count: 1
score: 1

http://stackoverflow.com/comment/67345702
type: QuestionComment
comment on: http://stackoverflow.com/q/25322613
score: 0
has text: Yes the trim function is important here, first trim then compare string.
type: Comment

http://stackoverflow.com/comment/39368214
score: 0
comment on: http://stackoverflow.com/q/25247030
type: Comment
type: QuestionComment
has text: @avgvstvs ah. Well, be confident that your work friend is incorrect :)

http://stackoverflow.com/q/25350983
tagged with: javascript
tagged with: jquery
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25351098
tagged with: twitter-bootstrap
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/2204250
has title: Check if checkbox checked property is not empty using jQuery
has body: How can I check checkboxes checked property? If any of them is not checked, display this sentence in span: "you shoud select one of them". My validation don't work. &lt;label&gt; &lt;input type="checkbox" name="chk[]" id="chk[]" /&gt;male &lt;/label&gt; &lt;label&gt; &lt;input type="checkbox" name="chk[]" id="chk[]" /&gt;female &lt;/label&gt; &lt;script&gt; if ($('input[name="chk[]"]:checked').length &lt; 0) { $("#textspan").html('you shoud select one of them'); } &lt;/script&gt;
upvote count: 1
has comment: http://stackoverflow.com/comment/39525165
score: 1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25351120
has comment: http://stackoverflow.com/comment/39525158
has comment: http://stackoverflow.com/comment/39525075

http://stackoverflow.com/comment/39387379
type: Comment
comment on: http://stackoverflow.com/q/25274410
score: 0
has text: @dandavis, I took your advice and updated the answer incase others land here. You are right =)
type: QuestionComment

http://stackoverflow.com/a/25262704
has comment: http://stackoverflow.com/comment/39365576
accepted answer of: http://stackoverflow.com/q/25262653
type: Answer
answers question: http://stackoverflow.com/q/25262653
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39366218
has comment: http://stackoverflow.com/comment/39362509
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39362760
upvote count: 1
has body: This: "fn": initCredits(id, inputVal, chkSelected), … calls the function and assigns the return value. To assign the function, just do: "fn": initCredits,

http://stackoverflow.com/a/25326973
has comment: http://stackoverflow.com/comment/39518578
has comment: http://stackoverflow.com/comment/39483957
has comment: http://stackoverflow.com/comment/39483628
has comment: http://stackoverflow.com/comment/39495674
has body: Since this is not an option, ini_set("memory_limit","32M") perhaps you can add LIMIT to the function paramaters and query: private function getDB($date1, $date2, $start, $pageSize){ $query = 'SELECT * FROM `db1`.`'.$table.'` WHERE `date` BETWEEN "'.$date1.'" AND "'.$date2.'" order by `date` LIMIT $start, $pageSize;'; // date = datetime ! $result = $this-&gt;db-&gt;query($query); $array = array(); while ( $row = $result-&gt;fetch_assoc () ) { $array[] = array( strtotime($row[ 'date' ])*1000 , (float)$row[ 'var' ] ); // the formatting needs to be done, so the chart accepts it.. } $result-&gt;close(); return json_encode($array); } Then setup a for loop in javascript, call this with Ajax, incrementing the $start variable each time. Store each responseText.substr(1).substr(-1) in an array. When the responseText is "", all of the records have been returned. .join the array with a comma, then add a new opening and closing "{ }", and you should have a JSON equivalent to all records. Minimal parsing, and you'll be using built-in functions for most of it. var startRec=0; var pageSize=50; var xmlhttp=new XMLHttpRequest(); var aryJSON=[]; var JSON; xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200){ if(xmlhttp.responseText==""){ //Might need to check for "{}" here instead of "" //All records are received JSON="{" + aryJSON.join(",") + "}"; aryJSON=[]; startRec=0 }else{ aryJSON.push(xmlhttp.responseText.substr(1).substr(-1)); startRec+=pageSize; getNextPage(); } } } function getNextPage(){ xmlhttp.open("GET","your.php?start=" + startRec + "&amp;pageSize=" + pageSize,true); xmlhttp.send(); }
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39483419
answers question: http://stackoverflow.com/q/25326827
has comment: http://stackoverflow.com/comment/39483033
score: 0
accepted answer of: http://stackoverflow.com/q/25326827
type: Answer
has comment: http://stackoverflow.com/comment/39481941

http://stackoverflow.com/comment/44707451
type: Comment
has text: http://stackoverflow.com/a/28168767/1595429
comment on: http://stackoverflow.com/q/25331069
score: 0
type: QuestionComment

http://stackoverflow.com/q/25346699
tagged with: hammer.js
answer count: 1
has comment: http://stackoverflow.com/comment/39518062
favorite count: 0
type: UnansweredQuestion
has title: Hammerjs 2.0.2 swipe detection not working
downvote count: 1
type: Question
upvote count: 0
has answer: http://stackoverflow.com/a/25347072
tagged with: javascript
score: -1
has body: I just started using hammerjs for my recent project and with the latest version This is how do i am detecting the swipeLeft event: var block = document.getElementById('om_hammer'); var hammertime = new Hammer( block ); hammertime.get('swipe').set({ direction: Hammer.DIRECTION_ALL }); hammertime.on('swipeleft', function(e){ console.log('in'); }); But nothing happens. I tried checking if the object is initialized correctly with console.log(hammertime); and it displays the applied event and element. I am debugging it in chrome (Emulator) but there are no error messages. Any help is appreciated.

http://stackoverflow.com/a/25323973
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/25323162
score: 3
has body: Edit As of ECMAScript 2015 (ed. 6), calling Map as a function (i.e. without new) should throw an error: Map is not intended to be called as a function and will throw an exception when called in that manner. ECMA-262 ed 6 §23.1.1 Original answer for posterity. Given that: if (typeof Map != 'undefined') { var x = Map(); var y = new Map(); // x and y have same Prototype console.log(Object.getPrototypeOf(x) === Object.getPrototypeOf(y)); // true // x and y have same constructor console.log(x.constructor === y.constructor); // true // x Prototype is Map.prototype console.log(Object.getPrototypeOf(x) === Map.prototype); // true // x.constructor is Map console.log(x.constructor === Map); // true } returns true in browsers that support Map, it would seem both return an instance of Map, though the specification could have put that beyond doubt with much simpler language. It seems the difference is evident when arguments are supplied: when called as a function, the argument should be an iterable object, whereas if called as a constructor, multiple arguments can be provided and the internal Construct method is called. Edit Given that ES6 is still in draft (and may be for some time) this behaviour may change. At the 25 July 2013 TC39 meeting it was discussed that allowing constructors to be behave like constructors even when called without new (Anti–pattern to call a constructor without new)was not a good idea, so it may well be modified in future.
downvote count: 0

http://stackoverflow.com/a/25278238
answers question: http://stackoverflow.com/q/25278200
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: You need to encapsulate the expression in (), a &amp;&amp; a.foo &amp;&amp; (b.foo = a.foo) Otherwise it will evaluate the comparison operations first before the assignment operations so it will evaluate as (order of precedence) (a &amp;&amp; a.foo &amp;&amp; b.foo) = a.foo; //or basically true = a.foo //or false/undefined or whatever depending on what a,a.foo equal If you take a look at the order of precedence at MDN you will see that the assignment operator is 17th (third from last) in the order, so it gets evaluated nearly after all other operations.

http://stackoverflow.com/a/25280741
type: Answer
has comment: http://stackoverflow.com/comment/39398366
answers question: http://stackoverflow.com/q/25280556
has comment: http://stackoverflow.com/comment/39400129
has comment: http://stackoverflow.com/comment/39397827
has comment: http://stackoverflow.com/comment/39396418
has body: Try changing this: $('#laba').click(function () { $('#transparencyR').show(); $('#registerlayer').show(); }); to this: $('#laba').click(function () { $('#transparencyR').show(); $('#registerlayer').show(); }); &lt;?php if( (isset( $_POST['register'] ) ) ) { ?&gt; jQuery('#laba').trigger('click'); &lt;?php } ?&gt;
has comment: http://stackoverflow.com/comment/39396639
has comment: http://stackoverflow.com/comment/39397648
has comment: http://stackoverflow.com/comment/39395859
has comment: http://stackoverflow.com/comment/39399134
has comment: http://stackoverflow.com/comment/39396925
score: 0
has comment: http://stackoverflow.com/comment/39395624
has comment: http://stackoverflow.com/comment/39398604
has comment: http://stackoverflow.com/comment/39395990

http://stackoverflow.com/q/25238433
has answer: http://stackoverflow.com/a/28326544
tagged with: web-forms-for-marketers
tagged with: sitecore
has answer: http://stackoverflow.com/a/27099986
downvote count: 0
type: UnansweredQuestion
has title: $scwhead is not defined in Sitecore Web Forms for Marketers
has comment: http://stackoverflow.com/comment/39321420
has body: On the contact page I have created and placed WFFM form. The code which is generated for the form looks like this: $scwhead.ready(function() {$scw('#form_0747B7A0DDB27BDEB97C7E23A').webform({... However, the following error appears in JavaScript console. Uncaught ReferenceError: $scwhead is not defined I have searched for references in my solution folder but haven't found any. What could be causing the problem and where this piece of code is being generated?
score: 1
tagged with: webforms
type: Question
answer count: 2
upvote count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/25267266
score: 1
type: AcceptedAnswer
downvote count: 0
has body: in your directive link function you should do like this module.directive("smartBanner",function(){ return { restrict: "E", template: '&lt;meta name="apple-itunes-app" content=""&gt;&lt;/meta&gt;', replace: true, link: function(scope) { var metaTag=document.createElement('meta'); metaTag.name = "apple-itunes-app"; metaTag.content = ""; document.getElementsByTagName('head')[0].appendChild(metaTag); } } }); but also you can do this without directive, but nevertheless directive also good idea
accepted answer of: http://stackoverflow.com/q/25266638
type: Answer
answers question: http://stackoverflow.com/q/25266638
upvote count: 1

http://stackoverflow.com/comment/39589135
type: AnswerComment
type: Comment
has text: Maybe you should be using radio buttons instead! Then you wouldn't even need JavaScript.
score: 0
comment on: http://stackoverflow.com/a/25384588

http://stackoverflow.com/a/25361825
has comment: http://stackoverflow.com/comment/39546023
type: AcceptedAnswer
downvote count: 0
score: 18
has comment: http://stackoverflow.com/comment/39544837
type: Answer
has comment: http://stackoverflow.com/comment/66240308
accepted answer of: http://stackoverflow.com/q/25361799
answers question: http://stackoverflow.com/q/25361799
has comment: http://stackoverflow.com/comment/39545016
has comment: http://stackoverflow.com/comment/39546718
has comment: http://stackoverflow.com/comment/39545356
upvote count: 18
has body: Assuming: var arr = [1,2,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]; You can use this shorter code: while(arr[arr.length-1] === 0){ // While the last element is a 0, arr.pop(); // Remove that last element } Result: arr == [1,2,0,1,0,1]
has comment: http://stackoverflow.com/comment/66239936

http://stackoverflow.com/q/25311027
has answer: http://stackoverflow.com/a/25312488
type: Question
has answer: http://stackoverflow.com/a/25311554
tagged with: javascript
score: 0
has title: How to check element visibility in expression?
has answer: http://stackoverflow.com/a/25311983
accepted answer: http://stackoverflow.com/a/25312488
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25311494
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25311494
answer count: 5
has answer: http://stackoverflow.com/a/25311746
has body: I have two divs. I only want to show the first one if someExpression (using FirstController scope) is true. The second div should adapt and set a class based on if the first div is shown. The first div: The second div: I'd rather use some more angular way than the one above (which I haven't got to work anyway). So - is there a way to detect if the first div is visible or not?
type: AnsweredQuestion

http://stackoverflow.com/comment/39573417
score: 0
type: QuestionComment
has text: It worked when I used '#toremove' instead of "#toremove" but the js I had inside that div still executes for some magical reason.
type: Comment
comment on: http://stackoverflow.com/q/25372180

http://stackoverflow.com/a/25298887
has body: Thanks to pratyush's help, here's what worked. Added the on('click', ...) handler to the thead portion so it looks like this: thead.append("tr") .selectAll("th") .data(columns) .enter() .append("th") .text(function(column) { return column; }) .on('click', function (d) { rows.sort(function (a, b) { if (isNaN(a[d])) { return d3.ascending(a[d], b[d]); } else { return b[d] - a[d]; } }); }); Thanks much, dude.
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25292474
downvote count: 0
score: 1

http://stackoverflow.com/comment/39465254
type: Comment
has text: probably his client side approach times out (things getting to large he wrote), some c++ / c# code, could be complexer and quicker to run then javascript (under which he posted this too). You're probably right he's hitting some design limit. (but he's in that situation, and probaply cannt change that) In for example c# or c++ one could launch something complex over multi tasked threats, and return an answer fast. I dont think php could do that. But as for sample i tried to keep it simple as possible with a little bit out of the box thinking and so I used executable example Dir C:\*.* /w
type: AnswerComment
comment on: http://stackoverflow.com/a/25317711
score: 0

http://stackoverflow.com/comment/40130048
type: Comment
type: QuestionComment
has text: well this seems impossible so I'm making a little webpage using phantomjs instead. I'll direct people there.
score: 1
comment on: http://stackoverflow.com/q/25344732

http://stackoverflow.com/comment/39557133
score: 0
type: AnswerComment
type: Comment
has text: can you show me the other site. i will check what they are doing. is there help/reference to the widget?
comment on: http://stackoverflow.com/a/25367959

http://stackoverflow.com/comment/39455941
has text: Rui, I would use a method like I purposed for that situation. Specifically, the module that handles the route you are returning to should also have caught the failure event and kept the model object that backs the message box. Then when you return to that route, the controller will retrieve that model and populate the message box in the view. Let me know if that is not a helpful explanation or if you have issues with this approach.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25297561
type: Comment

http://stackoverflow.com/a/25257600
has body: For example: $('#language option').each(function(){ if($(this).attr('value') == 'ru'){ $(this).css('background-color', 'red'); } }); should work
score: 0
answers question: http://stackoverflow.com/q/25257520
type: Answer

http://stackoverflow.com/comment/39397684
comment on: http://stackoverflow.com/q/25281753
score: 0
type: Comment
type: QuestionComment
has text: http://jsfiddle.net/Lm3hqsbo/3/ - i update your fiddle

http://stackoverflow.com/q/25347501
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25347587
answer count: 2
has answer: http://stackoverflow.com/a/25347558
downvote count: 0
accepted answer: http://stackoverflow.com/a/25347558
favorite count: 0
tagged with: innertext
has answer: http://stackoverflow.com/a/25347587
has title: Javascript innerText nuance
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39519043
score: 1
has body: I'm wondering about the innerText property. Consider the following markup: HTML foo bar Then, lets run the following code: JS var a = document.querySelectorAll('div.myClass'); //var a = document.querySelectorAll('div.myClass div div'); for (var i=0; i<a.length; i++){ console.log(a[i].innerText); if (a[i].innerText == "foo"){ console.log("found"); } } FIDDLE HERE Running this code as is, outputs foo, and empty line, and then bar. If I comment out the first line of the script, and uncomment the second one which then closes-in on the exact level of the divs containing the text, this code outputs foo, found, bar. My question here is: If on the first iteration the script outputs foo, how come a[i].innerText == "foo" isn't true? Oh, and where is that empty line comming from?
upvote count: 1

http://stackoverflow.com/comment/39331315
type: Comment
has text: I want simmilar example http://jsfiddle.net/TZ464/6/ but this code is focused on div where each div has 1 combo-box. In my case all the comboboxes are in one div.
comment on: http://stackoverflow.com/a/25233946
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39497422
type: Comment
has text: Can you create a jsfiddle?
score: 0
comment on: http://stackoverflow.com/q/25333500
type: QuestionComment

express
tags question: http://stackoverflow.com/q/25311937
tags question: http://stackoverflow.com/q/25347870
tags question: http://stackoverflow.com/q/25257670
tags question: http://stackoverflow.com/q/25331404
tags question: http://stackoverflow.com/q/25329574
tags question: http://stackoverflow.com/q/25243469
tags question: http://stackoverflow.com/q/25254357
tags question: http://stackoverflow.com/q/25337222
tags question: http://stackoverflow.com/q/25272673
tags question: http://stackoverflow.com/q/25322905
tags question: http://stackoverflow.com/q/25311138
tags question: http://stackoverflow.com/q/25300853
tags question: http://stackoverflow.com/q/25367820
tags question: http://stackoverflow.com/q/25255790
tags question: http://stackoverflow.com/q/25374015
tags question: http://stackoverflow.com/q/25328766
tags question: http://stackoverflow.com/q/25364869
tags question: http://stackoverflow.com/q/25332482
tags question: http://stackoverflow.com/q/25260818
tags question: http://stackoverflow.com/q/25298064
tags question: http://stackoverflow.com/q/25243628
tags question: http://stackoverflow.com/q/25320720
tags question: http://stackoverflow.com/q/25344045
tags question: http://stackoverflow.com/q/25335081
tags question: http://stackoverflow.com/q/25345942
tags question: http://stackoverflow.com/q/25314440
tags question: http://stackoverflow.com/q/25286299
tags question: http://stackoverflow.com/q/25232576
tags question: http://stackoverflow.com/q/25237158
tags question: http://stackoverflow.com/q/25366412
tags question: http://stackoverflow.com/q/25354799
tags question: http://stackoverflow.com/q/25274156
tag name: express
tags question: http://stackoverflow.com/q/25272885
tags question: http://stackoverflow.com/q/25375553
tags question: http://stackoverflow.com/q/25322977
tags question: http://stackoverflow.com/q/25364152
tags question: http://stackoverflow.com/q/25382659
type: Tag
tags question: http://stackoverflow.com/q/25378408
tags question: http://stackoverflow.com/q/25358679
tags question: http://stackoverflow.com/q/25365139
tags question: http://stackoverflow.com/q/25374093
tags question: http://stackoverflow.com/q/25255517
tags question: http://stackoverflow.com/q/25309222
tags question: http://stackoverflow.com/q/25370933

http://stackoverflow.com/q/25298832
has title: preventDefault() on a timer
has comment: http://stackoverflow.com/comment/39429783
has answer: http://stackoverflow.com/a/25299060
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
type: Question
answer count: 1
has body: Does anyone know if there's a way to preventDefault(), but on a timer, so default actions are restored after a certain time? Here's what I have so far: function setResetInterval(bool){ var el = $('article'); if(bool){ timer = setInterval(function(){ setTimeout(function(){ console.log('default prevented'); e.preventDefault(); }, 500); },1000); }else{ clearInterval(timer); } } if(object.touch.touch){ object.header.menu_button.attr('href',null); object.touch.articles = $('article'); object.content_blocks.on('click','article',{},function(e){ object.touch.articles.removeClass('on'); $(this).addClass('on'); e.stopPropagation(); setResetInterval(true); setTimeout( function() { setResetInterval(false); }, 500); }); } Problem is, the function is called after the clickthrough and the action is not prevented. The alternative is the prevent the default action on click, which stop scrolling on mobile devices. Thinking about it more clearly, the real problem is the click tag in question is basically the entire screen width on mobile.
score: 0

http://stackoverflow.com/comment/39596349
has text: But it makes no sense? If you want to default-create properties, you should create *properties*, not local variables.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25384229

http://stackoverflow.com/q/25385942
type: UnansweredQuestion
has body: I have code that refreshes a div running on local server without flickering, but when hosting it on a webserver, it does flicker (disappear to background) when refreshing: &lt;script&gt; setTimeout(function() { $.ajax({ url: "", context: document.body, success: function(s,x){ $(this).html(s); } }); }, 1000); &lt;/script&gt; I've had a good look around SO and the web, and it seems I want to double buffer the div table I am refreshing - have one hidden, refresh that, then swap the display style of the two divs I started with How to avoid blinking when updating page from ajax moved on to http://www.brightcherry.co.uk/scribbles/jquery-auto-refresh-div-every-x-seconds/ and Trouble with dynamic refreshing div And got some good ideas from:How to toggle between two divs The code I am trying to get to work may be too complicated. I feels like it should work, and the tables refresh, but they flicker with a long time between display. Divs; &lt;div id="id1" style="display: none";&gt; &lt;div id="allTable1" class = "tableCenter"&gt; &lt;div id="hiTable" class = "table"&gt; {% for entry in high_entry_list %} &lt;li&gt; &lt;a href="/entries/{{ entry.id }}/"&gt; &lt;div class = "high" style = "text-align: left";&gt; {{ entry.text }}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;div style="float: right"&gt; {{ entry.score }} &lt;/div&gt; &lt;/div&gt; &lt;/a&gt; &lt;/li&gt; {% endfor %} &lt;/div&gt; ....and two more tables as hiTable above... &lt;/div&gt; &lt;/div&gt; &lt;div id="id2" style="display: block";&gt; &lt;div id="allTable2" class = "tableCenter"&gt; &lt;div id="hiTable" class = "table"&gt; {% for entry in high_entry_list %} &lt;li&gt; &lt;a href="/entries/{{ entry.id }}/"&gt; &lt;div class = "high" style = "text-align: left";&gt; {{ entry.text }}&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;div style="float: right"&gt; {{ entry.score }} &lt;/div&gt; &lt;/div&gt; &lt;/a&gt; &lt;/li&gt; {% endfor %} &lt;/div&gt; ....and two more tables as hiTable above... &lt;/div&gt; &lt;/div&…
linked to: http://stackoverflow.com/q/4936715
tagged with: refresh
has comment: http://stackoverflow.com/comment/39592875
tagged with: flicker
linked to: http://stackoverflow.com/q/196203
type: Question
has answer: http://stackoverflow.com/a/25386443
has title: Double buffering divs flicker when refreshing in Ajax
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/39599738
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/12338484
has comment: http://stackoverflow.com/comment/39591047

http://stackoverflow.com/q/25311884
tagged with: javascript
has comment: http://stackoverflow.com/comment/39453867
has answer: http://stackoverflow.com/a/25312151
has body: The image is quadrangle (you can see at border), i need mark as active element only when hover on image element, now he active when i move on empty white space near triangle and etc. My problem: i need ignore transparency place jsfiddle: http://jsfiddle.net/0vc33e2n/ &lt;img src='http://etc-mysitemyway.s3.amazonaws.com/icons/legacy-previews/icons-256/3d-transparent-glass-icons-media/001429-3d-transparent-glass-icon-media-a-media21-arrow-back.png' style='position: absolute; top: -50px; left: -70px'&gt; &lt;img src='http://etc-mysitemyway.s3.amazonaws.com/icons/legacy-previews/icons-256/3d-transparent-glass-icons-transport-travel/036411-3d-transparent-glass-icon-transport-travel-anchor6-sc48.png' style='position: absolute; top: 20px; left: 20px'&gt;
score: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25312151
tagged with: css
type: AnsweredQuestion
type: Question
has title: How to mark as active when hover on image element (not empty [transparent] zone)
answer count: 1

http://stackoverflow.com/comment/39428400
has text: Does your get request return any data? You can open the developer tools to see.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25298064
score: 0

http://stackoverflow.com/comment/39436108
type: Comment
comment on: http://stackoverflow.com/a/25297513
score: 0
has text: OP didn't ask for a clean way of doing it, otherwise it would have used 2 objects and do it the normal way. As for function with a single purpose go tell that to jQuery too ;)
type: AnswerComment

http://stackoverflow.com/q/25364322
type: Question
has body: I have an HTML code like this: &lt;div id="test"&gt; &lt;div id="test1"&gt; &lt;div id="test2"&gt; test &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; I want to take all children of the element "test", so I made a recursive function: function getObjectChildren(elem) { var elemChildren = elem.childNodes; var result = []; result.push.apply(elemChildren); for (k = 0; k &lt; elemChildren.length; k++) { if (elemChildren[k].childNodes.length &gt; 0) { result.push.apply(getObjectChildren(elemChildren[k])); } } return result; } var a = getObjectChildren(document.getElementById("test"); The thing is, this recursive function enters an infinite loop. Does anyone know why this happens and how can I solve this problem?
has answer: http://stackoverflow.com/a/25365062
tagged with: javascript
has comment: http://stackoverflow.com/comment/39549508
has comment: http://stackoverflow.com/comment/39549578
score: 0
answer count: 1
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25365062
has title: javascript get dom element children from all depths
tagged with: dom

http://stackoverflow.com/comment/39354133
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25257637
has text: Good answer, but after link4, you got undefined and the loop is over. :) [Salutari din romania :)) ]
score: 0

http://stackoverflow.com/comment/39378160
type: Comment
has text: @Del22 Whatever the original script mess is, it is doing it poorly: follow the format above and place the version-specific plugins immediately following the relevant jQuery include. *Read* the upgrade documentation for jq-migrate; the point is to *not* use an older jQuery version when it is used and all non-1.9 (or really, all non-1.11) jQuery includes should be eliminated. There is *no* need for noConflict here at all - except if the plugins are written incorrectly and need to be modified to refer to a specific version by established name, in which case the pattern used could be fixed anyway!
comment on: http://stackoverflow.com/a/25269778
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39539919
type: Comment
comment on: http://stackoverflow.com/a/25359148
type: AnswerComment
has text: I am not using any plugin. I am talking about the browser's own context menu that appears on right click. I need to know the visibility of that. Or some way so that I can set contextMenuVisible to false just like I set it to true when the context menu opens.
score: 0

http://stackoverflow.com/q/25363872
tagged with: http://stackoverflow.com/tag/html
score: 1
accepted answer: http://stackoverflow.com/a/25376256
has body: I changed the size of the scroll bar in jScrollpane $(function() { $('.scroll-pane').jScrollPane({ verticalDragMinHeight: 30, verticalDragMaxHeight: 32, horizontalDragMinWidth: 40, horizontalDragMaxWidth: 40 }); }); But i am not able to change the size of the track it has. PFB the image
upvote count: 1
has answer: http://stackoverflow.com/a/25364052
type: AnsweredQuestion
tagged with: jquery-jscrollpane
possible better answer: http://stackoverflow.com/a/25364052
has title: how to increase the size of scroll track in jquery jscrollpane
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25376256
downvote count: 0
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/4474706

http://stackoverflow.com/q/25281577
has comment: http://stackoverflow.com/comment/39400168
has comment: http://stackoverflow.com/comment/39398216
has title: asp mvc return form and additional parameter
answer count: 0
type: UnansweredQuestion
score: 0
has body: I want to send to my controller, a form (t_prospect object) and an additional parameter, depending of the choice of the user. So in fact, I have two forms in my page, the prospect form, who send to my controller an t_prospect object and an other that appear only if the user want ton send an email at the same time as creating the prospect entries . I get my optional form, by means of an ajax call who return me inputs corresponding. So it's not exactly two forms but one form with the content of one object and one optional parameter. My controller action : public ActionResult AjoutRapide() { List<string> listModel = new List<string>(); foreach (var tMailModel in db.t_mail_modele) { listModel.Add(tMailModel.nom); } ViewBag.listModel = listModel; ViewBag.json = string.Empty; return View(); } [HttpPost] public ActionResult AjoutRapide(t_prospect t_prospect, string param = "" ) { List<string> listModel = new List<string>(); foreach (var tMailModel in db.t_mail_modele) { listModel.Add(tMailModel.nom); } ViewBag.listModel = listModel; if (ModelState.IsValid) { if (param != null) { t_mail mail = new t_mail(); db.t_mail.Add(mail); } db.t_prospect.Add(t_prospect); db.SaveChanges(); } return View(t_prospect); } I tried that : **@using (Html.BeginForm("AjoutRapide", "MvcProspect", new { param = "formulaireRapide" }))** { @Html.ValidationSummary(true) @Html.LabelFor(model => model.nom, new { @class = "control-label col-md-2" }) @Html.EditorFor(model => model.nom) @Html.ValidationMessageFor(model => model.nom) @Html.LabelFor(model => model.adresse, new { @class = "control-label col-md-2" }) @Html.EditorFor(model => model.adresse) @Html.ValidationMessageFor(model => model.adresse) @Html.LabelFor(model => model.telephone, new { @class = "control-label col-md-2" }) @Html.EditorFor(model => model.telephone) @Html.ValidationMessageFor(model => model.telephone) @Html.LabelFor(model => model.mail, new { @class = "control-label col-md-2" }) @Html.EditorFor(model => model.mail) @Html.Valida…
has comment: http://stackoverflow.com/comment/39400599
has comment: http://stackoverflow.com/comment/39398327
tagged with: optional-parameters
type: Question
has comment: http://stackoverflow.com/comment/39398939
linked to: http://stackoverflow.com/q/10281897
tagged with: asp.net-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/39397472
tagged with: forms
has comment: http://stackoverflow.com/comment/39400302
tagged with: ajax

http://stackoverflow.com/a/25382480
has body: According to your comment you need change the width and height with a animation and the height must change to auto. You can do it with CSS3 transition: HTML: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Show CSS: #clickDetailTab01.tab_minimized { width: 1000px; height: auto; } #clickDetailTab01 { overflow:hidden; width: 200px; height: 140px; transition: height 1.5s, width 1.5s; } JavaScript: $(document).ready(function(){ $("#clickLaptop01").click(function() { $("#clickDetailTab01").toggleClass( "tab_minimized" ); }); }); You can see a jsFiddle here: http://jsfiddle.net/mv147eq8/. I hope help you. Note: I only put width and height properties. You can add other properties like border. If you need a transition in these properties, you must add to the transition property.
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39585796
accepted answer of: http://stackoverflow.com/q/25381208
answers question: http://stackoverflow.com/q/25381208
upvote count: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39514062
has text: Because I told you it wasn't helping & you weren't responding or editing. I may have acted a little prematurely, though.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25333267

http://stackoverflow.com/a/25322950
has body: To position both elements side to side try this: .map-container{ width: calc(100% - 100px); height:100%; position:absolute; left:100px; } .map-sidebar{ position:absolute; background-color: rgba(8,8,8, 1.1); width:100px; left:0; top:0; height:100%; -webkit-box-shadow: 3px 1px 17px 0px rgba(50, 50, 50, 0.43); -moz-box-shadow: 3px 1px 17px 0px rgba(50, 50, 50, 0.43); box-shadow: 3px 1px 17px 0px rgba(50, 50, 50, 0.43); }
type: Answer
has comment: http://stackoverflow.com/comment/39474230
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39474594
accepted answer of: http://stackoverflow.com/q/25322785
answers question: http://stackoverflow.com/q/25322785
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25277234
upvote count: 1
downvote count: 0
has body: You need to use beginning of string ^ and end of string $ anchors and place the lookahead at the beginning. /^(?!.*\.{2})[a-z0-9.]+$/i Live Demo
type: Answer
answers question: http://stackoverflow.com/q/25275381
score: 1

http://stackoverflow.com/a/25400224
has comment: http://stackoverflow.com/comment/56004368
type: AcceptedAnswer
downvote count: 0
has body: Sorted it out myself. public static string GetBundleContents(string virtualPath) { OptimizationSettings config = new OptimizationSettings() { ApplicationPath = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath, BundleTable = BundleTable.Bundles }; BundleResponse response = Optimizer.BuildBundle(virtualPath, config); return response.Content; } public static void WriteBundlesToDisk(string path) { foreach (var bundle in BundleTable.Bundles) { var bundleContents = BundleConfig.GetBundleContents(bundle.Path); File.WriteAllText(string.Format("{0}/{1}.{2}", path, bundle.Path.Split('/').Last(), BundleConfig.GetFileExtensionByBundleType(bundle)), bundleContents); } } public static string GetFileExtensionByBundleType(Bundle bundle) { if (bundle is ScriptBundle) return "js"; else if (bundle is StyleBundle) return "css"; return "folderBundle"; } usage: BundleConfig.WriteBundlesToDisk("c://bundles"); sidenote: there's a type of bundle called System.Web.Optimization.DynamicFolderBundle that is not being handled properly by the solution above, it will save it as .folderBundle file type.
type: Answer
has comment: http://stackoverflow.com/comment/55980128
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/55980232
accepted answer of: http://stackoverflow.com/q/25389114
answers question: http://stackoverflow.com/q/25389114
has comment: http://stackoverflow.com/comment/55971559

http://stackoverflow.com/q/25251180
tagged with: ruby-on-rails
has body: I'm having trouble with javascript in my rails app. I want to run a simple multiplication function on click when myButton is clicked and return it in an alert. Right now, I can't even get the JS to talk, and it's reloading the page, despite the code I have... &lt;script&gt; $(function() { $('#myButton').click(function(e) { e.preventDefault(); alert("hello") }) }) &lt;/script&gt; &lt;form&gt; $&lt;input id="dataToPass"type="text"&gt;&lt;/input&gt; &lt;input id="myButton "type="submit" value="Invest"&gt; &lt;/input&gt; &lt;/form&gt; If I add inline JS, I can get the alert to work, but when I move the code outside of the html, it's not working. Anyone know why? I'm not adept with jQuery or JavaScript.
type: Question
has title: Rails App Javascript Unobtrusive
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25251291
answer count: 1
tagged with: jquery
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25251291

http://stackoverflow.com/comment/39479789
type: Comment
comment on: http://stackoverflow.com/a/25325995
type: AnswerComment
has text: you include that in your plunker ?
score: 0

http://stackoverflow.com/comment/39540093
has text: @T.J.Crowder Thx for the info Sir...and I subscribed to your blog..as it looks informative to me
score: 0
comment on: http://stackoverflow.com/q/25358137
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25388374
has comment: http://stackoverflow.com/comment/39619819
answers question: http://stackoverflow.com/q/25387250
has comment: http://stackoverflow.com/comment/39595866
type: Answer
has comment: http://stackoverflow.com/comment/39596184
has comment: http://stackoverflow.com/comment/39596593
has comment: http://stackoverflow.com/comment/39617512
has comment: http://stackoverflow.com/comment/39595661
score: 0
has comment: http://stackoverflow.com/comment/39595723
has body: If you want something to be accessible from any javascript in your page, just declare it as a global variable early on. If you want to be a bit more correct you could wrap that up in a function but it doesn't matter greatly- the output you want is the same. Basic array notation in JavaScript is values ( either numbers, strings or objects ) wrapped in square brackets. To declare a JavaScript variable available for your page you might just say this: &lt;script type="text/javascript"&gt; var myArray= [ 'item one', 'item two', 'item three' ]; &lt;/script&gt; Then anywhere you call myArray in that page, you will be able access it. To combine that with your vbscript, you just need to format your array as a JavaScript literal and write it into the page. Now my vbscript is very rusty ( as it should be unless I have fallen through a timewarp and it is still 2001 - every available web development language is better than vbscript ) but I think the notation would be something like this, assuming your questions variable contains the array displayed in the right order: &lt;script type="text/javascript"&gt; var myArray= [ '&lt;%= join( questions, "', '" ) %&gt;' ]; &lt;/script&gt; Notice that I have to put quotes before and after my joined array to ensure they are correctly enclosed in quotes. You could also use double quotes but I seem to recall escaping double quotes in a vbscript string is really horrible.
has comment: http://stackoverflow.com/comment/39596053

http://stackoverflow.com/a/25280601
type: Answer
answers question: http://stackoverflow.com/q/25280241
has comment: http://stackoverflow.com/comment/39402345
score: 0
has body: Will in your case you need to setup JSON Object , why !! because when Html inputs submitted as Array each key mean new array you cannot group them in one object as you requested , to do this you need to use custom javascript array this is full working example to your case 1- first : remove array name from your inputs to be like this : &lt;input name='sensors_sensor' value=''&gt; &lt;input name='sensors_name' value=''&gt; &lt;input name='sensors_type' value=''&gt; 2- second : add this object inside form post request ( AJAX ) var fromData = { "version" : $('input[name=version]').val(), "sensors" : [ { "sensor" : $('input[name=sensors_name]').val(), "output" : [{ "name" : $('input[name=sensors_name]').val() , "type": $('input[name=sensors_type]').val()}] } ], }; 3- third : if you like to add more inputs just add it inside the formData object 4- finally : add formData object to your Ajax form and enjoy $.ajax({ url: "http://posttestserver.com/post.php", type: "POST", data: formData, success: function (send, status, jqXHR) { alert(JSON.stringify(send)); },
has comment: http://stackoverflow.com/comment/39405700

http://stackoverflow.com/a/25234364
has comment: http://stackoverflow.com/comment/39309691
answers question: http://stackoverflow.com/q/25234240
has comment: http://stackoverflow.com/comment/39309775
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25234240
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/39337454
has comment: http://stackoverflow.com/comment/39344929
has body: Basically when $destroy is broadcasted from the scope, it also means that the scope has invoked the $destroy() method. This means that everything related to that scope is also being cleaned up, including the watchers, this part of the source code shows how the $destroy() method empties the watchers of that scope.
upvote count: 1
has comment: http://stackoverflow.com/comment/39336967

http://stackoverflow.com/comment/39584526
has text: looks like some problem with server.js
comment on: http://stackoverflow.com/q/25382779
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25235166
has answer: http://stackoverflow.com/a/25235550
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25235206
has comment: http://stackoverflow.com/comment/39311353
type: Question
has comment: http://stackoverflow.com/comment/39311367
answer count: 2
linked to: http://stackoverflow.com/q/6585347
has title: Howto run function every few seconds that has return values?
score: -2
has comment: http://stackoverflow.com/comment/39311591
has comment: http://stackoverflow.com/comment/39311270
tagged with: javascript
has comment: http://stackoverflow.com/comment/39311267
has comment: http://stackoverflow.com/comment/39311254
has answer: http://stackoverflow.com/a/25235206
has comment: http://stackoverflow.com/comment/39311493
has body: How can I run this every few second , without blocking the rest of the pagefrom loading. function Create() { var SomeArray = []; for ( var i=0; i&lt;=1 ; i ++) { SomeArray[i] = (Math.random() * 10) + 1; //alert(arr[0]); } return SomeArray; } var x = Create(); alert(x[0] + x[1]); I was trying this var timer = setInterval(Create, 5000); it prevent loading rest of the page. i want to get new values every few seconds
favorite count: 0
has comment: http://stackoverflow.com/comment/39311668
accepted answer: http://stackoverflow.com/a/25235550
upvote count: 0
has comment: http://stackoverflow.com/comment/39311281
downvote count: 2
has comment: http://stackoverflow.com/comment/39311889
has comment: http://stackoverflow.com/comment/39311344

http://stackoverflow.com/comment/39394998
comment on: http://stackoverflow.com/q/25280473
has text: Sorry! I need the code with the use of jquery
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25311778
tagged with: ember.js
tagged with: ruby-on-rails
has body: I am using ember-data#canary and it has a serious bug when finding record from the store. File: router.js this.resource('games', function() { this.route('game', { path: '/:game' }); }); File: games_route.js App.GamesRoute = Ember.Route.extend({ model: function() { // request: GET /api/games // response: { games: [ // { id: 1, slug: lym, name: lose your marbles } // ] } return this.store.find('game'); } }); File: game_route.js App.GamesGameRoute = Ember.Route.extend({ model: function(params) { // this query causes bogus data to show up. // request: GET /api/games/lym // response: { game: { id: 1, slug: lym, name: lose your marbles } } return this.store.find('game', params.game); }, serialize: function(game) { return { game: game.get('slug') }; } }); File game_model.js App.Game = DS.Model.extend({ slug: DS.attr('string'), name: DS.attr('string'), }); When I visit /games ember-inspector data tab shows 1 game loaded. `id` `slug` `name` 1 lym lose your marbles When I visit /games/lym ember-inspector data tab shows 2 game loaded. `id` `slug` `name` 1 lym lose your marbles lym undefined undefined the second data is clearly bogus. I don't know where it comes from and it is causing me trouble.
tagged with: node.js
type: AnsweredQuestion
has title: ember-data miserable bug duplicate record
accepted answer: http://stackoverflow.com/a/25312369
type: Question
has answer: http://stackoverflow.com/a/25312369
tagged with: ember-data
tagged with: javascript
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/14946645

http://stackoverflow.com/a/25347953
score: 2
upvote count: 2
has body: What you have now... Ok, I get the point now. When you write: getSumAndDiff = (firstNumber, secondNumber) -&gt; sum = firstNumber + secondNumber difference = firstNumber - secondNumber {sum, difference} The function getSumAndDifference returns an associative array (well, an object) having for key the name of the variables and for value their content. This is only syntactic sugar equivalent to: { 'sum': sum, 'diff': diff } That associative array is the value returned and you then use object destructing to get back the various fields of interest: {sum, difference} = getSumAndDiff(10, 5) Once again this is only syntactic sugar around: _obj = getSumAndDiff(10, 5) sum = _obj['sum'] diff = _obj['diff'] ... now, for some alternatives 1) Aliased object destructuring First, as you explained yourself, you can use "aliased" object destructing to get back the values as an other name: {sum:x, diff: y} = getSumAndDiff(10, 5) This will set x to the same value as field sum of the returned object. And y as the same value as the field diff. Syntactic sugar around: _obj = getSumAndDiff(10, 5) x = _obj['sum'] y = _obj['diff'] As a side note, notice again how {sum,diff} was in fact a shortcut to write {sum: sum, diff: diff} 2) Array destructuring An other, somehow simpler alternative, is not to return an object but an array (more formally, a numerically indexed array) : getSumAndDiff = (firstNumber, secondNumber) -&gt; sum = firstNumber + secondNumber difference = firstNumber - secondNumber [sum, difference] ## &lt;-- array [ ... ] not object { ... } With that syntax, sum and diff are returned as the item of index 0 and 1 resp. of an array. From caller side, you might then use array destructuring to extract those values: [sum, diff] = getSumAndDiff(10, 5) As the array is numerically indexed, you don't have to bother about field names. So you can write that too: [x, y] = getSumAndDiff(10, 5) [sum2, diff2] = getSumAndDiff(10, 5) ...
accepted answer of: http://stackoverflow.com/q/25342760
answers question: http://stackoverflow.com/q/25342760
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25374015
tagged with: express
answer count: 2
upvote count: 1
has body: I am trying to access some DB results with Node/Express.js on Parse.com because I have some additional data to loop next. Basically I need the Navigation table to loop, and then inside that loop I will loop another table. Is this the proper way? I cannot access the variable navigation outside of method below: var Navigation = Parse.Object.extend('Navigation'); var navigation; var query = new Parse.Query(Navigation); query.ascending('SortOrder'); query.find().then(function(results) { navigation = results }, function() { res.send(500, 'Failed loading navigation'); }); res.render('index', { nav: navigation }); Thoughts? I am basically building a mobile single page app. I don't really need routes. But I want to loop through and build the navigation. And also loop through and build the other DIV's which will be shown/hidden according to what the user selects from the navigation. Hope that makes sense.
favorite count: 0
tagged with: parse-platform
has title: Variable not working outside method
has answer: http://stackoverflow.com/a/25374066
tagged with: node.js
type: AnsweredQuestion
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/25374081
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25374081
possible better answer: http://stackoverflow.com/a/25374066

http://stackoverflow.com/a/25286619
has body: For security reasons this is impossible. You can use some custom prompt other than the basic one like $.dialog of jQueryUI
type: Answer
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25286478
answers question: http://stackoverflow.com/q/25286478
has comment: http://stackoverflow.com/comment/39406207
score: 3
has comment: http://stackoverflow.com/comment/39407429
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/120580090
downvote count: 0

http://stackoverflow.com/a/25303106
has comment: http://stackoverflow.com/comment/39437353
has body: How about this. HTML: Unlike JS: $('#container').on('click', '.unlike-post', function(){ // other code });
has comment: http://stackoverflow.com/comment/39437415
score: 0
answers question: http://stackoverflow.com/q/25302970
type: Answer
has comment: http://stackoverflow.com/comment/39439808

google-oauth
type: Tag
tags question: http://stackoverflow.com/q/25271201
tag name: google-oauth

http://stackoverflow.com/a/25354321
has comment: http://stackoverflow.com/comment/39533982
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/25354277
has comment: http://stackoverflow.com/comment/39531057
answers question: http://stackoverflow.com/q/25354277
has body: Your .navigation li{ float: left;} CSS is pulling all elements to the left. Add the tag for "Account" like so, with a new account class. Account And add to your CSS: .account{ float: right !important; } Updated JS Fiddle Also, you're going to have to adjust your media query width for menu collapse since the account is now appearing on a second line in a small screen width just before the menu collapses.
type: Answer

http://stackoverflow.com/q/25271906
score: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39380018
type: Question
has body: I'm using a timer function to check if the session is valid or not every five seconds. setInterval(checksession,5000); function checksession(called_for) { //alert('check-session') $.ajax({ type:'POST' ,url:'CheckSession' ,success: validateresult ,data: { antiCSRF : '{{acsrf}}', session_id: '{{session_id}}'} //,error: function(){ alert('Session check failed') } }) } I would like to know what will happen if I have multiple ajax calls at the same time when the session is checked. Will it be 2 separate threads? Is this the correct way to check session?
has title: Javascript timer function
accepted answer: http://stackoverflow.com/a/25272301
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39379898
has comment: http://stackoverflow.com/comment/39379795
tagged with: javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25272301
downvote count: 0

http://stackoverflow.com/q/25279385
has comment: http://stackoverflow.com/comment/39394659
type: Question
tagged with: angularjs-routing
has title: Store the value from url params using angular js
tagged with: javascript
has comment: http://stackoverflow.com/comment/39393190
score: 0
has body: var x = $location.search('filterBy=')[1]; $http({method: 'GET',url: '/asasa/sddd?websiteId='+x}).success(function(data) { $scope.onlinedata = data.coupons; }); my url pattern www.asasa.com/asa/filterBy=80?couponid=121212 I am trying to store url pamars filterBy value(80) in a variable also in try to store couponid in another variable .I am using angular js 1.2.17
linked to: http://stackoverflow.com/q/901115
has comment: http://stackoverflow.com/comment/39395746
has comment: http://stackoverflow.com/comment/39394893
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39393239
has comment: http://stackoverflow.com/comment/39393095
answer count: 0
has comment: http://stackoverflow.com/comment/39394051
has comment: http://stackoverflow.com/comment/39394248

http://stackoverflow.com/comment/39332914
has text: @MimiLauren No it doesn't. The problem is not the initial innerHTML, but rather the "injected" values.
type: Comment
comment on: http://stackoverflow.com/a/25246673
score: 0
type: AnswerComment

http://stackoverflow.com/a/25255616
score: 0
has comment: http://stackoverflow.com/comment/39350162
type: Answer
has comment: http://stackoverflow.com/comment/39350106
has comment: http://stackoverflow.com/comment/39349825
has comment: http://stackoverflow.com/comment/39349998
has body: If the console log is showing all of the data you're looking for then the ajax call should be fine. Any code in the success callback will be ran after the ajax call, so just use JQuery in the success callback function to insert data into the html. All I see there now is the console.log(data) unless you've removed some code. The timeout just gives the ajax call a set amount of time to complete before it "times out", in other words it tells it to stop waiting after the set amount of time.
has comment: http://stackoverflow.com/comment/39350311
answers question: http://stackoverflow.com/q/25255466

jquery-mobile
tags question: http://stackoverflow.com/q/25248518
tags question: http://stackoverflow.com/q/25325013
tags question: http://stackoverflow.com/q/25376722
tags question: http://stackoverflow.com/q/25252213
tags question: http://stackoverflow.com/q/25254350
tags question: http://stackoverflow.com/q/25278489
tags question: http://stackoverflow.com/q/25295824
tags question: http://stackoverflow.com/q/25322653
type: Tag
tags question: http://stackoverflow.com/q/25335099
tags question: http://stackoverflow.com/q/25351898
tags question: http://stackoverflow.com/q/25387121
tags question: http://stackoverflow.com/q/25249154
tags question: http://stackoverflow.com/q/25287181
tags question: http://stackoverflow.com/q/25281830
tags question: http://stackoverflow.com/q/25242428
tags question: http://stackoverflow.com/q/25361809
tags question: http://stackoverflow.com/q/25265336
tags question: http://stackoverflow.com/q/25273012
tags question: http://stackoverflow.com/q/25359217
tags question: http://stackoverflow.com/q/25329736
tags question: http://stackoverflow.com/q/25361272
tags question: http://stackoverflow.com/q/25335776
tags question: http://stackoverflow.com/q/25337374
tags question: http://stackoverflow.com/q/25311856
tags question: http://stackoverflow.com/q/25250261
tags question: http://stackoverflow.com/q/25344519
tags question: http://stackoverflow.com/q/25263299
tags question: http://stackoverflow.com/q/25301621
tags question: http://stackoverflow.com/q/25383875
tags question: http://stackoverflow.com/q/25329922
tags question: http://stackoverflow.com/q/25280308
tags question: http://stackoverflow.com/q/25346522
tags question: http://stackoverflow.com/q/25284450
tags question: http://stackoverflow.com/q/25242374
tags question: http://stackoverflow.com/q/25295666
tag name: jquery-mobile

http://stackoverflow.com/q/25310025
has comment: http://stackoverflow.com/comment/39450796
upvote count: 1
favorite count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/39452005
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39451115
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/25311063
accepted answer: http://stackoverflow.com/a/25311063
has comment: http://stackoverflow.com/comment/39450809
tagged with: asp.net-mvc
has title: Binding a complex model to a drop down list in MVC
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39451141
has body: I'm trying to bind a model that has two properties - one Int, and one Boolean - to a drop-down list in MVC. The boolean is a discriminator and the integer an ID. It is not possible to split the drop down list in two. Here is my code so far. Select an Option @foreach (var m in models.OrderBy(x => x.Id)) { @m.Name } The model looks something like this class MyModel { int ID { get; set; } string Name { get; set; } boolean Discriminator { get; set; } } The aim is to provide a set of models to the View, then the user can pick one of these. Unfortunately each model has two properties which are used to identify which model was selected in the database - the Id, which mirrors the Id in the database, and the Discriminator. The two types are otherwise incompatible in the database, hence the discriminator. For the sake of design, I only want to have these two in the same drop-down list, as you can only select one at a time anyway. My idea of a solution was to create 2 hidden fields which would be bound to the model like so These would be updated via JavaScript and then bound to the model (as far as I know, using names like that will bind it correctly, providing that the destination property on the model passed to the POST is Model in this example). Are there any other alternatives I could pursue? EDIT: Also worth noting that this 'Model' is part of a more complex model and is not the only field being POSTed, so if that makes any difference...
has comment: http://stackoverflow.com/comment/39450703

http://stackoverflow.com/comment/39590139
has text: If you dont want to clone, create an html string and append it. But why don't you want to clone?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25385598

http://stackoverflow.com/a/25283460
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25283279
answers question: http://stackoverflow.com/q/25283279
type: Answer
has body: All your event handlers are written inside the highlight function.. Splitting all of 'em apart did the trick for me.. function highlight() { var timerId = 0; var $divs = $('.cell').removeClass('redborder'); var random = Math.floor(Math.random() * $divs.length); $divs.eq(random).addClass('redborder'); console.log($divs.eq(random)); $('#submit').show(); } $(document).ready(function () { $('#button').click(function () { $('p').empty(); if ($('#plaatje1').hasClass("redborder") == true) { $(".textarea").append(" Tekst 1 "); } if ($('#plaatje2').hasClass("redborder") == true) { $(".textarea").append(" Tekst 2 "); } if ($('#plaatje3').hasClass("redborder") == true) { $(".textarea").append(" Tekst 3 "); } if ($('#plaatje4').hasClass("redborder") == true) { $(".textarea").append(" Tekst 4 "); } if ($('#plaatje5').hasClass("redborder") == true) { $(".textarea").append(" Tekst 5 "); } if ($('#plaatje6').hasClass("redborder") == true) { $(".textarea").append(" Tekst 6 "); } if ($('#plaatje7').hasClass("redborder") == true) { $(".textarea").append(" Tekst 7 "); } if ($('#plaatje8').hasClass("redborder") == true) { $(".textarea").append(" Tekst 8 "); } if ($('#plaatje9').hasClass("redborder") == true) { $(".textarea").append(" Tekst 9 "); } if ($('#plaatje10').hasClass("redborder") == true) { $(".textarea").append(" Tekst 10 "); } if ($('#plaatje11').hasClass("redborder") == true) { $(".textarea").append(" Tekst 11 "); } if ($('#plaatje12').hasClass("redborder") == true) { $(".textarea").append(" Tekst 12 "); } if ($('#plaatje13').hasClass("redborder") == true) { $(".textarea").append(" Tekst 13 "); } if ($('#plaatje14').hasClass("redborder") == true) { $(".textarea").append(" Tekst 14 "); } if ($('#plaatje15').hasClass("redborder") == true) { $(".textarea").append(" Tekst 15 "); } if ($('#plaatje16').hasClass("redborder") == true) { $(".textarea").append(" Tekst 16 "); } }); $('#submit').click(function () { clearInterval(timerId); }); }); timerId = setInterval(function () { high…
downvote count: 0

http://stackoverflow.com/comment/39305602
has text: I'm not sure I understand what you need exactly. You should try creating an example of what you are trying to achieve on [JSFiddle](http://jsfiddle.net) or at least try doing it yourself and show us what you came up with.
comment on: http://stackoverflow.com/q/25232447
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39388915
has text: Please clarify, then. If objects aren’t passed by value and aren’t passed by reference, how are they passed?
type: Comment
comment on: http://stackoverflow.com/a/25277031
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39537864
type: QuestionComment
comment on: http://stackoverflow.com/q/25357836
has text: @ArunPJohny $ajax code does not execute
score: 0
type: Comment

http://stackoverflow.com/q/25288990
possible better answer: http://stackoverflow.com/a/25289053
has title: Sum of array of integers (strings?) without losing decimals
has answer: http://stackoverflow.com/a/25289053
has answer: http://stackoverflow.com/a/25289054
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39410955
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39410921
favorite count: 0
has answer: http://stackoverflow.com/a/25289095
type: Question
score: 3
accepted answer: http://stackoverflow.com/a/25289054
has comment: http://stackoverflow.com/comment/39410818
upvote count: 3
answer count: 3
tagged with: jquery-1.7
has body: Given: I have elements with values of integers floats (thank you, Pointy) up to two decimal places (such as: 1.50 and 2.25). Goal: Collect the values of several elements and add them together. (such as: 1.50 + 2.25 = 3.75 ) Code: $(".quantity").keyup(function(){ var sum = 0.00; var subTotals = document.getElementsByClassName("sub-total") $.each(subTotals, function(){ sum += $(this).val() &lt;&lt; 0 }); $("#products_revenue_income").val(sum) }); Issue: I'm used to Ruby, so I presumed that iterating over an array of [1.5, 2.25] you could add the elements together with +=, to get 3.75, but my return value was 01.502.25, appearing to (1) add a zero to the left and (2) treat the values as a string. When I added the shift operator &lt;&lt;, it removed the left zero and treated the values like integers again, but it rounded the total, so my return value is 3. What I've tried: I've tried using parseFloat($(this).val()).toFixed(2) within the block to make sure each value is treated as an integer but it doesn't appear to have any effect on the result. Tech: jQuery version: 1.7.1. Thank you for your time Let me know if you require any additional context.

http://stackoverflow.com/a/25334434
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25330414
downvote count: 0
type: Answer
has body: It's possible with a combination of css and javascript. You can define css for a class as follows: .hiddenLine{ opacity: 0; } If you build your dom with both bars and lines as children of g elements, with bars first so the lines render on top of them, like so: ... &lt;g class="bar"&gt; &lt;rect&gt;&lt;/rect&gt; &lt;line&gt;&lt;/line&gt; &lt;/g&gt; //more bars ... The following javascript will create the hover affect: d3.select('.bars') .on('mouseover', function(d){ d3.select(this).select('line').classed('hiddenLine', false); }) .on('mouseout', function(d){ d3.select(this).select('line').classed('hiddenLine', true); });

http://stackoverflow.com/q/25267082
has title: AJAX request makes two POST queries (Play framework)
type: UnansweredQuestion
tagged with: playframework-2.0
has comment: http://stackoverflow.com/comment/39397404
type: Question
has comment: http://stackoverflow.com/comment/39387492
has answer: http://stackoverflow.com/a/25298425
has body: I have form template like this @(list: List[Item]) @main("test form") { name mark @for(item <- list) { @item.name } Send } And on the server side - something like this public static Result getForm() { List<Item> items = new ArrayList<>(); for (int i = 0; i < 5; i++) { Item item = new Item(i + 1, "person " + (i + 1), (i % 5) + 1); items.add(item); } return ok(form.render(items)); } public static Result accept() { DynamicForm form = Form.form().bindFromRequest(); String json = form.get("json"); if (null == json) { json = "Nothing received!"; } Logger.info(json); return ok(result.render(json)); } Javascript function sendJSON() is function sendJSON(serverUrl) { // making JSON jsonObj = []; $("input[type=text]").each(function() { var id = $(this).attr("id"); var title = $(this).attr("title"); var mark = $(this).val(); item = {} item ["id"] = id; item ["title"] = title; item ["mark"] = mark; jsonObj.push(item); }); var jsonString = 'json=' + JSON.stringify(jsonObj); alert(jsonString); // sending $.ajax({ url: serverUrl, type: 'POST', data: jsonString, success: function(res){ $('html').html(res); alert("done!"); }, failure: function(res){ alert("failure!"); } }); return false; }; in logger I see two records for one AJAX request. One with JSON data, but another is "Nothing received!". What is the best way to send only one POST query? Why alerts "done!" and "failure!" doesn't appear? Thanks for wasting your time for me. Best regards.
tagged with: javascript
has comment: http://stackoverflow.com/comment/39372305
tagged with: jquery
tagged with: ajax
score: 0
answer count: 1

http://stackoverflow.com/q/25287239
has answer: http://stackoverflow.com/a/25287537
has comment: http://stackoverflow.com/comment/39407821
type: Question
has comment: http://stackoverflow.com/comment/39407594
tagged with: internet-explorer-8
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39407669
score: 0
linked to: http://stackoverflow.com/q/500504
has comment: http://stackoverflow.com/comment/39407739
answer count: 1
has comment: http://stackoverflow.com/comment/39407489
has body: I have an input box that onpropertychange="validateEntryIE(this)" validateEntryIE = function(object) { $(object).val(validateEntry($(object).val())); } Which calls: validateEntry = function(str) { if( str != "" ) { var regx = /[A-Za-z0-9_]/; var str_new = ""; var chars = str.split(''); for(var i in chars) { if (regx.test(chars[i])) { str_new += chars[i]; } } return str_new; } } However it does not replace the value and only returns a stack overflow. I am stuck beyond all belief. Does anyone know what has caused this and how to rectify
has title: IE8 Stack Overflow when setting $(this).val()
has comment: http://stackoverflow.com/comment/39407697
has comment: http://stackoverflow.com/comment/39407907
accepted answer: http://stackoverflow.com/a/25287537
has comment: http://stackoverflow.com/comment/39407902
has comment: http://stackoverflow.com/comment/39407732
type: AnsweredQuestion

http://stackoverflow.com/q/25295497
has title: jQuery.lazy() plugin not working on images loaded via AJAX
tagged with: ajax
possible better answer: http://stackoverflow.com/a/25295994
has answer: http://stackoverflow.com/a/25303677
has answer: http://stackoverflow.com/a/25295994
type: AnsweredQuestion
tagged with: lazy-loading
has body: The lazy plugin works fine for the initially loaded elements but doesn't work for images loaded via AJAX despite having the code in done function of the AJAX call. Here is my code for lazy loading images jQuery(document).ready(function() { jQuery("img.lazy").lazy({ effect: "fadeIn", effectTime: 1000 }); }); Here is my AJAX call $(document).ready(function() { $('#loadmore-dj').on('click', function() { $('#loadmore-dj').hide(); $('#loadmore-dj-gif').css( "display", "block"); $.ajax({ type: "GET", url: "/loadmore/dj/", data: { 'slug': $('.dj_slug').text().trim(), 'song_rank': $("#dj_song_list").find('.song_block').length }, }).done(function (response) { $(response).appendTo($('#dj_song_list')).hide().fadeIn(1000); playOneAudio(); jQuery(document).ready(function() { jQuery("img.lazy").lazy({ effect: "fadeIn", effectTime: 1000 }); }); $('#loadmore-dj').show(); $('#loadmore-dj-gif').hide(); }).done(hideLoadMore); }); });
has comment: http://stackoverflow.com/comment/39424249
tagged with: jquery-lazyload
type: Question
accepted answer: http://stackoverflow.com/a/25303677
tagged with: javascript
has comment: http://stackoverflow.com/comment/39424984
score: 0
answer count: 2
tagged with: jquery

http://stackoverflow.com/comment/39506226
has text: What's the problem if you are creating them dynamically? The jQuery .on() method will handle the event delegation for you, whether the element exists at page load or is created later.
type: Comment
comment on: http://stackoverflow.com/a/25313998
type: AnswerComment
score: 0

http://stackoverflow.com/q/25316902
has body: Although I've found a lot of information on this already from Stack, specifically here, I just want to be absolutely sure that there's no way to do this in Chrome and it can only be done in Internet Explorer. From Stack answers and my own testing I know there is no hope of using mailto with HTML in the body, so I'm attempting to use JavaScript so that upon the user performing some action, Outlook (or whatever their default email client is) will open with the body already populated with HTML. The catch is that our users use Chrome, not IE. I tested this code in IE and it actually worked, but unsurprisingly does not work in any other browser because the ActiveXObject is not supported. I think I already know the answer is a flat-out no, but it surprises me that there is no equivalent JavaScript for this in Chrome or other browsers.
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/39463157
type: AnsweredQuestion
has title: Open Outlook with HTML in body using Chrome
has answer: http://stackoverflow.com/a/25316986
has answer: http://stackoverflow.com/a/25888030
type: Question
tagged with: outlook
answer count: 2
linked to: http://stackoverflow.com/q/5620324
score: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/25888030
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25316986
has comment: http://stackoverflow.com/comment/39463055
has comment: http://stackoverflow.com/comment/39463036
upvote count: 2
linked to: http://stackoverflow.com/q/20509994

http://stackoverflow.com/a/25306506
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25306170
has comment: http://stackoverflow.com/comment/39502162
score: 1
has body: you will not get fdata by request.getParameter("fdata"). but you will get all form field values by request.getParameter("your form field name given for fields"). at client side : to send form data to servlet $.ajax({ url:'servlet', data: $("#form1").serialize(), success: function (data) { } }); at servlet : request.getParameter("your form field name given for form fields").
has comment: http://stackoverflow.com/comment/39808863

http://stackoverflow.com/a/25232222
has body: Wath about the Open XML https://www.youtube.com/watch?v=rMnEl6JZ7I8 and website developer http://openxmldeveloper.org/ . On the site you found sdk for: Open XML SDK for JavaScript: http://openxmldeveloper.org/wiki/w/wiki/open-xml-sdk-for-javascript.aspx. Demo: http://openxmldeveloper.org/blog/b/openxmldeveloper/p/openxmlsdkjs_demo.aspx Open XML and Java http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2006/11/21/openxmlandjava.aspx .Net Resources http://openxmldeveloper.org/resources/dotnet/m/cc/default.aspx
upvote count: 1
answers question: http://stackoverflow.com/q/25231724
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/q/25274930
upvote count: 9
has comment: http://stackoverflow.com/comment/39385589
has answer: http://stackoverflow.com/a/25352374
tagged with: node.js
tagged with: js-amd
has title: How to write a module that works with Node.js, RequireJS as well as without them
has answer: http://stackoverflow.com/a/39057861
tagged with: requirejs
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25275668
accepted answer: http://stackoverflow.com/a/25275668
tagged with: amd
score: 9
answer count: 3
downvote count: 0
tagged with: javascript
has body: I am working on a JavaScript library for JSON/XML processing. My library works in browser as well as Node.js (with xmldom and xmlhttprequest modules). One of the users recently asked for RequireJS support. I have taken a look at the RequireJS/AMD thing and think it is a good approach so I'd like to provide this. However I'd like to retain the portability: my library must work in browsers (with and without RequireJS) as well as Node.js. And in the browser environment I don't depend on xmldom or xmlhttprequest since these things are provided by the browser itself. My question is: how can I implement my library so that it works in browsers as well as in Node.js with an without RequireJS? A bit of historyand my current solution I initially wrote my library for browsers. So it just created a global-scope object and put everything inside it: var Jsonix = { ... }; Later on users asked for Node.js support. So I added: if(typeof require === 'function'){ module.exports.Jsonix = Jsonix; } I also had to import few modules mentioned above. I did it conditionally, depending on whether the require function is available or not: if (typeof require === 'function') { var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; return new XMLHttpRequest(); } Now there's this story with RequireJS. If RequireJS is present then the require function is present as well. But module loading works differently, I have to use the define function etc. I also can't just require things since require has an async API in RequireJS. Moreover, if my library is loaded via RequireJS, it seems to process the source code and detects require('something') even if I do it conditionally like if (typeof require === 'function' &amp;&amp; typeof require.specified !== 'function) ... RequireJS still detects require('xmlhttprequest') an tries to load the corresponding JS file. Currently I'm coming to the following solution. // Module factory function, AMD style var _jsonix = function(_jsonix_xmldom, _jsonix_xmlhtt…
possible better answer: http://stackoverflow.com/a/25352374
favorite count: 0

http://stackoverflow.com/comment/39446135
has text: Why would the alert show up when the button is clicked? You need to show your `loadData` function.
score: 0
comment on: http://stackoverflow.com/q/25307916
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39396874
type: QuestionComment
has text: Detect whether the `id` parameter is an array or a scalar, wrap it in an array in case of the second, then use `for` to loop over it.
score: 0
comment on: http://stackoverflow.com/q/25281519
type: Comment

http://stackoverflow.com/a/25250180
has body: This isn't going to be simple, since you are willing to rely on the ng-bind-html. Lets look at this first: transclude(scope, function(clone, scope){ panelCtrl.setBody($sce.trustAsHtml(clone.html())); }); The clone in the above function will contain a comment placeholder of a child panel directive like this: One Body This is because the child panel directive have transclude: 'element', and its link function hasn't been run yet. To fixed this is easy, just modify the code a bit: var clone = transclude(scope, function () {}); panelCtrl.setBody($sce.trustAsHtml(clone.html())); This way the clone will contain a real template like this: One Body {{panel.title}} Not so surprise, we now have a real template, but the bindings haven't happened yet, so we still can't use clone.html() at this time. And the real problem begin: How can we know when the bindings will be finished AFAIK, we can't know when exactly. But to workaround this we can use $timeout! By using $timeout, we are breaking a normal compilation cycle, so we have to find some way to let parent panel directive know that the binding of child directives have been finished (in $timeout). One way is using controllers for communication and the final code will look like this: app.controller('PanelCtrl', function($scope, $sce) { $scope.panel = { title: 'ttt', body: $sce.trustAsHtml('bbb'), } this.setTitle = function(title) { $scope.panel.title = title; }; this.setBody = function(body) { $scope.panel.body = body; }; var parentCtrl, onChildRenderedCallback, childCount = 0; this.onChildRendered = function(callback) { onChildRenderedCallback = function () { callback(); if (parentCtrl) { $timeout(parentCtrl.notify, 0); } }; if (!childCount) { $timeout(onChildRenderedCallback, 0); } }; this.notify = function() { childCount--; if (childCount === 0 && onChildRenderedCallback) { onChildRenderedCallback(); } }; this.addChild = function() { childCount++; }; this.setParent = function (value) { parentCtrl = value; parentCtrl.addChild(t…
score: 1
has comment: http://stackoverflow.com/comment/39508443
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25246317
has comment: http://stackoverflow.com/comment/39512011
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25246317
downvote count: 0
has comment: http://stackoverflow.com/comment/39510669
has comment: http://stackoverflow.com/comment/39508408
type: Answer

http://stackoverflow.com/q/25319035
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/25319136
tagged with: python
has body: I have a web app with several AJAX call and from them it draws realtime graphs from the call. And the problem is that everytime we connect to the page, it start over and draw and make calls from there. I want everybody to share the same state of the page, not each person reloading and getting different values. How do I limit the calls and share the same state for everyone?
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25319136
has comment: http://stackoverflow.com/comment/39467266
has title: AJAX and Javascript to display the same for everyone?
answer count: 1
tagged with: websocket
downvote count: 0
tagged with: javascript
tagged with: flask

http://stackoverflow.com/comment/39308047
score: 0
has text: No, it's my teacher from elementary school ;-)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25233545

http://stackoverflow.com/comment/39372325
type: Comment
has text: You can use `.on` instead of `.live`
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25268037

http://stackoverflow.com/a/25280730
answers question: http://stackoverflow.com/q/25280510
type: Answer
score: 2
downvote count: 0
has body: The attributes receiving null values, are their names of mixed case? If so could you try simple cased names?
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25280510

http://stackoverflow.com/comment/39447252
has text: Perhaps! your scrolling pixels changes with zoom in or out. May be you should try `$(window).scrollTop(element of your last position);`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25288279
score: 0

http://stackoverflow.com/comment/39575073
has text: in browser use F12 debugger and look in console tab for errors. maybe this will give you a hint
comment on: http://stackoverflow.com/q/25360605
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25382616
score: 0
type: Question
has comment: http://stackoverflow.com/comment/39584206
tagged with: javascript
tagged with: jquery
has body: I would like to load html from another html file as needed with the following code: App.MainView = Ember.View.extend({ template:function(){ $.ajax({ url: 'views/main.html', dataType: 'text', async: false, success: function (res) { returnnow(res); } }); function returnnow(res){ return Ember.Handlebars.compile(res); } } }); But it returns nothing.. Probably issued to the asynchronous character of ajax. I can't just wrap the View with an Ajax because I first want to load it when I call the view. Any Ideas how to perform this ?
has answer: http://stackoverflow.com/a/25382727
tagged with: ajax
has comment: http://stackoverflow.com/comment/39592078
has title: Ember load template on the fly with ajax
answer count: 1
type: UnansweredQuestion
tagged with: ember.js

http://stackoverflow.com/comment/39513891
comment on: http://stackoverflow.com/a/25298297
type: Comment
has text: Please read my answer. Just once, it will only take you a moment.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39636438
score: 0
has text: Have you tried closing everything but the terminal?
type: Comment
comment on: http://stackoverflow.com/q/25311965
type: QuestionComment

http://stackoverflow.com/comment/39631667
score: 0
type: AnswerComment
type: Comment
has text: @NikiErnst I have updated the jsfiddle and added an explanation to my answer. Sorry I missed the part about jQuery Mobile.
comment on: http://stackoverflow.com/a/25387740

http://stackoverflow.com/comment/39474530
type: QuestionComment
comment on: http://stackoverflow.com/q/25322416
score: 1
has text: `.live()` has been long deprecated. What's the issue with `.on()`?
type: Comment

http://stackoverflow.com/a/25238937
has body: managed to postpone OnClick event by setting FALSE as a return value and calling postback: "RUN SERVER PART": function () { $(this).dialog("close"); __doPostBack($("[id$=aspbt]")[0].name, ''); return true; } I don't really like this solution so maybe someone has a better one...
score: 0
answers question: http://stackoverflow.com/q/25237683
type: Answer

http://stackoverflow.com/comment/39418311
type: Comment
type: QuestionComment
has text: @Deduplicator yeah something like that. I am working on something and need to get the caret position on a textarea. But since the length is not properly read, I am stumped at accurately getting the position.
comment on: http://stackoverflow.com/q/25292855
score: 0

http://stackoverflow.com/a/25510107
type: Answer
type: AcceptedAnswer
score: 0
has body: What I believe I was looking for was a Web Service, such as, SOAP and REST. It would be useful to use AJAX embedded in a JSF component if I wanted to update that portion of the view. However, I merely need data from the server for a specific reason. So, it seems I can use a Web Service for this case. I can use the @path annotation in a singleton or stateless EJB to make it a REST URI endpoint. Then, in the Javascript code, I can access that URI endpoint through an AJAX call which will allow me to access a method and receive a response from the EJB.
accepted answer of: http://stackoverflow.com/q/25296507
answers question: http://stackoverflow.com/q/25296507

http://stackoverflow.com/a/25380815
answers question: http://stackoverflow.com/q/25380122
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/39583052
has comment: http://stackoverflow.com/comment/39582785
upvote count: 1
has body: You are missing the time paramater for animation, Try to add the timing for animation like below. setTimeout(function() { $('.aboutcontainer ').fadeIn({ queue: false, duration: 'slow' }); $(".aboutcontainer").animate({ marginTop: "115px", }, 750);//Look at here.. }, 2000 ); here is the jsfiddle, check it http://jsfiddle.net/ganeshgaxy/d6g1empb/
has comment: http://stackoverflow.com/comment/39583277
has comment: http://stackoverflow.com/comment/39582626
has comment: http://stackoverflow.com/comment/39582861
has comment: http://stackoverflow.com/comment/39582951
has comment: http://stackoverflow.com/comment/39583070
has comment: http://stackoverflow.com/comment/39582210
has comment: http://stackoverflow.com/comment/39582299
has comment: http://stackoverflow.com/comment/39582129
has comment: http://stackoverflow.com/comment/39583173
has comment: http://stackoverflow.com/comment/39582698
has comment: http://stackoverflow.com/comment/39583351
downvote count: 0
has comment: http://stackoverflow.com/comment/39583001
has comment: http://stackoverflow.com/comment/39583043

http://stackoverflow.com/q/25232066
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39305135
has answer: http://stackoverflow.com/a/25232098
type: UnansweredQuestion
tagged with: php
downvote count: 1
has title: Call a Specific PHP Function With AJAX
has comment: http://stackoverflow.com/comment/39304865
score: -1
has comment: http://stackoverflow.com/comment/39304877
type: Question
has body: I have a page that contains come html and php. When I use ajax to call it like so: $('form').submit(function (e) { e.preventDefault(); $.ajax({ type: 'POST', url: 'seocond.php', data: { a: 'a' }, success: function (msg) { alert(msg); } }); }); It runs the whole class (alerts everything in the class). I need it to just run one php function. (Keep in mind that there are a bunch of tags in this file as well. Also, is there a way that I can run some jquery code before the actual stuff in the php function is run? Thanks.
has answer: http://stackoverflow.com/a/25232122
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25303582
score: -1
favorite count: 0
type: UnansweredQuestion
tagged with: google-app-engine
has answer: http://stackoverflow.com/a/25305325
has body: I have set of previously obtained latitude &amp; longitude using GIS application for various places. What i have to do is... I want to show these obtained lat-long on map as marker from my current location to certain radius. Say if my current location is -33.8665433, 151.1956316 and radius 1000 then I want to show all obtained lat-long as marker falling in this range. This : https://google-developers.appspot.com/maps/documentation/javascript/examples/place-search helps for specific defined place type. I don't have predefined type. How to solve this? Thanks in Advance.
downvote count: 1
type: Question
tagged with: google-maps
upvote count: 0
answer count: 1
has title: How to do customer Lat-Long place search in radius using google map api?
tagged with: javascript

http://stackoverflow.com/q/25311066
score: 0
accepted answer: http://stackoverflow.com/a/25311208
answer count: 3
tagged with: node.js
has title: optional parameters in an async function
type: AnsweredQuestion
has body: How can I have optional parameters in an async function with callbacks? For example this is my call: func1(param1, param2, param3, param4, param5, param6, function(err, data) { . . . } and here I would like to have param5 and param6 optional; module.exports.func1= function(param1, param2, param3, param4, param5, param6, callback) { . . . } I guess the simple approach is to see whether they are undefined or not , if they are, we set the default value; is that the only way? Thanks
possible better answer: http://stackoverflow.com/a/25311146
has answer: http://stackoverflow.com/a/25311146
type: Question
has answer: http://stackoverflow.com/a/51872437
has answer: http://stackoverflow.com/a/25311208
tagged with: javascript

http://stackoverflow.com/q/25284901
tagged with: javascript
tagged with: controller
score: 0
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
has title: Maps in not displaying (angularJs directive, controller)
tagged with: directive
has answer: http://stackoverflow.com/a/28276580
has body: I m trying to create angular directive for highmaps. Below is my code var myMapDirectives = angular.module('MapDirectives', ['myMapControllers']); // Directive myMapDirectives.directive('myMap', function($http) { console.log("In my-Map directive"); return { restrict: 'EAC', template: '&lt;div&gt;&lt;/div&gt;', replace: true, controller: 'myMapController', scope: { widget: '=' }, link: function(scope, iElement, iAttrs) { console.log("In my-map link function.", scope, iElement, iAttrs); var chart; var process = function(){ var defaultOptions = { chart: { renderTo: iElement[0] }, }; var widget = angular.extend(defaultOptions, scope.widget); chart = new Highcharts.Map(widget); }; process(); scope.$watch("widget.series", function(loading){ process(); }); scope.$watch("widget.loading", function(loading){ if(!chart){ return; } if(loading){ chart.showLoading(); } else { chart.hideLoading(); } }); } }; }); The controller is bit large as I put all the JSON data in mapData attribute. Here my code is available Highmaps Directive &amp; Controller. The problem Map is not displaying. (I follow this link to create the directive Plunker )
type: Question
tagged with: highmaps

http://stackoverflow.com/comment/39361151
comment on: http://stackoverflow.com/q/25262120
score: 0
type: Comment
type: QuestionComment
has text: You'll need to stick it inside one of the callbacks.

http://stackoverflow.com/q/25303870
has title: unable to use event.preventDefault() with chrome
tagged with: javascript
has comment: http://stackoverflow.com/comment/39439631
answer count: 2
upvote count: 1
favorite count: 0
type: UnansweredQuestion
has body: I am using ctrl + charCode**s in order to delete a row from the listing page which is working fine on firefox but when I tested it on **Chrome, the event.preventDefault() couldn't stop the browser based function to come up function showkey(e){ if(e.ctrlKey &amp;&amp; e.charCode == 100){ e.preventDefault(); //delete code // } &lt;body onkeypress="showkey(event);"&gt;
tagged with: ctrl
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/13429178
type: Question
has answer: http://stackoverflow.com/a/25304430
has answer: http://stackoverflow.com/a/25304245

http://stackoverflow.com/a/25280252
score: 0
has body: You probably want to evaluate some javascript (that has access to the window object as if you were in the browser) with casper.evaluate casper.evaluate(function() { document.querySelectorAll('[data-value="2014"]')[0].click(); });
type: Answer
has comment: http://stackoverflow.com/comment/39394861
has comment: http://stackoverflow.com/comment/39395696
answers question: http://stackoverflow.com/q/25279827
has comment: http://stackoverflow.com/comment/39395408

http://stackoverflow.com/a/25343594
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25343560
score: 2
has body: APP.myvar is property of APP object. There is no need to initialize it in a way post proposes as by default it's value is equal to 'undefined'. BUT if you want to initialize APP.myvar with 'null' value, do it in this way APP.myvar = null
answers question: http://stackoverflow.com/q/25343560
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39472574
has text: in js fiddle as you can see , I have loaded the jQuery 1.11.0 , is the alert coming ? ? what about fire bug console ? ? is it showing the values of the name value ( console.log($name);) & if you are satisfied with the answer please rate it .. thanks
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25321487
type: Comment

http://stackoverflow.com/q/25294839
answer count: 2
has body: I have a formula that's stored as text. I get this value from a div, but for the purpose of this question I will simply assign the value manually. price_formula = "100.00 + (pages-24)/4 * 25.00" Now my aim is to replace pages with a numeric value and then do the Math on this formula and output the result. Here's what I've tried: price_formula = "150.00 + (pages-24)/2 * 30.00"; price_formula = price_formula.replace('pages', 32); alert(price_formula); // outputs "150.00 + (32-24)/2 * 30.00)" alert(Math.floor(price_formula)); // outputs "NaN" How can I use the price_formula string as an actual formula?
has comment: http://stackoverflow.com/comment/39422564
has comment: http://stackoverflow.com/comment/39422287
has comment: http://stackoverflow.com/comment/39422340
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25295158
favorite count: 0
linked to: http://stackoverflow.com/q/19603097
upvote count: 1
has title: using text as formula and replacing variables
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25294891
accepted answer: http://stackoverflow.com/a/25295158
has answer: http://stackoverflow.com/a/25294891
downvote count: 1
type: Question

http://stackoverflow.com/comment/66396652
has text: @MichaelScheper sure, but this doesn't actually respond to changes in the element's width, it only checks the size when it mounts. I'll simplify my answer by recommending a great library for this...
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/30019559
score: 0

http://stackoverflow.com/q/25265288
tagged with: lawnchair
has body: I am using Firefox version 32.0 and Chrome version 36.0. I want to use Lawnchair for a client side, persistent json data store. I created an HTML to try it out, as follows:- my osim app When I am opening this HTML file (located on IIS development server) in both of the browsers, it shows count 1 and increases it when refreshed. But, on closing and reopening of the browser, it starts the counter from 1 again. I want to use this data, not only in the file which created it, but also in other files hosted on same domain / subdomain. Can anybody please tell me how can I have a persistent client side data store?
type: Question
tagged with: javascript
score: 0
has title: Lawnchair-0.6.1 js: Data not persisting between closing and reopening of browser
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39367627
answer count: 0
has comment: http://stackoverflow.com/comment/39367503

http://stackoverflow.com/comment/39460237
comment on: http://stackoverflow.com/q/25315464
type: QuestionComment
type: Comment
has text: The problem is *probably* in not using `jQuery.ready` and attempting to bind to elements that do not exist yet.. however, without a *minimal* reproduction test-case on http://jsfiddle.net or similar, I am closing due to only providing enough information for conjecture.
score: 1

http://stackoverflow.com/comment/39550670
has text: On the right side of the column, or in between the columns?
comment on: http://stackoverflow.com/q/25364901
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25307916
has answer: http://stackoverflow.com/a/25308149
has comment: http://stackoverflow.com/comment/39446169
accepted answer: http://stackoverflow.com/a/25358438
possible better answer: http://stackoverflow.com/a/25308149
has body: I am parsing JSON data to add into a table and I need to implement pagination. To sort the data, the header elements must be buttons. The code runs fine except the sorting portion. The buttons are not generating any event. Can anyone tell me what I'm doing wrong ? Adding Buttons for ( var x in res) { for ( var y in res[x]) { tableData += "&lt;td&gt;"; tableData += "&lt;input type=\"button\" value=\"" + y + "\" onclick=\"loadData(" + y + ")\" /&gt;"; tableData += "&lt;/td&gt;"; alert(tableData); } break; } loadData function function loadData(modi) { var xhr = getXMLHttpRequest(); xhr.open("GET", "DbServlet?modifyQ=" + modi, true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.send(null); xhr.onreadystatechange = function() { if (xhr.readyState == 4 &amp;&amp; xhr.status == 200) { res = JSON.parse(xhr.responseText); paginate(res); } } };
has comment: http://stackoverflow.com/comment/39446132
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39446356
has comment: http://stackoverflow.com/comment/39446135
type: Question
has answer: http://stackoverflow.com/a/25358438
has comment: http://stackoverflow.com/comment/39446564
tagged with: javascript
tagged with: servlets
score: 0
has title: dynamic button not clicking in JS
answer count: 2
has comment: http://stackoverflow.com/comment/39446349
has comment: http://stackoverflow.com/comment/39446512
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39481021
has text: That will have absolutely no effect on performance.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25326536
score: 0

http://stackoverflow.com/q/25291906
downvote count: 1
has answer: http://stackoverflow.com/a/25291976
type: Question
tagged with: javascript
score: -1
possible better answer: http://stackoverflow.com/a/25291965
answer count: 3
has answer: http://stackoverflow.com/a/25291965
has comment: http://stackoverflow.com/comment/42681646
upvote count: 0
has title: jQuery Dynamically Sized margins 2
accepted answer: http://stackoverflow.com/a/25291976
tagged with: jquery
favorite count: 0
has body: I'm working on dynamically resizing vertical margins with jQuery and I'm wonder if if how I can resolve a problem that causes the margins to resize only once when the page loads. /* PAGE SIZE */ $(document).ready(function(){ var WIDTH = $(window).width(); if(WIDTH &gt; 1420){ $("ul#menu-content-1.menu").css("margin-top","59px"); $("div.menu-content-container").css("margin-top","59px") } else if(WIDTH &lt; 1420) { $("ul#menu-content-1.menu").css("margin-top","-59px"); $("div.menu-content-container").css("margin-top","-59px"); } }); This is my existing code. How can I fix this recurring problem so that each time the page loads and the window is resized, the margins will adjust?
has answer: http://stackoverflow.com/a/25292005
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: margin
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/9828831

http://stackoverflow.com/q/25366281
has title: Why set value to true using !0
tagged with: javascript
tagged with: logic
accepted answer: http://stackoverflow.com/a/25366341
answer count: 1
has comment: http://stackoverflow.com/comment/39553440
has comment: http://stackoverflow.com/comment/39553202
has body: I've recently seen some script in which a property is being set to true using the following. someProp: !0 I understand that this will evaluate to true, but don't understand why someone would set a property in this way. Is there a reason?
has comment: http://stackoverflow.com/comment/39553273
favorite count: 0
has comment: http://stackoverflow.com/comment/39553402
has answer: http://stackoverflow.com/a/25366341
has comment: http://stackoverflow.com/comment/39553307
upvote count: 1
has comment: http://stackoverflow.com/comment/39553356
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39553391
has comment: http://stackoverflow.com/comment/39553201
type: Question
tagged with: boolean
has comment: http://stackoverflow.com/comment/39553960
downvote count: 0
has comment: http://stackoverflow.com/comment/39553244

http://stackoverflow.com/q/25232017
has answer: http://stackoverflow.com/a/25232118
accepted answer: http://stackoverflow.com/a/25232118
type: AnsweredQuestion
has body: My below code seems ok, but I am trying to figure out why my alert is showing as false: $.each(result, function(i,items) { alert($(this).parent().closest("#associated_order_chosen .chosen-drop ul").hasClass('chosen-results')); $(this).parent().find("#associated_order_chosen ul.chosen-results").append(" " + items.orderunique + " "); //$select.append($(" ").val(items.orderID).text(items.orderunique)); }); }); I tried using jQuery's find(), but every time it is returning me false. Am I doing something wrong? Please let me know. #associated_order_chosen is the main div Update #1 here is the HTML Code Please choose one
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39304743
answer count: 1
tagged with: jquery
has title: alert showing false even the class exists
has comment: http://stackoverflow.com/comment/39304814
has comment: http://stackoverflow.com/comment/39304749

http://stackoverflow.com/comment/39449536
type: Comment
comment on: http://stackoverflow.com/a/25309669
has text: You are right, perhaps he should check for 0 instead. I'll update my answer.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25238475
type: Question
tagged with: highcharts
has comment: http://stackoverflow.com/comment/39319281
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39317515
accepted answer: http://stackoverflow.com/a/25240703
has comment: http://stackoverflow.com/comment/39319288
answer count: 1
has comment: http://stackoverflow.com/comment/39319514
has comment: http://stackoverflow.com/comment/39317406
favorite count: 0
has comment: http://stackoverflow.com/comment/39317604
upvote count: 2
has body: I'm using highcharts to plot chart for series, time on xAxis and numbers on yAxis. The code I'm using is: $(function () { $('#container').highcharts({ chart: { type: 'spline' }, title: { text: 'Alert# ' + s[0] + '' }, subtitle: { text: 'Start Date: ' + s[3] + " End Date: " + s[4] + "(" + s[5] + ")" }, xAxis: { type: 'datetime', dateTimeLabelFormats: { // don't display the dummy year month: '%e. %b', year: '%b', day: '%d' }, title: { text: 'Time' }, }, yAxis: { title: { text: 'Alert Size' }, min: 0, }, tooltip: { headerFormat: '{series.name} ', pointFormat: '{point.x:%e. %b}: {point.y:.2f}' }, series: [{ name: 'Point', // Define the data points. All series have a dummy year // of 1970/71 in order to be compared on the same x axis. Note // that in JavaScript, months start at 0 for January, 1 for February etc. data: [ [1441293135000, 50], [1441293195000, 100], [1441293255000, 150], [1441293315000, 250], [1441293375000, 50] ] }] }); }); This code works fine on chrome, but on mozilla firefox does not work, it gives me the error: uncaught exception: Highcharts error #19: www.highcharts.com/errors/19 Any help?
has comment: http://stackoverflow.com/comment/39317826
has comment: http://stackoverflow.com/comment/39317328
score: 2
type: AnsweredQuestion
has title: High charts error #19
has answer: http://stackoverflow.com/a/25240703

ember.js
tags question: http://stackoverflow.com/q/25295258
tags question: http://stackoverflow.com/q/25315864
tags question: http://stackoverflow.com/q/25341382
tags question: http://stackoverflow.com/q/25252059
tags question: http://stackoverflow.com/q/25379577
tags question: http://stackoverflow.com/q/25239066
tags question: http://stackoverflow.com/q/25334448
tags question: http://stackoverflow.com/q/25374642
tags question: http://stackoverflow.com/q/25341082
tags question: http://stackoverflow.com/q/25305591
tags question: http://stackoverflow.com/q/25330338
tags question: http://stackoverflow.com/q/25289026
tags question: http://stackoverflow.com/q/25389620
tags question: http://stackoverflow.com/q/25320985
tags question: http://stackoverflow.com/q/25387634
tags question: http://stackoverflow.com/q/25373798
tags question: http://stackoverflow.com/q/25325164
tags question: http://stackoverflow.com/q/25311885
tags question: http://stackoverflow.com/q/25369566
type: Tag
tags question: http://stackoverflow.com/q/25308038
tags question: http://stackoverflow.com/q/25276371
tags question: http://stackoverflow.com/q/25233259
tags question: http://stackoverflow.com/q/25329051
tags question: http://stackoverflow.com/q/25273323
tag name: ember.js
tags question: http://stackoverflow.com/q/25246565
tags question: http://stackoverflow.com/q/25322770
tags question: http://stackoverflow.com/q/25333730
tags question: http://stackoverflow.com/q/25248010
tags question: http://stackoverflow.com/q/25386216
tags question: http://stackoverflow.com/q/25288154
tags question: http://stackoverflow.com/q/25333535
tags question: http://stackoverflow.com/q/25375759
tags question: http://stackoverflow.com/q/25382955
tags question: http://stackoverflow.com/q/25282920
tags question: http://stackoverflow.com/q/25348731
tags question: http://stackoverflow.com/q/25292210
tags question: http://stackoverflow.com/q/25311708
tags question: http://stackoverflow.com/q/25304545
tags question: http://stackoverflow.com/q/25245049
tags question: http://stackoverflow.com/q/25302363
tags question: http://stackoverflow.com/q/25318128
tags question: http://stackoverflow.com/q/25330987
tags question: http://stackoverflow.com/q/25360412
tags question: http://stackoverflow.com/q/25382616
tags question: http://stackoverflow.com/q/25371577
tags question: http://stackoverflow.com/q/25264629
tags question: http://stackoverflow.com/q/25254562
tags question: http://stackoverflow.com/q/25260946
tags question: http://stackoverflow.com/q/25386166
tags question: http://stackoverflow.com/q/25290332
tags question: http://stackoverflow.com/q/25286056
tags question: http://stackoverflow.com/q/25337564
tags question: http://stackoverflow.com/q/25335170
tags question: http://stackoverflow.com/q/25311778
tags question: http://stackoverflow.com/q/25374714
tags question: http://stackoverflow.com/q/25367012
tags question: http://stackoverflow.com/q/25292080
tags question: http://stackoverflow.com/q/25292980
tags question: http://stackoverflow.com/q/25262472
tags question: http://stackoverflow.com/q/25324888
tags question: http://stackoverflow.com/q/25256793

http://stackoverflow.com/comment/39387548
score: 0
has text: Thanks. The best answer would be a reference to an authoritative document (PEP, something Guido said, popular reference book).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25276251

http://stackoverflow.com/a/25296405
type: Answer
score: 1
downvote count: 1
has body: You didn't need $parent If you're not in a child scope, (ala ng-repeat), you don't need the $parent: app.controller('MainCtrl', function($scope) { $scope.answers = { gender: 'Female' }; }); HTML &lt;div ng-controller="MainCtrl"&gt; &lt;input type="radio" value="Female" ng-model="answers.gender"/&gt; &lt;input type="radio" value="Male" ng-model="answers.gender"/&gt; &lt;/div&gt; When to use $parent Given your example shows ng-model="$parent.gender", it looks like you think you need to get gender from the parent scope, this is only really necessary in an ng-repeat, which creates a child scope. You might find this when you create a list of radio buttons with a repeater: JS: app.controller('MainCtrl', function($scope) { $scope.radioItems = ['Male', 'Female', 'Other']; $scope.answers = { gender: 'Female', }; }); HTML: &lt;div ng-repeat="radioItem in radioItems"&gt; &lt;input type="radio" value="radioItem" ng-model="$parent.answers.gender"/&gt; &lt;/div&gt; EDIT: More detailed explanation of what's going on.
answers question: http://stackoverflow.com/q/25296320
upvote count: 2

http://stackoverflow.com/q/25264726
has answer: http://stackoverflow.com/a/38881554
linked to: http://stackoverflow.com/q/10355747
linked to: http://stackoverflow.com/q/24501497
linked to: http://stackoverflow.com/q/4616694
type: Question
has answer: http://stackoverflow.com/a/45779152
has answer: http://stackoverflow.com/a/75001430
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/53946778
has answer: http://stackoverflow.com/a/25264860
linked to: http://stackoverflow.com/q/5963669
possible better answer: http://stackoverflow.com/a/54111114
has answer: http://stackoverflow.com/a/25265071
score: 42
answer count: 13
has body: I have the following HTML content: test When I call the following JavaScript code: $('#test1').trigger('click'); The onclick event is triggered twice, while I expect it to just trigger once. Because jQuery should look up in the DOM tree and find only one onclick. I do not have control of the span, it is generated in a third party tool. I do have control over the button and his parameters. You can find a JSFiddle example here: http://jsfiddle.net/Voga/v4100zke/ I do not know the contents of the onclick listener of the span. This is also generated by the third-party tool. I want the click trigger to execute this onclick like it does now, but only once.
has answer: http://stackoverflow.com/a/76583760
has answer: http://stackoverflow.com/a/25264804
accepted answer: http://stackoverflow.com/a/25264804
has answer: http://stackoverflow.com/a/54111114
has comment: http://stackoverflow.com/comment/39366007
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25265422
has answer: http://stackoverflow.com/a/25265004
has comment: http://stackoverflow.com/comment/39366114
has title: Why is the onClick event triggered twice?
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/79006888
upvote count: 42
has answer: http://stackoverflow.com/a/25264919
has comment: http://stackoverflow.com/comment/39366179
has comment: http://stackoverflow.com/comment/86509797
downvote count: 0

http://stackoverflow.com/q/25356576
accepted answer: http://stackoverflow.com/a/25356752
favorite count: 0
type: Question
tagged with: twitter-bootstrap
answer count: 2
has comment: http://stackoverflow.com/comment/39535129
upvote count: 3
has comment: http://stackoverflow.com/comment/39535097
has title: Verify if checkbox checked property is not empty using JavaScript
has answer: http://stackoverflow.com/a/25356752
has comment: http://stackoverflow.com/comment/39535498
has answer: http://stackoverflow.com/a/25356699
has comment: http://stackoverflow.com/comment/39535105
downvote count: 0
tagged with: javascript
has body: I want to verify the checkboxes checked property. If any of them is not checked, display this sentence in span: "you should select one of them" and when I choose one of them, the message must disappear. &lt;form method="get"action="#" onsubmit="return vali();"&gt; &lt;span id="textspan" style="color:red"&gt;&lt;/span&gt; &lt;input type="checkbox" class='gender' id="male"&gt;male &lt;input type="checkbox" class='gender' id="female"&gt;female &lt;input type="submit" class="validate" value="send" /&gt; &lt;/form&gt; function vali() { var bool = true; var checkedCount = $('input[class="gender"]:checked').length; if (checkedCount == 0) { $("#textspan").html('select one of them'); bool = false; } if(checkedCount &gt;= 1) { $("#textspan").html(''); bool = true; } return bool; }
possible better answer: http://stackoverflow.com/a/25356699
type: AnsweredQuestion
score: 3
tagged with: jquery

http://stackoverflow.com/comment/39397992
comment on: http://stackoverflow.com/a/25281424
has text: No; the page _must_ initiate a connection. If you need to send a response to a message, you can use `sendResponse`; if you need full two-way communication, the iframe should open a port with `chrome.runtime.connect`. See the messaging docs I linked.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/25291595
upvote count: 7
type: AcceptedAnswer
has body: .map works its way through the jQuery object's array-like list of checkboxes, creating a similar jQuery array-like object with your [1,2,3] within it. So the trick is to add the chained get() right at the end, then you will successfully call it once map() has completed building your list of IDs: var searchIDs = $('input:checked').map(function(){ return $(this).val(); }).get(); eg http://jsfiddle.net/sifriday/3k7oy3dq/
accepted answer of: http://stackoverflow.com/q/25291504
answers question: http://stackoverflow.com/q/25291504
type: Answer
downvote count: 0
score: 7

http://stackoverflow.com/comment/39602535
has text: @phpete Tried `jsonp` ? Compose file as callback function , i.e.g., `mod({"ProductPage":{}})` (file names `mod-1` , or `product-mod`) . Before `DOM` ready , before call to `$.getScript()` - `var mod = fn(mods) {}; var Pages = {}` (save fetched data until all `mods` fetched). Fetch each file with `$.getScript()` or `$.getJSON()` . `var mods = ["mod-1.json", "mod-1.json"]` , `$.each(mods, fn(){})` (add to `Pages`). When complete , all fetched data held in , accessible at `Pages` object.
type: QuestionComment
comment on: http://stackoverflow.com/q/25369145
score: 0
type: Comment

http://stackoverflow.com/comment/39569045
score: 0
type: Comment
type: QuestionComment
has text: I'm sorry but I'm not really familiar with Javascript. That's why I'm asking for help if there's a way to convert my original code to do it.
comment on: http://stackoverflow.com/q/25374239

http://stackoverflow.com/comment/39438357
comment on: http://stackoverflow.com/q/25303637
score: 0
type: QuestionComment
type: Comment
has text: "however since the masonry elements are absolutely positioned the relative container won’t contain them" - false. Absolute positioning refers to closest relative positioned parent.

http://stackoverflow.com/a/25263995
downvote count: 0
has comment: http://stackoverflow.com/comment/127027825
answers question: http://stackoverflow.com/q/25263948
has body: Don't. The browser does that for you. Simply have a name="contact" attribute and the browser will scroll down to that element automatically. for instance: The contact form is below ...
type: Answer
score: 4
upvote count: 4
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25263948

http://stackoverflow.com/comment/39503540
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25338047
has text: Although I still wholeheartedly recommend that you didn't support IE9 and below. PCs today are shipped with IE11 by defaut, and supporting IE8 means technical baggage that will get out of hand eventually. Check the browser usage statistics in your area and make an educated decision. Don't arbitrarily decide that you have to support IE. And if the client still wants it, charge more.

http://stackoverflow.com/a/25381035
answers question: http://stackoverflow.com/q/25380734
type: Answer
has comment: http://stackoverflow.com/comment/39581570
downvote count: 1
has body: it's one of the direcive use cases, see the "Creating Directives that Communicate" section. https://docs.angularjs.org/guide/directive
score: -1
has comment: http://stackoverflow.com/comment/39581107
upvote count: 0

http://stackoverflow.com/q/25308486
has comment: http://stackoverflow.com/comment/39447278
score: 5
answer count: 3
tagged with: webrtc
downvote count: 0
tagged with: getusermedia
favorite count: 0
has comment: http://stackoverflow.com/comment/39449268
has body: In my application a user can make calls if he can produce an audio stream. So, I need to require access to the microphone (audio stream). Without it the application should throw an error. Video is optional. So, I call navigator.getUserMedia and put constraints like this: { audio: true, video: false } And it throws an error when a microphone is not present, just like I need. But a side effect from this is that if the user also has access to a camera, video is not present in stream. But if I set both audio and video to true I would have an error in cases when users have a microphone but do not have access to a camera (which is ok according to my application logic) How I can make a video stream optional get getUserMedia?
has answer: http://stackoverflow.com/a/33770858
has answer: http://stackoverflow.com/a/25310108
type: AnsweredQuestion
has title: Make video stream Optional in getUserMedia
possible better answer: http://stackoverflow.com/a/33770858
has comment: http://stackoverflow.com/comment/39449325
has answer: http://stackoverflow.com/a/71406210
linked to: http://stackoverflow.com/q/30047056
type: Question
accepted answer: http://stackoverflow.com/a/25310108
upvote count: 5
tagged with: javascript

http://stackoverflow.com/a/25306481
answers question: http://stackoverflow.com/q/25306451
upvote count: 1
type: Answer
downvote count: 0
has body: Try checkDateFormat(this.value) instead.
score: 1

http://stackoverflow.com/comment/39598038
score: 0
has text: @JanDvorak how can I do that? I've been trying to create a connection using javascript in asp tag without any luck, can you help on this one?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25387250

http://stackoverflow.com/q/25243050
score: 1
has comment: http://stackoverflow.com/comment/39326866
upvote count: 1
has title: Is possible to use this angularJS html attribute: ng-include="{{...}}"?
type: Question
has answer: http://stackoverflow.com/a/25246416
tagged with: javascript
has comment: http://stackoverflow.com/comment/39327009
has body: i'm working on a small project that should load posts in a webpage. I think that I could do that fast using the angular ng-repeat to create the posts and then use ng-include to load the post formatted content, which is a small HTML page. Here is the code: {{post.title}} //here is the problem {{post.createdOn}} {{post.author}} I import the content for the title, the date and the author from a JSON, and it works. When I load the page, I see that the html page that should load is missing. I'll store the main text of a post in a folder called "posts", and inside this, there will be the posts. So I looked at the rendered page for the issue, and I saw that AngularJS seems commenting what can't load: I saw in fact . So my question is: how can I tell AngularJS to read from a HTML tag attribute the result of {{ }}?
possible better answer: http://stackoverflow.com/a/31509928
answer count: 3
has answer: http://stackoverflow.com/a/31509928
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
accepted answer: http://stackoverflow.com/a/25246416
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39325818
has comment: http://stackoverflow.com/comment/39327104
has answer: http://stackoverflow.com/a/25245829
has comment: http://stackoverflow.com/comment/39326688
type: AnsweredQuestion

http://stackoverflow.com/comment/39568596
type: Comment
has text: @Yaje it just shows this: _here to find out more about this error._, it stops showing the rest of the page.
score: 0
comment on: http://stackoverflow.com/q/25374034
type: QuestionComment

http://stackoverflow.com/q/25283571
has body: I am currently building a web app where I need to randomly generate text content and switch its color every time a button is clicked. At the moment, I'm trying to add some kind of animation to it, and here's what I'd like to obtain each time the button is clicked: The random class is added The div pops up from the bottom of the page with its opacity increasing I prepared a simplified JSFiddle to illustrate my point below. Example http://jsfiddle.net/cdacx0tn/11/ var color = ["blue", "purple", "green"]; $("#try-me").click(function() { var colorClass = color[Math.floor(Math.random()*color.length)]; $("#content") .removeClass() .addClass(colorClass) .animate({ "margin-top": "50px", "opacity": "1" }, 700); }); I managed to get this done when the button is clicked once but I can't figure out how to do this each time it is clicked. I want to add that I'm not a professional developper so please be indulgent. Thanks for your help.
accepted answer: http://stackoverflow.com/a/25283639
upvote count: 1
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/25283722
type: Question
has answer: http://stackoverflow.com/a/25283722
tagged with: jquery-animate
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25283639
has title: jQuery animate on click multiple times
answer count: 3
has answer: http://stackoverflow.com/a/25283631
favorite count: 0

http://stackoverflow.com/a/25301416
answers question: http://stackoverflow.com/q/25301368
type: Answer
has body: You can simply use .prepend(): Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. $('#myDiv').prepend(newContent)
score: 0

http://stackoverflow.com/q/25351695
has comment: http://stackoverflow.com/comment/39526381
has comment: http://stackoverflow.com/comment/39526367
tagged with: node.js
type: UnansweredQuestion
upvote count: 1
has title: Node's module.exports and IIFE confusion
type: Question
score: 1
has body: I'm been playing around with node and Javascript IIFE and I'm a bit confused with node's modules.exports and how IIFE works in Javascript. (function (Calculator) { var calculator = function () { var currentValue = 0, add = function (num) { return currentValue += num; }; return { current: currentValue, add: add }; }(); module.exports = calculator; }(module.exports)); The above code caused my tests to pass when I used the line module.exports = calculator; to export the module. How come when I use to the parameter Calculator = calculator (note the case) causes my tests to all fail? I thought Calculator (the parameter) refers to module.exports (the value that gets passed in? In short: Calculator = calculator; // Does NOT work module.exports = calculator; // Does work
downvote count: 0
has comment: http://stackoverflow.com/comment/39526368
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39526468
favorite count: 0
has answer: http://stackoverflow.com/a/30441006
tagged with: iife

http://stackoverflow.com/comment/39581515
has text: I tried but its not working, friend. Says undefined variable myvar and also i am returning something else too from that action which i commented out for this but can you tell me if returning both of them as array will work? its for when myvar problem is solved.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25380988
type: Comment

http://stackoverflow.com/q/25289943
has comment: http://stackoverflow.com/comment/39412828
has title: calling C functions in javascript
tagged with: javascript
tagged with: http://stackoverflow.com/tag/c
score: 0
tagged with: client-server
upvote count: 1
answer count: 1
tagged with: client-side
tagged with: server-side
favorite count: 0
has comment: http://stackoverflow.com/comment/39412867
has comment: http://stackoverflow.com/comment/39413482
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25291369
accepted answer: http://stackoverflow.com/a/25291369
has body: I'm using javascript to run a server. I want to call c function on the server side. How can I call it? I googled, most of the time there is info on how to use AJAX and .net to call the function. The c function is alread build and saved in some location on the PC. I wanted to call this C function from the javascript on the server side Anyone has any info regardin this? many many thanks. Regards Vish
downvote count: 1
type: Question

http://stackoverflow.com/comment/39459071
type: QuestionComment
has text: http://jsfiddle.net/adeneo/e2pptuno/ <- you need to compare agains `true`
score: 0
comment on: http://stackoverflow.com/q/25314740
type: Comment

cytoscape-web
type: Tag
tags question: http://stackoverflow.com/q/25268356
tag name: cytoscape-web

http://stackoverflow.com/a/25290208
score: 1
has body: You're trying to remove content from "rightDiv" when it's empty, so you're getting an error. The code to do that should probably look like: while (rightDiv.firstChild) rightDiv.removeChild(rightDiv.firstChild); Always check the developer console when code doesn't seem to work as you expect.
has comment: http://stackoverflow.com/comment/39413166
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39413396
has comment: http://stackoverflow.com/comment/39413220
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25290017
answers question: http://stackoverflow.com/q/25290017

http://stackoverflow.com/comment/39455304
comment on: http://stackoverflow.com/q/25312747
score: 0
type: QuestionComment
has text: @dystory text() also same result
type: Comment

http://stackoverflow.com/q/25277023
has comment: http://stackoverflow.com/comment/100529550
possible better answer: http://stackoverflow.com/a/56997896
tagged with: line
has answer: http://stackoverflow.com/a/56997896
type: AnsweredQuestion
upvote count: 9
has comment: http://stackoverflow.com/comment/39388919
score: 9
type: Question
has title: Complete Solution for Drawing 1 Pixel Line on HTML5 Canvas
has answer: http://stackoverflow.com/a/25279040
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39388963
favorite count: 0
linked to: http://stackoverflow.com/q/24669578
tagged with: html5-canvas
has comment: http://stackoverflow.com/comment/39388909
accepted answer: http://stackoverflow.com/a/25279040
has body: Draw 1 pixel line on HTML5 canvas is always problematic.(Refer to http://jsbin.com/voqubexu/1/edit?js,output) The approach to draw a vertical/horizontal line is x+0.5, y+0.5 ( Refer to Canvas line behaviour when 0 &lt; lineWidth &lt; 1). To do this globally, ctx.translate(0.5, 0.5); would be a good idea. However, when it comes to diagonal lines, this method does not work. It always give a 2 pixel line. Is there a way to stop this browser behavior? If not, is there a package that can provide a solution to this problem?

http://stackoverflow.com/q/25291050
has body: Just want to display following information which I got from my controller via ajax call: {"results":{"name":"Bob","city":"Ottawa","reg_date":"12-Feb-2004"}} Here is my controller: $data["results"] = $this-&gt;my_model-&gt;did_get_data($user_id); echo json_encode($data); Here is My view: &lt;div id="display"&gt;&lt;/div&gt; Here is my JS file: $.get('controller/get_data', function (data) { $( "#display").text(data.results); //??? }, "json");
score: 1
has comment: http://stackoverflow.com/comment/39414817
downvote count: 1
has comment: http://stackoverflow.com/comment/39414701
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25291246
has comment: http://stackoverflow.com/comment/39414929
tagged with: javascript
answer count: 3
has comment: http://stackoverflow.com/comment/39414912
tagged with: jquery
has answer: http://stackoverflow.com/a/25291288
has title: cannot display the data got via ajax call
favorite count: 0
has comment: http://stackoverflow.com/comment/39414810
has comment: http://stackoverflow.com/comment/39414833
has comment: http://stackoverflow.com/comment/39414706
has answer: http://stackoverflow.com/a/25291246
possible better answer: http://stackoverflow.com/a/25291240
has answer: http://stackoverflow.com/a/25291240
upvote count: 2

http://stackoverflow.com/q/25292728
tagged with: mirth
type: AnsweredQuestion
tagged with: java
has comment: http://stackoverflow.com/comment/39417713
has answer: http://stackoverflow.com/a/25292762
type: Question
score: 0
has title: pass java object from javascript to java
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25292762
has comment: http://stackoverflow.com/comment/39417823
has body: Is it possible to pass objects created in Javascript to java? for example I have a POJO called myPojo with propertys name and address The object is created in Javascript: var myPojo = new Packages.CreatePOJO(); myPojo.setName("Alpha"); Then I pass it to a java function var replacer = new Packages.VelocityReplace(); replacer.replace("a template", myPojo); The replacer class is this. public class VelocityReplace { public static String replace(String templateStr, Object in) throws Exception { ... } The exception generated is: Wrapped java.lang.ClassCastException: org.mozilla.javascript.NativeObject cannot be cast to CreatePOJO I am using Mirth Connect which is a real time interfacing engine that is providing &amp; pushing the data to the myPojo object. It uses javascript for scripting, this is why I need to push the data from javascript to java.

http://stackoverflow.com/comment/39332195
has text: @RocketHazmat: Afair, prototype properties (even if enumerable) are not displayed there?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25246201
type: QuestionComment

http://stackoverflow.com/a/25381380
upvote count: 2
type: AcceptedAnswer
type: Answer
has body: You can use delete operartor: delete myMainObj['subObjB']; or delete myMainObj.subObjB;
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25381355
answers question: http://stackoverflow.com/q/25381355

http://stackoverflow.com/q/25317620
upvote count: 1
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25317717
type: Question
has body: I'm having trouble understanding the ng-show angular directive, it is not working correctly for me. I can't get the boolean value to change in the controller like some examples I've seen online. Rather than use the tabs javascript I decided to try and implement a simple angular show and hide for the tabs. However I have checked many examples on the web and I can't find out what is going wrong. Nothing is showing up at all from the divs. Titles Contacts Writers Files Companies Titles Contacts Writers Files Companies and my JS side MPWAdminControllers.controller("ExtractionTabsCtrl",["$scope", function($scope){ $scope.writersdiv=false; $scope.contactsdiv=false; $scope.filesdiv=false; $scope.titlesdiv=true; $scope.companiesdiv=false; $('#contacts a').click(function (e) { e.preventDefault() $(this).tab('show') $scope.writersdiv=false; $scope.contactsdiv=true; $scope.filesdiv=false; $scope.titlesdiv=false; $scope.companiesdiv=false; }) $('#writers a').click(function (e) { e.preventDefault() $(this).tab('show') $scope.writersdiv=true; $scope.contactsdiv=false; $scope.filesdiv=false; $scope.titlesdiv=false; $scope.companiesdiv=false; }) $('#files a').click(function (e) { e.preventDefault() $(this).tab('show') $scope.writersdiv=false; $scope.contactsdiv=false; $scope.filesdiv=true; $scope.titlesdiv=false; $scope.companiesdiv=false; }) $('#companies a').click(function (e) { e.preventDefault() $(this).tab('show') $scope.writersdiv=false; $scope.contactsdiv=false; $scope.filesdiv=false; $scope.titlesdiv=false; $scope.companiesdiv=true; }) $('#titles a').click(function (e) { e.preventDefault() $(this).tab('show') $scope.writersdiv=false; $scope.contactsdiv=false; $scope.filesdiv=false; $scope.titlesdiv=true; $scope.companiesdiv=false; }) }]); Simply Trying to flip the show value on each div whenever a tab is selected. I have a feeling it might have to do with mixing jquery and angular but Im not sure. Thanks James
answer count: 2
has title: Angular/Bootstrap: ng-hide not working properly
downvote count: 0
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25317692
tagged with: angularjs
has answer: http://stackoverflow.com/a/25317692
has answer: http://stackoverflow.com/a/25317717
tagged with: twitter-bootstrap
score: 1

http://stackoverflow.com/comment/39502045
has text: Try to change the order of including the js files, include jquery js first and then jquery mobile's related js.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25337374

http://stackoverflow.com/comment/39586630
comment on: http://stackoverflow.com/q/25383614
score: 0
has text: @Andrius: No. That callback likely is not called until long after the rest of that function has finished executing.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39496547
score: 0
type: Comment
type: QuestionComment
has text: There's not really enough here to tell what is going wrong. What is loadGame supposed to do?
comment on: http://stackoverflow.com/q/25334001

http://stackoverflow.com/a/25296229
has body: Maybe you can postpone redirect with zero timeout and give a chance to error handler if any exists to set flag on error object that error was handled: var interceptor = ['$q', '$timeout', function ($q, $timeout) { function error(rejection) { return $q.reject(rejection).finally(function () { $timeout(function () { if (rejection.errorHandled === true) { alert('all is under control'); } else { alert("Houston we've got problems"); } }, 0); //zero timeout to execute function after all handlers in chain completed }); } return { 'responseError': error }; }]; var exampleOne = $resource('/path').save(objectOne); exampleOne.$promise.then(function (success) { }, function(error) { error.errorHandled = true; });
has comment: http://stackoverflow.com/comment/39425046
has comment: http://stackoverflow.com/comment/39424899
type: Answer
has comment: http://stackoverflow.com/comment/39425496
has comment: http://stackoverflow.com/comment/39425166
has comment: http://stackoverflow.com/comment/39425200
has comment: http://stackoverflow.com/comment/39425010
score: 0
answers question: http://stackoverflow.com/q/25294023

http://stackoverflow.com/comment/39408869
comment on: http://stackoverflow.com/a/25264394
score: 6
type: AnswerComment
has text: @Davor Honestly, I *highly doubt* that people who actually have trouble with tremors/shaky hands would use a *touch device*, unless they wanted to intentionally drive themselves mad.
type: Comment

http://stackoverflow.com/comment/39306765
type: Comment
has text: That's pretty epic, considering that the RegExp does what a 40~ line code barely does. Could you just explain why do you have quotes in the square brackets?
comment on: http://stackoverflow.com/a/25232888
score: 0
type: AnswerComment

http://stackoverflow.com/a/25303626
downvote count: 0
type: Answer
score: 1
has body: You have to pass this in showRowInfo(this) , onclick="showRowInfo(this);" function showRowInfo(elm) { alert($(elm).closest("tr").find("td:lt(2)").text()); } DEMO
upvote count: 1
answers question: http://stackoverflow.com/q/25303556

http://stackoverflow.com/a/25259087
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25255772
has body: Your mistake is not reading the answer you are following. It defines the regexp as a regexp literal /^[\r\n ]+$/, you define your regexp from a string literal. The difference is the need to escape \. For your case you should write \\r\\n. However, you might still get in trouble depending on how you handle the matches. This is because \r\n matches two seperate characters. A carriage return and a line feed - this is a legacy from the days of the typewriter. An actual newline can, depending on the system, be represented as carriage return followed by a line feed, line feed followed by a carriage return, or just a line feed.

http://stackoverflow.com/a/25277274
has comment: http://stackoverflow.com/comment/39389567
answers question: http://stackoverflow.com/q/25277215
has comment: http://stackoverflow.com/comment/39389300
downvote count: 1
accepted answer of: http://stackoverflow.com/q/25277215
upvote count: 0
score: -1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39389399
has body: You should load your script at the bottom of the page, it is a better practice, that way it loads after the page. Also, if you are using HTML5, you should no longer have to declare the script type. &lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;!-- your content --&gt; &lt;script&gt; function disableOption(){ console.log("hello"); } disableOption(); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
has comment: http://stackoverflow.com/comment/39389285
type: Answer

http://stackoverflow.com/comment/39437390
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25302904
has text: I think the content encoding is only applied to the HTTP packages content, see [HTTP compression](http://en.wikipedia.org/wiki/HTTP_compression). From my understanding, it doesn't decrompress a whole file after receiving.

http://stackoverflow.com/q/25355181
upvote count: 10
type: Question
downvote count: 0
score: 10
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25355266
tagged with: jquery
has title: Bootstrap table not working correctly on Chrome but works fine on Firefox
has answer: http://stackoverflow.com/a/25356090
favorite count: 0
has answer: http://stackoverflow.com/a/25355298
has answer: http://stackoverflow.com/a/59557498
possible better answer: http://stackoverflow.com/a/25355298
tagged with: css
answer count: 4
has answer: http://stackoverflow.com/a/25355266
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
has body: I've made a table that's inside a modal using Twitter Bootstrap 3. The weird thing is that it works fine on Firefox and jsFiddle but not on Google Chrome. &lt;button class="btn btn-xs btn-default" data-toggle="modal" data-target="#competitor_modal"&gt; Competitor &lt;/button&gt; &lt;div class="modal fade" id="competitor_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal"&gt; &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt; &lt;span class="sr-only"&gt;Close&lt;/span&gt; &lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;Competitors&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;div class="container-fluid"&gt; &lt;div class="row"&gt; &lt;div class="col-lg-12"&gt; &lt;div class="table-responsive"&gt; &lt;table class="table table-bordered"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;ID&lt;/th&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;URL&lt;/th&gt; &lt;th&gt;Final Price&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;1&lt;/td&gt; &lt;td&gt;Comp Link&lt;/td&gt; &lt;td&gt;http://www.complink.com.ph/product_info.php?cPath=49_9&amp;amp;products_id=7371&lt;/td&gt; &lt;td&gt;2790.00&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;2&lt;/td&gt; &lt;td&gt;Gigahertz&lt;/td&gt; &lt;td&gt;http://www.gigahertz.com.ph/products/accessories/headset/a4tech-hs-105&lt;/td&gt; &lt;td&gt;8695.00&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;3&lt;/td&gt; &lt;td&gt;SM Cyber Zone&lt;/td&gt; &lt;td&gt;http://www.smcyberzone.com/products/mobile-phones/acer/acer-liquid-s1&lt;/td&gt; &lt;td&gt;9800.00&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt; &lt;/div&gt; &lt;/d…

http://stackoverflow.com/q/25367778
tagged with: css
score: 0
has comment: http://stackoverflow.com/comment/39556438
answer count: 1
has answer: http://stackoverflow.com/a/25368119
has body: I want to embed a dropdown div in a wrapper div that has 0 height, so that it takes no space whether or not it is shown, and when it is shown, it overlays the contents placed below. Suppose that dropdown element is a div with content Foo. I did something like: HTML Foo CSS .dropdown_wrapper{ height: 0; overflow: visible; } And through Javascript, I switched the #dropdown_content's style between display: block and display: none. When it is the former, I expect the content to be shown, but it is actually not shown, hidden within the wrapper div that has 0 height. How can this be fixed?
accepted answer: http://stackoverflow.com/a/25368119
tagged with: javascript
has title: Overlapping dropdown
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
type: Question

http://stackoverflow.com/comment/54052064
type: Comment
has text: and how did you add that ?
score: 2
comment on: http://stackoverflow.com/a/25370903
type: AnswerComment

http://stackoverflow.com/a/25371198
type: Answer
score: 0
has body: You could try to make a SPA so you have 11 views and then you could use the same localstorage and go saving along.
answers question: http://stackoverflow.com/q/25369707

http://stackoverflow.com/comment/39443524
type: Comment
score: 0
has text: EDIT: Ignore what I just said ^^ It's working now - I needed the firstname via $GET etc that is where my problems had been lying. Thank you for your help. I'm glad I have a sure fire way of getting it to work - I'm still going to look in to JQUERY/AJAX to expand my knowledge
type: AnswerComment
comment on: http://stackoverflow.com/a/25305159

http://stackoverflow.com/comment/39567313
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25373360
has text: You shouldn't be using Javascript to generate the PDF as it can't. Also you need to take into account the text sizes, what font is being used etc. There are plenty of server-side routines that will generate a pdf file from a server-side generated table or html.
score: 0

http://stackoverflow.com/a/49062513
downvote count: 0
score: 1
has body: I think the question is about Cucumber.js 1.3x, which is pretty old. In Cucumber.js 3.x, there is no AfterStep hook, instead, there is a function called "setDefinitionFunctionWrapper", which can wrap a step definition, which you have chance to get the step defintion return result and manipulate it. Here is the documentation on setDefinitionFunctionWrapper
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25252516
type: Answer
accepted answer of: http://stackoverflow.com/q/25252516

http://stackoverflow.com/comment/55980128
has text: @Alok Hi, I did this a year ago, for company i don't work for any more. Sorry.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25400224
type: AnswerComment

http://stackoverflow.com/q/25255528
favorite count: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25255761
downvote count: 0
accepted answer: http://stackoverflow.com/a/25255787
has title: Positioning div off-screen to the right using jQuery
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25255787
score: 1
has body: Strictly using JavaScript, I'd like to position the following div element right outside the window, to the right, so that no horizontal scrollbar is present. How do I do this? HTML: Welcome! I was thinking something like $( "#content" ).offset({ left: 1345}); but that unfortunately results in a scrollbar, and it isn't responsive, causing the div to be located far outside the right edge of the window when in mobile view.
has answer: http://stackoverflow.com/a/25255642
type: Question
upvote count: 1
possible better answer: http://stackoverflow.com/a/25255642
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25321988
has answer: http://stackoverflow.com/a/25322012
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25322004
has title: Node JS go to next FOR cycle
tagged with: break
has answer: http://stackoverflow.com/a/25322014
accepted answer: http://stackoverflow.com/a/25322014
tagged with: node.js
type: AnsweredQuestion
has body: I just want to bypass item 3, not break the loop. for (var i = 1; i&lt;= 9; i++) { if (i==3) break; console.log(i); } Was very unfortunate hunting an answer on Google because I don't really know the magic keywords/technical designation. Expected result: 1 2 4 5 6 7 8 9 Update: Would like to do the same with a .forEach
type: Question
tagged with: for-loop
possible better answer: http://stackoverflow.com/a/25322004
tagged with: javascript

http://stackoverflow.com/q/25263566
accepted answer: http://stackoverflow.com/a/25264849
upvote count: 1
tagged with: node.js
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25264049
has comment: http://stackoverflow.com/comment/39363892
has answer: http://stackoverflow.com/a/25264976
has answer: http://stackoverflow.com/a/25264049
type: Question
has body: I am using ajax post requests for doing paging on a feed in my site. When getting the post request data I am reforming the page by clearing previous data and rendering the new data that came from the request. I want to be able to change the URL as well so saving the new page link will get the user to the current page. Example: User on page example.com/feed - seeing content of page #1 User clicking to get to page #2 -> ajax post is send and data on the page is changed using js (no refresh) URL is still example.com/feed but the content is of example.com/feed?page=2 How can I set the URL to point to the new page without triggering a refresh (no redirect) ? I am using Nodejs + express.
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
has answer: http://stackoverflow.com/a/25264557
has title: How to change URL path when paging using ajax + jQuery
has answer: http://stackoverflow.com/a/25264849
favorite count: 0
tagged with: ajax
answer count: 4

http://stackoverflow.com/comment/39368614
has text: The problem is that this is not required unless someone selects the Task Type right above it. Since adding a task is optional, I don't want to disable Save unless the user begins to create a task and just hasn't finished. I'm not sure if that makes sense.
comment on: http://stackoverflow.com/a/25266004
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25375355
has comment: http://stackoverflow.com/comment/39572291
has comment: http://stackoverflow.com/comment/39571095
has body: The correct way would be to just check for the feature, as you've mentioned, and never do browser sniffing at all. function stop() { if ('execCommand' in document) { document.execCommand('Stop'); }else{ window.stop() } } To do it the other way around, you could just polyfill window.stop with execCommand, like this if (! ( typeof window.stop == 'function' &amp;&amp; window.stop.toString().indexOf('native code') != -1 ) ) { window.stop = function () { document.execCommand('Stop'); } } That would also make sure it's the native method, and is tested in Chrome, Firefox and Opera
has comment: http://stackoverflow.com/comment/39571890
score: 5
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25375318
has comment: http://stackoverflow.com/comment/39571067
has comment: http://stackoverflow.com/comment/39571125
answers question: http://stackoverflow.com/q/25375318
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39571590
has comment: http://stackoverflow.com/comment/39571093
has comment: http://stackoverflow.com/comment/39572119
has comment: http://stackoverflow.com/comment/39574111
has comment: http://stackoverflow.com/comment/39571061
has comment: http://stackoverflow.com/comment/39571405
has comment: http://stackoverflow.com/comment/39571049
type: Answer
has comment: http://stackoverflow.com/comment/39574174
has comment: http://stackoverflow.com/comment/39571062
has comment: http://stackoverflow.com/comment/39571140
has comment: http://stackoverflow.com/comment/39571263

http://stackoverflow.com/comment/39341734
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25250329
has text: You will need to put it on your web service instead of the application then.
score: 0

http://stackoverflow.com/comment/39420776
comment on: http://stackoverflow.com/a/25289568
score: 0
type: Comment
type: AnswerComment
has text: Maybe be more clear about what you're trying to accomplish. Plan out your interactions and specify, in detail, what the intended effect is. Going forward, its a really good idea to show some attempts prior to asking a formal question on SO. Even if its way off base, it will help folks understand what you are up to. You mention spending hours on this - so... what have tried?

http://stackoverflow.com/q/25276989
tagged with: javascript
tagged with: gruntjs
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/25278232
favorite count: 0
has title: How to overwrite grunt task options in grunt-cli?
type: AnsweredQuestion
score: 2
upvote count: 2
has body: I am using grunt-contrib-concat and I have a simple concat task / config like below concat: { options: { sourceMap: true }, vendor: { src:['lib/**/*.js'], dest: 'dist/scripts/vendor.js' }, app: { src:['app/**/*.js'], dest: 'dist/scripts/app.js' } } So when I am running above task through console I would like to be able to specify enable / disable sourceMap generation. Source map generation can take forever. I tried below but none worked. grunt concat:vendor --sourceMap=false grunt concat --sourceMap=false Thanks.
has answer: http://stackoverflow.com/a/25278232
type: Question
tagged with: grunt-contrib-concat

http://stackoverflow.com/comment/39493194
has text: It depends to which manufacturer you are uploading to. It is possible that they offer an API to upload directly to them. Would you mind telling us who those "manufacturers" are?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25332692

http://stackoverflow.com/a/25337004
has comment: http://stackoverflow.com/comment/39545679
accepted answer of: http://stackoverflow.com/q/25335829
upvote count: 2
answers question: http://stackoverflow.com/q/25335829
has body: First, Add this debounce function from Underscore // debounce is taken from _underscore.js function debounce(func, wait, immediate) { var timeout, args, context, timestamp, result; return function() { context = this; args = arguments; timestamp = new Date(); var later = function() { var last = (new Date()) - timestamp; if (last &lt; wait) { timeout = setTimeout(later, wait - last); } else { timeout = null; if (!immediate) result = func.apply(context, args); } }; var callNow = immediate &amp;&amp; !timeout; if (!timeout) { timeout = setTimeout(later, wait); } if (callNow) result = func.apply(context, args); return result; }; } Start the requestAnimationFrame loop when the user begins scrolling and kill it 100 milliseconds after the last scroll event using a flag. var requesting = false; var killRequesting = debounce(function () { requesting = false; }, 100); function onScroll() { if (!requesting) { requesting = true; requestAnimationFrame(parallax); } killRequesting(); } Now in your parallax function check the flag before calling itself again. function parallax() { // your parallax code if (requesting) { requestAnimationFrame(parallax); } } Second, you should always cache your jQuery selectors. var $prlx1 = jQ('.prlx-1'); var $prlx2 = jQ('.prlx-2'); function parallax(){ var prlx_effect_1= +(window.pageYOffset *.55).toFixed(2); // .55 for slow | .7 good for fast var prlx_str_1 = "translate3d(0, "+prlx_effect_1+"px, 0)"; $prlx1.css({ "transform":prlx_str_1, "-ms-transform":prlx_str_1, "-webkit-transform":prlx_str_1 }); var prlx_effect_2= -(window.pageYOffset *.25 ).toFixed(2); // .2 for slow | .4 good for fast var prlx_str_2 = "translate3d(0, "+prlx_effect_2+"px, 0)"; $prlx2.css({ "transform":prlx_str_2, "-ms-transform":prlx_str_2, "-webkit-transform":prlx_str_2 }); if (requesting) { window.requestAnimationFrame(parallax); } }
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39542974
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/a/25255072
answers question: http://stackoverflow.com/q/25253204
type: Answer
score: 0
has body: You have all the data, maybe you can use ng-csv to export csv file. Here is example. sfiddle html: Export {{sample}} Export javascript : angular.module('csv', ['ngCsv']); function Main($scope) { $scope.sample = "Sample"; $scope.getArray = [{a: 1, b:2}, {a:3, b:4}]; }

http://stackoverflow.com/comment/39397391
has text: If I understand correctly, there is already a callback, but the calculateDistances() function is asynchronous in your example, so the code in place of "code to work with the calculatedistances() result here" will get run before the results are returned, this way you handle code when the result comes in.
type: Comment
comment on: http://stackoverflow.com/a/25281434
score: 0
type: AnswerComment

http://stackoverflow.com/a/49831124
has comment: http://stackoverflow.com/comment/89301120
type: Answer
answers question: http://stackoverflow.com/q/25314019
has body: I got it working by doing this: expect(element(by.css('css')).isPresent()).toBeFalsy();
score: 16
upvote count: 16
downvote count: 0

http://stackoverflow.com/comment/114717181
has text: Saved my life!! Thanks
comment on: http://stackoverflow.com/a/25327265
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39428075
comment on: http://stackoverflow.com/q/25297428
type: Comment
type: QuestionComment
has text: That appears to work (safari on osx): [jsFiddle](http://jsfiddle.net/083aj343/) - `Total (Including Tax): 61.2`
score: 0

http://stackoverflow.com/q/25351646
tagged with: setfocus
has answer: http://stackoverflow.com/a/25351732
has answer: http://stackoverflow.com/a/34185269
has comment: http://stackoverflow.com/comment/39526320
type: Question
has body: I do not think this exact question has an answer anywhere else. I have a page with a couple of input fields, and lots of ajax activity for various things. It is an online POS interface. When any of the ajax actions are performed, ususally by a button click, it is desired to always return focus to the main barcode input field. Whilst this can be done by always calling $('#fieldid').focus() after any of these actions, I was wondering if there was a way of specifying that this field should always have focus after any action. There are other input fields where you need to type a name or something so obviously it cannot just set a timer and set focus on timeout as you would need to allow time for typing. One option would be to have a timer always running to do it, and constantly reset it when typing. This seems to perhaps be sensible as these fields do have live search on typing associated with them. Maybe I have answered my own question here, but any better way of doing it would bt greatly appreciated.
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39526297
score: 0
has title: Always return focus to a specific input field
answer count: 3
has answer: http://stackoverflow.com/a/52220771
type: UnansweredQuestion

http://stackoverflow.com/comment/39351100
comment on: http://stackoverflow.com/q/25256274
score: 0
type: Comment
type: QuestionComment
has text: so in short, you can do `somefile = new file();`

http://stackoverflow.com/comment/39548987
comment on: http://stackoverflow.com/a/25330563
type: Comment
score: 0
type: AnswerComment
has text: not that I am aware of. However you could create your own function that took in a tag and returned the first node. Then reuse that function where you see fit

http://stackoverflow.com/comment/39752893
type: QuestionComment
has text: @daveͤͮͣͩ Yeah, and it works smoothly. but all i need is to append this data to the URL without reloading the page
comment on: http://stackoverflow.com/q/25368734
score: 0
type: Comment

http://stackoverflow.com/q/25285659
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25286077
tagged with: angularjs
type: AnsweredQuestion
has body: Let's suppose this custom directive mentioned in myHtml.tpl.html: &lt;my-directive&gt;&lt;/my-directive&gt; This directive is initialized with an isolated scope. Of course, I have a controller behind myHtml.tpl.html. I want to communicate a computed array from the isolated scope to the controller's scope. I could have: &lt;my-directive arrayToCompute="arrayToCompute"&gt;&lt;/my-directive&gt; My isolated scope (in directive) being: scope: {arrayToCompute: "="} and my controller declaring this initially empty array: $scope.arrayToCompute = []; However, it seems pretty.....ugly.. What is a good alternative? (I'm pointing out that I don't want to remove the scope isolation of the directive).
upvote count: 1
has title: isolated scope / Good way to communicate an array to the directive caller
tagged with: angularjs-scope
downvote count: 1
accepted answer: http://stackoverflow.com/a/25286077
type: Question
tagged with: angularjs-directive
linked to: http://stackoverflow.com/q/17900201
tagged with: javascript
has comment: http://stackoverflow.com/comment/39405202
score: 0
has comment: http://stackoverflow.com/comment/39404921

http://stackoverflow.com/comment/39376730
comment on: http://stackoverflow.com/q/25266114
score: 0
type: Comment
type: QuestionComment
has text: I remember [this blog post](http://blog.fogcreek.com/we-spent-a-week-making-trello-boards-load-extremely-fast-heres-how-we-did-it/) from one of the guys working at Trello, where they improved the performance for boards with hundreds of cards (the example they use was a page rendering a board with 996 cards). In the end they divided the cards in chunks and render one chunk at a time.

http://stackoverflow.com/comment/39464164
score: 0
type: Comment
type: QuestionComment
has text: Are alert($("item").last().children("foo")); and alert($("item").last().children("bar")); not working?
comment on: http://stackoverflow.com/q/25317449

http://stackoverflow.com/a/25345103
type: Answer
answers question: http://stackoverflow.com/q/25344683
upvote count: 4
type: AcceptedAnswer
score: 4
has body: document.querySelector(".eclass_list") in the getClasses function will only return the first element that has this class, not as an array but as an element. So the subsequent Array.prototype.map call on a DOM element will fail, because a DOM element doesn't have a length property and cannot be interpreted as an array. Since there is an exception (SyntaxError: Illegal return statement in Chrome) inside the page context, the return value will be null. What you want is document.querySelectorAll(".eclass_list"). If you would have added the remote.message and page.error events, you would have seen the problem.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25344683

charts
tags question: http://stackoverflow.com/q/25279639
tags question: http://stackoverflow.com/q/25305683
tags question: http://stackoverflow.com/q/25290868
tags question: http://stackoverflow.com/q/25249431
tags question: http://stackoverflow.com/q/25378479
type: Tag
tags question: http://stackoverflow.com/q/25349545
tags question: http://stackoverflow.com/q/25231812
tags question: http://stackoverflow.com/q/25252724
tags question: http://stackoverflow.com/q/25247450
tags question: http://stackoverflow.com/q/25285376
tags question: http://stackoverflow.com/q/25313273
tags question: http://stackoverflow.com/q/25361096
tags question: http://stackoverflow.com/q/25358383
tags question: http://stackoverflow.com/q/25271105
tag name: charts
tags question: http://stackoverflow.com/q/25367054
tags question: http://stackoverflow.com/q/25263512
tags question: http://stackoverflow.com/q/25316432

http://stackoverflow.com/q/25323110
has answer: http://stackoverflow.com/a/25323658
tagged with: javascript
tagged with: number-formatting
linked to: http://stackoverflow.com/q/3753483
linked to: http://stackoverflow.com/q/958908
answer count: 2
has title: Number format with regex javascript
favorite count: 0
tagged with: regex
possible better answer: http://stackoverflow.com/a/25323187
has body: I have a number is 1205000000, I want display at 1.205.000.000 number.toString().replace(/(\d{3})/g, "$1.").toString() but result is 120.500.000.0 I don't want reverse a number.
type: AnsweredQuestion
upvote count: 2
duplicate of: http://stackoverflow.com/q/3753483
accepted answer: http://stackoverflow.com/a/25323658
score: 1
has answer: http://stackoverflow.com/a/25323187
downvote count: 1
type: Question

http://stackoverflow.com/comment/39452188
type: Comment
has text: @m.e.conroy Actually I just found a very simply way to do this, please inform me if this is bad coding. **first tr** `ng-click="showDetails = ! showDetails"` **second tr** `ng-show="showDetails"`. Thats it.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25310631

http://stackoverflow.com/q/25312134
tagged with: performance
downvote count: 0
linked to: http://stackoverflow.com/q/19579035
has body: We're building an Angular app, and we're trying to figure out how to get some benchmarks on how long it takes to render various pages. I've read about performance.timing here, but that seems to only be useful with non-single page applications as when I navigate to new views in our app, the timing numbers do not change. Ideally, we'd be able to insert some code that gets render time for various views and posts it our our Big Query service. Any ideas on how to get some timing information for views in an Angular app? EDIT: More specifically, you go to a route which loads a big ng-repeat list (which is not optimal for performance), and the window has a long delay before it actually renders the items in the list. We'd like to see how long it takes to go from the big blank view to rendering the items in the list.
has comment: http://stackoverflow.com/comment/39454859
type: Question
tagged with: javascript
score: 15
favorite count: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/44771395
has answer: http://stackoverflow.com/a/30211446
tagged with: performance-testing
has answer: http://stackoverflow.com/a/44771395
upvote count: 15
has comment: http://stackoverflow.com/comment/39454754
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39456674
linked to: http://stackoverflow.com/q/313893
has title: How to test rendering speed in Angular
has comment: http://stackoverflow.com/comment/39454836
has comment: http://stackoverflow.com/comment/39454447
has answer: http://stackoverflow.com/a/25314861
accepted answer: http://stackoverflow.com/a/25314861
type: AnsweredQuestion

http://stackoverflow.com/comment/39530441
has text: That's a cool solution. Thanks. Can I alternatively ACL the user object on the client side so that only the authenticated user can get and set its user object? The other reason I like client side ACL is that it makes me feel uncomfortable to expose the user table to the world. People can do a lot of interesting things with it. I just don't know if there's some problem with ACL'ing the user table as I proposed.
type: Comment
comment on: http://stackoverflow.com/a/25353912
score: 0
type: AnswerComment

http://stackoverflow.com/q/25233323
tagged with: cordova
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25267556
tagged with: php
answer count: 4
has answer: http://stackoverflow.com/a/25234734
has body: I want to build an app with php, ajax and phonegap via the following ways: All the client files in the app will be coded with ajax and html while the server side will be in php hosted online. My question is will php session works with phonegap and ajax since the client files will be on phone which makes connections call to php files on server. Will session works from one page to another
has title: building an app with Phonegap,ajax and php
has answer: http://stackoverflow.com/a/25268133
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25233567
score: 0
tagged with: ajax

http://stackoverflow.com/q/25284271
type: AnsweredQuestion
score: -2
has comment: http://stackoverflow.com/comment/39401953
type: Question
has answer: http://stackoverflow.com/a/25284367
has comment: http://stackoverflow.com/comment/39401990
accepted answer: http://stackoverflow.com/a/25284367
answer count: 2
has answer: http://stackoverflow.com/a/25284436
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39402026
has body: <?php $j=1; ?> Sl No Item Current Quantity Procuring Quantity Updated Quantity <?php $res=$_POST['supply']; $result=explode("&",$res); for($i=0;$i<count($result);$i++){ ?> <?php $name=$result[$i]; $query=mysql_query("select * from item where item_name='$name'"); $row=mysql_fetch_array($query); ?> <?php echo $j;?> <input type="text" name="name[]" id="contact_name" required="required" class="form-control" value="<?php echo $result[$i]; ?>" readonly> <input type="text" name="current[]" required="required" class="form-control" value="<?php echo $row['item_qua'];?>"> <?php $j++; } ?> I want to subtract Procuring Quantity by Current Quantity.I want result in Updated Quantity. (Current Quantity - Procuring Quantity= Updated Quantity).
downvote count: 3
possible better answer: http://stackoverflow.com/a/25284436
upvote count: 1
tagged with: php
has title: subtract two values using jquery / javascript

http://stackoverflow.com/a/25349228
upvote count: 1
answers question: http://stackoverflow.com/q/25348950
type: Answer
has comment: http://stackoverflow.com/comment/39522330
has body: $sdChilds = $( "#sd" ).children(); if (($sdChilds.first().attr('article') == 'start') &amp;&amp; ($sdChilds.last().attr('article') == 'end')){ alert('Yes, first and last tags are Start and End'); }else{ alert('No, first and last tags are not Start and End'); } var prevArticle = '*'; var prevArticleCon = '*'; var i = 0; var j = 0; $("p, dc_title" ).each(function(){ if (($(this).attr('article') == prevArticle) &amp;&amp; (prevArticle != null)){ i++; } if (($(this).attr('article_con') == prevArticleCon) &amp;&amp; (prevArticleCon != null)){ j++; } prevArticle = $(this).attr('article'); prevArticleCon = $(this).attr('article_con'); }); if (i &gt; 0){ alert('Yes, you have '+ i + ' extra element with same article attribute'); } if (j &gt; 0){ alert('Yes, you have '+ j + ' extra element with same article_con attribute'); } Check this JSFiddle Demo You can change the HTML code and check if it's works as you want or not. Try to add or remove start and end tags and add or remove tags with repeated attributes and check the code.
downvote count: 0
score: 1

http://stackoverflow.com/q/25354652
has title: Creating many random arrays for use as elements in another array
answer count: 3
has answer: http://stackoverflow.com/a/25354689
has comment: http://stackoverflow.com/comment/39531820
has comment: http://stackoverflow.com/comment/39531687
has comment: http://stackoverflow.com/comment/39531707
type: UnansweredQuestion
has body: Consider: var main = [] Now I want to generate many (289 to be exact) Arrays to be elements in the main one. Each of these arrays will have be like: var subobject = {x:"A", y:"B", terrain:"C", note:"D"} Generating the values are no problem, and I can easily put those values in a already defined subobject = {} and push(), but I can't figure out how to iterate a script each time which creates a new object and then push() into var main. The naming of the subobject is unimportant, I'm looking for solution inwhich I can pull specific information such as: main[0].x // get x value of the subarray in 0 location in main main[5].note// get note value of the subarray in 5 location in main (would it make a difference if every array had the same name? since I would never access subobject directly (after being pushed into main), but through main[X].YYY or would it have to be via main[X].subarray[Y] ?)
tagged with: loops
has answer: http://stackoverflow.com/a/25354875
has comment: http://stackoverflow.com/comment/39531862
has comment: http://stackoverflow.com/comment/39531670
has answer: http://stackoverflow.com/a/25354808
has comment: http://stackoverflow.com/comment/39531735
type: Question
has comment: http://stackoverflow.com/comment/39531849
tagged with: arrays
has comment: http://stackoverflow.com/comment/39531763
tagged with: javascript
tagged with: variables
tagged with: jquery
has comment: http://stackoverflow.com/comment/39531756
score: 0

http://stackoverflow.com/q/25298894
has comment: http://stackoverflow.com/comment/39429825
has body: I have been trying for hours to link my scripts to a joomla index.php file. I have a project where code works, but when I reuse that code, it's dead fish. Here's how I'm trying to link to the external .js files that are in my templates/mytemplate/scripts folder. &lt;script src="&lt;?php echo $this-&gt;baseurl ?&gt;/templates/&lt;?php echo $this-&gt;template;?&gt;/scripts/contentload.js"&gt;&lt;/script&gt; I know Joomla has another way of linking external scripts but I'm not sure how to use them: http://docs.joomla.org/Adding_JavaScript Here's my website that I'm trying to have scripts run on: toggle visibility of "Details" here: http://dgm3740.inkedkeyboard.com/final/index.php/party-packages# And mobile menu should unfold. Everything worked until loaded to Joomla.
accepted answer: http://stackoverflow.com/a/25298983
has comment: http://stackoverflow.com/comment/39429820
tagged with: joomla
has comment: http://stackoverflow.com/comment/39429776
upvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25298983
has title: Cannot link .js files to Joomla. Wrong path?
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/39324263
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25241056
has text: Good Luck I even suggest you before start coding : Plan, Design Web Pattern. it will make your web-app even more powerful and more stable.

http://stackoverflow.com/comment/39377474
type: QuestionComment
comment on: http://stackoverflow.com/q/25270793
has text: @misterManSam I could, but that's loading more than I need to. Some users won't resize their browser for the duration of their time on the site.
score: 0
type: Comment

http://stackoverflow.com/comment/39432119
type: QuestionComment
has text: I'm not positive, but I think it will look something like `sendKeys(protractor.key.CONTROL + 'a')`
score: 0
comment on: http://stackoverflow.com/q/25300034
type: Comment

http://stackoverflow.com/comment/39594462
score: 0
type: Comment
type: QuestionComment
has text: You said you want `required` to "depend on a response from remote"... but you never said what response. `remote` only passes validation when the response is `true`... that is the only condition for passing. ANY other response will trigger a validation message. So if `remote` fails validation, it doesn't even matter if the field is required or not.
comment on: http://stackoverflow.com/q/25386613

http://stackoverflow.com/a/25317641
answers question: http://stackoverflow.com/q/25317449
accepted answer of: http://stackoverflow.com/q/25317449
score: 1
has body: If the xml is valid (the sample you pasted is not) you could use something like this var xml = '<?xml version="1.0"?> foo! bar! foo2! bar2! '; var $item = $(xml).find('item:last'); alert($item.find('foo').text()); alert($item.find('bar').text()); DEMO
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/25316365
answers question: http://stackoverflow.com/q/25315442
has comment: http://stackoverflow.com/comment/39482897
has body: It looks like you are using WebForms, if that´s the case you must send the data in a different way. Here is a tutorial, please take a look and let me know if that helps: http://www.bennadel.com/blog/2615-posting-form-data-with-http-in-angularjs.htm
score: 0
type: Answer

http://stackoverflow.com/q/25320624
downvote count: 1
accepted answer: http://stackoverflow.com/a/25320681
tagged with: variables
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25320681
tagged with: css
possible better answer: http://stackoverflow.com/a/25320710
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39470021
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25320710
has comment: http://stackoverflow.com/comment/39469951
score: 0
answer count: 2
has body: Hi Im having trouble using a variable inside my nth child Jquery code. I've tried it many times and it hasn't worked. The number 1 works but var ab ac and position do not. I've tried various forms of ('+position+'), (' + position + '), ('+(position)+'). But, none have worked... var nextB = $('.nextButton'); $(nextB).click(function(){ var AA = 1; var AB = 2; var AC = 3; var position = 4; $('#tHacks tr:nth-child(1)').hide(); $('#tHacks tr:nth-child(AB)').hide(); $('#tHacks tr:nth-child(AC)').hide(); $('#tHacks tr:nth-child('+position+')').hide(); });
has title: variable in nth child
upvote count: 1

http://stackoverflow.com/comment/39499948
comment on: http://stackoverflow.com/q/25336128
score: 0
type: Comment
type: QuestionComment
has text: I suppose that would be the standard approach, but I'd like to avoid it for 2 reasons. 1), because that would recreate every method and property for every instance created...avoiding that is the attraction of prototypes after all, and 2) the syntax of prototype methods seems far more readable to me as well

http://stackoverflow.com/a/25283359
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25283084
type: Answer
has body: Here you go. function fix1(img) { //if (img.src.indexOf('default')==-1) return; // already changed var d = new Date(); var Today = d.getDate(); var Month = d.getMonth(); var src; if ((Month == 8 &amp;&amp; Today &gt;= 1) || (Month == 9 &amp;&amp; Today &lt;= 13)) { src = "http://www.ausdenclarkbookings.co.uk/image/stokefix.png"; } else if ((Month == 9 &amp;&amp; Today &gt;= 14) || (Month == 9 &amp;&amp; Today &lt;= 27)) { src = "http://www.ausdenclarkbookings.co.uk/image/cpalfix.png"; } else if ((Month == 9 &amp;&amp; Today &gt;= 28) || (Month == 10 &amp;&amp; Today &lt;= 18)) { src = "http://www.ausdenclarkbookings.co.uk/image/newc.png"; } else { src = 'not defined'; } alert(src); img.src=src; } btw, remember that getMonth returns months from 0-11 not 1-12 so you may need to change your 8 to a 7.
accepted answer of: http://stackoverflow.com/q/25283084

http://stackoverflow.com/comment/39439207
has text: @AwalGarg because its a hack?
type: Comment
comment on: http://stackoverflow.com/a/25303829
type: AnswerComment
score: 0

http://stackoverflow.com/a/25314506
upvote count: 0
type: Answer
score: -1
answers question: http://stackoverflow.com/q/25314420
downvote count: 1
has body: questionseasy is undefined. You can trace javascript as it runs in your browser console and see this.

scope
tags question: http://stackoverflow.com/q/25383295
tags question: http://stackoverflow.com/q/25379132
tags question: http://stackoverflow.com/q/25378432
tags question: http://stackoverflow.com/q/25230260
tags question: http://stackoverflow.com/q/25315166
tags question: http://stackoverflow.com/q/25238841
tags question: http://stackoverflow.com/q/25280773
tags question: http://stackoverflow.com/q/25352189
tags question: http://stackoverflow.com/q/25358152
tags question: http://stackoverflow.com/q/25344974
tags question: http://stackoverflow.com/q/25354154
tags question: http://stackoverflow.com/q/25332919
tag name: scope
tags question: http://stackoverflow.com/q/25241155
tags question: http://stackoverflow.com/q/25365977
type: Tag
tags question: http://stackoverflow.com/q/25260864
tags question: http://stackoverflow.com/q/25232539
tags question: http://stackoverflow.com/q/25389615
tags question: http://stackoverflow.com/q/25387891
tags question: http://stackoverflow.com/q/25344420

http://stackoverflow.com/comment/39571591
has text: how any string starts with "http" AND ends with ".html" or "aspx" will be converted into a valid hyperlink?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25375567

http://stackoverflow.com/q/25366248
type: UnansweredQuestion
has body: I need to get browser information like User-Agent, Browser Language etc. I am able to get all these information using Java Script but my question is if java script is disabled then how can we get these values? Even if we can get these values [like using flash, silverlight, java or other technology] how can we send this info to server?
has comment: http://stackoverflow.com/comment/39553363
score: -2
tagged with: php
has answer: http://stackoverflow.com/a/25366349
downvote count: 2
has comment: http://stackoverflow.com/comment/39554711
tagged with: http
type: Question
has title: How many ways we can post data from client side to server?
has comment: http://stackoverflow.com/comment/39553269
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39553197
answer count: 1
has comment: http://stackoverflow.com/comment/39556386
favorite count: 0

http://stackoverflow.com/q/25360084
has answer: http://stackoverflow.com/a/25360155
upvote count: 1
has answer: http://stackoverflow.com/a/25364983
type: Question
has body: I've built a simple search form in AngularJS but get an undefined error. The code is as follows for the list controller: var phonecatControllers = angular.module('phonecatControllers', []); phonecatControllers.controller('PhoneListCtrl', ['$scope', 'Phone', function($scope, Phone) { $scope.phones = Phone.query(); $scope.orderProp = 'age'; }]); And the search controller as: phonecatControllers.controller('SearchCtrl', ['$scope', 'Phone', function ($scope, $http) { $scope.url = 'phones.json'; // The function that will be executed on button click (ng-click="search()") $scope.search = function() { // Create the http post request // the data holds the keywords // The request is a JSON request. $http.post($scope.url, { "data" : $scope.keywords}) .success(function(data, status) { $scope.status = status; $scope.data = data; $scope.result = data; // Result }) .error(function(data, status) { $scope.data = data || "Request failed"; $scope.status = status; }); } }]); The HTML looks like this for the search form: Search: Search {{result}} The error that undefined is not a function for this line: $http.post($scope.url, { "data" : $scope.keywords}). Can anyone point me in the right direction? It's also not doing the query string on the URL so it's not becoming part of the history stack. The service looks like: phonecatServices.factory('Phone', ['$resource', function($resource){ return $resource('phones/:phoneId.json', {}, { query: {method:'GET', params:{phoneId:'phones'}, isArray:true} }); }]); So in short... why am I getting the undefined error? And why isn't the query string being passed?
score: 1
has comment: http://stackoverflow.com/comment/39541609
accepted answer: http://stackoverflow.com/a/25360155
answer count: 3
possible better answer: http://stackoverflow.com/a/25360152
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25360152
favorite count: 0
has title: AngularJS Search Form throws undefined error
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/comment/39584177
has text: No, sorry, my wording may have been not clear. Of course, I always have valid values in axis.min/axeis.max fields. What I meant is that _expression_ itself may initialize slower than input element. Or maybe I'm pants on head wrong and the problem is somewhere else.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25378908
type: Comment

http://stackoverflow.com/a/25378563
answers question: http://stackoverflow.com/q/25377381
type: Answer
has body: Debian (and some others) add a global alias for /javascript/ pointing to /usr/share/javascript then you can't use a directory /javascript in your document root (or you must redeclare it) see https://packages.debian.org/stable/javascript-common
score: 5
has comment: http://stackoverflow.com/comment/39577133
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25377381
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39577166

http://stackoverflow.com/comment/39392069
comment on: http://stackoverflow.com/a/25278487
type: Comment
has text: As I mentioned in the question, I considered this approach. But I wonder whether it is possible to do that without adding Browse to the controller data. Browse is a command, not really a data, so I would expect to have it only as a method on the controller. So far it seems a custom directive is required. I'll wait a bit to see if anyone has a different proposal, then accept this one if no one does.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39335783
comment on: http://stackoverflow.com/q/25247499
score: 0
type: Comment
type: QuestionComment
has text: @GuilhermeNascimento `getCSSText` is a function of the ie7-js library linked in the question. Modern.ie is just a virtual machine that you can select an operating system and browser to test things in. How would a guy prevent this safety block? I have added the site to a list of trusted sites.

http://stackoverflow.com/a/25344423
has comment: http://stackoverflow.com/comment/47530489
score: 48
has comment: http://stackoverflow.com/comment/39513817
type: Answer
has body: You may want to $watch for the empty value and set it to null: &lt;input type="text" ng-model="test.value" /&gt; $scope.$watch('test.value', function (newValue, oldValue) { if(newValue === "") $scope.test.value = null; }); Another way would be to use a custom directive and apply a $parsers in it: &lt;input type="text" ng-model="test.value" empty-to-null /&gt; myApp.directive('emptyToNull', function () { return { restrict: 'A', require: 'ngModel', link: function (scope, elem, attrs, ctrl) { ctrl.$parsers.push(function(viewValue) { if(viewValue === "") { return null; } return viewValue; }); } }; });
has comment: http://stackoverflow.com/comment/47530144
upvote count: 49
accepted answer of: http://stackoverflow.com/q/25344368
downvote count: 1
answers question: http://stackoverflow.com/q/25344368
has comment: http://stackoverflow.com/comment/58979662
has comment: http://stackoverflow.com/comment/47590504
type: AcceptedAnswer

http://stackoverflow.com/comment/39480549
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25326280
type: AnswerComment
has text: @Chris I've just got a task to log activity on click . If that would be in my hand i would never make it anchor :(

http://stackoverflow.com/comment/39405403
has text: @UmurKontaci - The $http function is in line 64.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25276773

http://stackoverflow.com/comment/39448701
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25309300
has text: You could do this may be `$('dd').eq(1).remove();`
score: 0

http://stackoverflow.com/q/25258682
has title: How Can I Remove All Targets In Url In Js
type: Question
answer count: 1
downvote count: 0
tagged with: url
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25258889
tagged with: jquery
duplicate of: http://stackoverflow.com/q/3870057
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39355530
favorite count: 0
has body: If I want to show specific part of page in using #id in the url. so for example my url is: www.example.com/#geometry When I reload my page I want all the targets (#geometry) on the url to be removed before reload. So there would be only www.example.com. How can I do this? Update: i don't know what my url be it is generated from server side see this my url localhost:8080/home?requestParams=%7B%22tabMode%22 and now to view any part of that page i add #id so it becomes localhost:8080/home?requestParams=%7B%22tabMode%22#geometry , now on reload of this page i want to remove this #geometry how can i do it any idea?
linked to: http://stackoverflow.com/q/3870057
has answer: http://stackoverflow.com/a/25258889
type: AnsweredQuestion
score: 3
upvote count: 3
linked to: http://stackoverflow.com/q/824349

http://stackoverflow.com/comment/39329970
type: Comment
type: QuestionComment
has text: Also, JS doesn't really do MD arrays.
comment on: http://stackoverflow.com/q/25245195
score: 0

http://stackoverflow.com/a/25359552
type: Answer
has comment: http://stackoverflow.com/comment/39540594
has comment: http://stackoverflow.com/comment/39540986
answers question: http://stackoverflow.com/q/25359494
has body: It's just how they work. It's not a bug: Returns expr1 if it can be converted to false; otherwise, returns expr2 This means you can use "default values", like this: function someFunc(passedParameter){ var newValue = passedParameter || 1337 } Or run functions when conditions are met: var myBool = true; myBool &amp;&amp; someFunc(); // someFunc will only be evaluated if `myBool` is truthy More info on truthy / falsy
accepted answer of: http://stackoverflow.com/q/25359494
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/39541738
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39540652

http://stackoverflow.com/q/25263378
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/39387940
type: UnansweredQuestion
has title: Why do window.location and window.location.href return a Page Not Found Error in MVC?
has comment: http://stackoverflow.com/comment/39363648
has comment: http://stackoverflow.com/comment/39363985
answer count: 0
downvote count: 0
tagged with: javascript
favorite count: 0
type: Question
score: 3
has comment: http://stackoverflow.com/comment/39363544
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/39363652
has body: I have an MVC application that sends users to a shopping cart page to view the summary of their items prior to checkout. When the user clicks the checkout link, it triggers this JavaScript function: function CartCheckOut() { var cartitems = '@Html.Raw(Json.Encode(Model.CartItems))'; $.ajax({ type: 'POST', datatype: "application/json", data: { cartitems: cartitems }, url: '@Url.Action("CheckOut", "ShoppingCart")', success: function (result) { if (result) { window.location = result; } } }); } Which in turn sends them to the Shopping Cart Controller that processes the request and returns a URL with a merchant key so they can be redirected to the merchants site to complete the checkout process. To simplify the description of the problem, I am excluding other pieces of the Checkout method but it simply returns a string URL with a key/pair value. But the resulting problem is the same irrelevant of the URL that is returned to the function as it always results in a Page not found error after landing me on the same page that launched the call. public string CheckOut(string cartitems) { return "http://www.google.com"; } If I use window.open(result); within the CartCheckOut function, a new page is launched and I'm taken to the URL that gets passed back from the controller. But if I use either window.location = result; or window.location.href = result; I get a Page not found error with no redirection to the specified URL. I've also tried assigning the Controller method as an ActionResult and RedirectResult to perform a return Redirect(url) but the results are the same. Is this method of performing a redirect incorrect or could I be missing some critical piece?
upvote count: 3
has comment: http://stackoverflow.com/comment/39363722
has comment: http://stackoverflow.com/comment/39370120

http://stackoverflow.com/comment/39365790
has text: Why should it work with "array data" (I assume you mean `application/x-www-form-urlencoded` encoded data by that)? Plenty of web services expect JSON as the input.
comment on: http://stackoverflow.com/a/25264657
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39336222
score: 0
has text: You also need to make sure drupal core files are loaded before you use this function, you can try `console.log(Drupal);` before attaching event to make sure drupal object exists
comment on: http://stackoverflow.com/a/25246907
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25351205
has answer: http://stackoverflow.com/a/25351346
type: Question
answer count: 2
tagged with: css
has comment: http://stackoverflow.com/comment/39525495
score: 0
has comment: http://stackoverflow.com/comment/39525494
has body: i have a problem changing the color of some divs one by one. on page load i create a div which is filled with a square of 15x15 divs (class='feld') All the divs i want to change have the class feld My code so far: $(document).ready(function() { create(); var delay = 1; function create(){ for (z = 1; z < 16; z++) { var zeile = jQuery(' ', { class: 'zeile', id: z, html: "" }); $("#wortfeld").append(zeile); for (s = 1; s < 16; s++) { var div = jQuery(' ', { class: 'feld', id: s, html: "" }); $(".zeile[id=" + z + "]").append(div); }; }; }; $('.feld').each(function(){ $(this).delay((delay++)*500).css("background-color","lightgoldenrodyellow"); }); }); So my intention was to change the color of each .feld one by one. But it doesn't work the way i approached this. I also tried to do it this way: create(function(){ $('.feld').each(function(){ $(this).delay((delay++)*500).css("background-color","lightgoldenrodyellow"); }); }); doesn't work either here is the HTML TEST
accepted answer: http://stackoverflow.com/a/25351346
possible better answer: http://stackoverflow.com/a/25351316
has answer: http://stackoverflow.com/a/25351316
tagged with: javascript
tagged with: jquery
has title: changing color of multiple divs one after another
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39458052
has text: @PaulRoub `\b` is needed. Look at the updated post. There is one more fault in OP regex patern.
score: 0
comment on: http://stackoverflow.com/a/25314017
type: AnswerComment
type: Comment

safari
tags question: http://stackoverflow.com/q/25246925
tags question: http://stackoverflow.com/q/25316629
tags question: http://stackoverflow.com/q/25383592
tags question: http://stackoverflow.com/q/25241932
tags question: http://stackoverflow.com/q/25276719
tags question: http://stackoverflow.com/q/25288434
tags question: http://stackoverflow.com/q/25349970
tags question: http://stackoverflow.com/q/25387338
tags question: http://stackoverflow.com/q/25383340
tags question: http://stackoverflow.com/q/25284103
tags question: http://stackoverflow.com/q/25272926
type: Tag
tags question: http://stackoverflow.com/q/25335829
tags question: http://stackoverflow.com/q/25314259
tags question: http://stackoverflow.com/q/25362334
tags question: http://stackoverflow.com/q/25321428
tags question: http://stackoverflow.com/q/25243031
tags question: http://stackoverflow.com/q/25359224
tags question: http://stackoverflow.com/q/25329193
tag name: safari

http://stackoverflow.com/comment/39543945
has text: In the case I create different servers, I should start it by calling the command pack.start(), shouldn't I?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25345674

http://stackoverflow.com/comment/39495815
type: AnswerComment
comment on: http://stackoverflow.com/a/25333962
type: Comment
has text: I was just in the midst of updating with `children`. :-)
score: 0

http://stackoverflow.com/a/25285248
downvote count: 0
has comment: http://stackoverflow.com/comment/39403837
has comment: http://stackoverflow.com/comment/39404092
accepted answer of: http://stackoverflow.com/q/25285143
type: Answer
answers question: http://stackoverflow.com/q/25285143
has comment: http://stackoverflow.com/comment/39403762
score: 2
upvote count: 2
has body: You bootstrapping the app after the ng-style which is incorrect. It should be like this: Working Plunkr
has comment: http://stackoverflow.com/comment/39403811
has comment: http://stackoverflow.com/comment/39403743
has comment: http://stackoverflow.com/comment/39404405
has comment: http://stackoverflow.com/comment/39404113
type: AcceptedAnswer

http://stackoverflow.com/a/25261784
upvote count: 2
has comment: http://stackoverflow.com/comment/39361043
has comment: http://stackoverflow.com/comment/39360946
has comment: http://stackoverflow.com/comment/39391870
type: Answer
has body: I understand you need to disable the other text field when one gets focused. Using JQuery u need to have code like this. # is to represent selector for id $( "#city" ).focus(function() { $("#region").prop('disabled', true); }); $( "#region" ).focus(function() { $("#city").prop('disabled', true); }); this prop disable is supported jQuery version 1.6+ Hope it helps
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39360991
answers question: http://stackoverflow.com/q/25261564
has comment: http://stackoverflow.com/comment/39361082

http://stackoverflow.com/a/25287476
upvote count: 4
has body: For a positional tween (but you get the gist) I am using this code which does have a duration parameter and does move the camera smoothly: function setupTween (position, target, duration) { TWEEN.removeAll(); // remove previous tweens if needed new TWEEN.Tween (position) .to (target, duration) .easing (TWEEN.Easing.Bounce.InOut) .onUpdate ( function() { // copy incoming position into capera position camera.position.copy (position); }) .start(); } and I call it like so: setupTween (camera.position.clone(), new THREE.Vector3 (x, y, z), 7500); to get a 7.5 seconds smooth tween.
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/25277919
type: Answer

http://stackoverflow.com/comment/39435173
has text: i tried triggering a dummy click event on the input field, focus() .. nothing seems to work.
comment on: http://stackoverflow.com/a/25301418
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25300493
has body: I am currently using StrongLoop as my API backend server and Mongodb as data storage engine. Let's say there is a collection called article. It has two fields title, and content. And there are two frontend pages to display a list of articles and view a single article. Obviously the data list page only need title field and the view page need both. Currently the GET method of StrongLoop API return all fields including content. It cost extra traffic. Is there any way that can just return specific field? Mongodb support projection in find() method for this. How can I do the same thing by StrongLoop?
upvote count: 0
has answer: http://stackoverflow.com/a/61388389
tagged with: javascript
has answer: http://stackoverflow.com/a/25301361
answer count: 3
has answer: http://stackoverflow.com/a/53408297
tagged with: loopbackjs
accepted answer: http://stackoverflow.com/a/25301361
favorite count: 0
tagged with: strongloop
possible better answer: http://stackoverflow.com/a/53408297
downvote count: 1
has title: How to get result with specific fields in StrongLoop?
type: AnsweredQuestion
score: -1
type: Question

marker
tag name: marker
tags question: http://stackoverflow.com/q/25308457
type: Tag
tags question: http://stackoverflow.com/q/25295666

http://stackoverflow.com/comment/39485982
type: QuestionComment
has text: `%E2%80%A6` should work as an URL-encoded ellipsis in UTF-8 character encoding …
comment on: http://stackoverflow.com/q/25328970
score: 1
type: Comment

http://stackoverflow.com/a/25293382
upvote count: 2
answers question: http://stackoverflow.com/q/25293340
score: 2
has body: It's not possible with a listener because no event occurs. You'd have to periodically check the ID with a setInterval function or similar. Better, tie into the function that changes the ID with a callback.
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25293340

http://stackoverflow.com/comment/39476501
score: 2
has text: I posted a linux version that uses xdotool to control the mouse, but there is a similar tool for windows called autoit. It looks pretty simple and there is even a tag for it [autoit]. Also it sounds like you need 2 versions. One that shakes more until movement starts and then calms down a bit while the other one is relatively stable until movement starts.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25258921

http://stackoverflow.com/q/25358877
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39539805
has answer: http://stackoverflow.com/a/25359093
type: UnansweredQuestion
tagged with: c#
tagged with: asp.net-mvc
has title: ASP.NET MVC 5, bootstrap modal popup Not hit Controller method
has comment: http://stackoverflow.com/comment/39539481
tagged with: javascript
has body: I'm using asp.net mvc 5 for my development. I'm try to popup modal with some data to crud operations. I'm try to popup modal with javascript method. After that I click the link my controller method not hit. Screen transform to dark screen. View : &lt;td class="text-right"&gt; &lt;a class="btn btn-info btn-xs" href="javascript:loadEditUser(@item.Id)"&gt; &lt;i class="fa fa-pencil"&gt;&lt;/i&gt; &lt;/a&gt; &lt;/td&gt; &lt;div class="modal fade" id="modalEditUser" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;/div&gt; Javascript : function loadEditUser(userId) { debugger; var remoreUrl = "/UserAdmin/Index"; $('#modalEditUser').modal({ remote: remoreUrl }); } Partial View : This is partial View I'm going to popup @using (Ajax.BeginForm("Create", "UserAdmin", new AjaxOptions { UpdateTargetId = "modalEditUser", OnSuccess = "UserEditSuccess" })) { @Html.AntiForgeryToken() // Web controllers goes here } Controller : public ActionResult EditUser(int id) { if (id == 0) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } var user = UserManager.FindById(id); if (user == null) { return HttpNotFound(); } var userRoles = UserManager.GetRoles(user.Id); return PartialView("_Edit", new EditUserViewModel() { Id = user.Id, UserName = user.UserName, Email = user.Email, FirstName = user.FirstName, LastName = user.LastName, phoneNumber = user.PhoneNumber, RolesList = RoleManager.Roles.ToList().Select(x =&gt; new SelectListItem() { Selected = userRoles.Contains(x.Name), Text = x.Name, Value = x.Name }) }); } Please help me to sort out this issue. Thanks...
type: Question
score: 0
has comment: http://stackoverflow.com/comment/39539581

http://stackoverflow.com/comment/39540553
type: Comment
has text: The answer is in the question. `expr1 || expr2 => Returns expr1 if it can be converted to true; otherwise, returns expr2`. In the last case you have `"" === false` that's false
comment on: http://stackoverflow.com/q/25359494
score: 0
type: QuestionComment

http://stackoverflow.com/q/25312060
favorite count: 0
has answer: http://stackoverflow.com/a/25368874
has title: Adobe DPS Web Viewer Authentication
score: 2
downvote count: 0
type: UnansweredQuestion
type: Question
tagged with: javascript
has body: I'm attempting to use Adobe's Digital Publishing Suite Web Viewer. I've set up my Web Viewer correctly - it is working within my website. However, it is not authenticating that each user has access to the folio that the Web Viewer is accessing. Adobe has a sort of documentation on how to do this, but their documentation seems lacking. It seems as if Adobe is asking me to get users' username and password to Adobe - but that can't be right. I doubt Adobe would invite phising. But that isn't the only point I'm lost on. My current script is as follows: var wvQueryParamGroups = location.search.match(/[?&amp;^#]wv=(s[\/%\-.\w]+)/), wvQueryParam = wvQueryParamGroups &amp;&amp; wvQueryParamGroups.length === 2 ? decodeURIComponent(wvQueryParamGroups[1]) : null; function loadXMLDoc(url, successCallback, failCallback) { 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) { var parser = new DOMParser(); var xmlDoc = parser.parseFromString(xmlhttp.responseText, "application/xml"); successCallback(xmlDoc); } else if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 0) { alert("unsuccessful cross-domain data access attempt?"); failCallback(xmlhttp.status); } else if (xmlhttp.readyState == 4) { failCallback(xmlhttp.status); } else { console.log('readystate=' + xmlhttp.readyState + ', status=' + xmlhttp.status); } } xmlhttp.open("GET", url, true); xmlhttp.send(); } function directEntitlementSignIn(directEntitlementURL, emailAddress, password, appID, authTokenSuccess, authTokenFail) { var response; if (!authTokenSuccess || !authTokenFail) { throw new Error('Callbacks are required: '); } loadXMLDoc(directEntitlementURL + '?emailAddress=' + emailAddress + '&amp;password=' + password + '&amp;appId=' + appID, handleToken = function (data) { toke…
tagged with: adobe-dps
upvote count: 2
answer count: 1

http://stackoverflow.com/comment/39561163
comment on: http://stackoverflow.com/q/25370125
type: Comment
type: QuestionComment
score: 0
has text: Also, forgive my naivete in using SO or JSFiddle, This is my first question on the site and my first fiddle as well.

http://stackoverflow.com/q/25386030
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25386236
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has title: On click rotate image, jquery
tagged with: fullpage.js
tagged with: css
has body: I try to set up image that rotates after links are clicked. having 3 links in total. If second link is clicked, image rotates by 20 degress. If after second link, the third link is clicked, image rotates +20 degrees more. If first link is clicked, image rotates back to default position. Concept simplified: link1 = images default position link2 = image rotates by 20degrees link3 = + another 20degrees If clicked from link3 to link2 -20degrees. Website uses fullpage.js. Rotating image is meant as navigation dots (see ex. here). I dont expect to image to rotate if mouse scroll is used, thats far beyod my reach... As base I am using jQuery rotate plugins example 5 var value = 0 $("#img").rotate({ bind: { click: function(){ value +=90; $(this).rotate({ animateTo:value}) } } }); jsfiddle so far... I dont even know how to assign links so that on click image rotates. Help is highly appreciated. I dont expect to get everything done by someone else, please, at least guide me in direction...
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39591163
has answer: http://stackoverflow.com/a/25386236
score: 1
upvote count: 1
type: Question
tagged with: rotation

http://stackoverflow.com/comment/39316145
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25237693
has text: JS is case sensitive, so your first line should be: `jQuery(window).load(function(){` - note the case of the `j` and `Q`
score: 0

http://stackoverflow.com/comment/39445904
comment on: http://stackoverflow.com/q/25307765
type: Comment
type: QuestionComment
has text: What is `imageObj`? You use it in your `drawImage` call, but it's not defined anywhere.
score: 1

http://stackoverflow.com/a/25288234
has comment: http://stackoverflow.com/comment/39412617
upvote count: 1
has comment: http://stackoverflow.com/comment/39412692
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25287967
has comment: http://stackoverflow.com/comment/39410101
answers question: http://stackoverflow.com/q/25287967
type: Answer
score: 1
has body: How about: / \w+ : one or more word characters (?: : start non capture group \([^)]+\) : an open parens, some characters that are not parens, a close parens )? : this group is optional (?: : start non capture group , : a comma \w+ (?: \([^)]+\) )? )* : 0 or more times the same pattern preceeded by a comma. /x : allow comments in regex

http://stackoverflow.com/comment/39561392
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25368859
has text: It is the correct way to search. If you need to search using JavaScript (rather than in the view), it is possible to inject the filter filter (or any other filter for that matter) in a controller or service: `.controller(function ($scope, filterFilter) { filterFilter(listOfStuffToSearchIn, thingToSearchFor)}`.
type: Comment

http://stackoverflow.com/q/25320403
possible better answer: http://stackoverflow.com/a/25320431
has comment: http://stackoverflow.com/comment/39470356
tagged with: css
has title: .slideUp() not working as intended
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
has comment: http://stackoverflow.com/comment/39469543
type: Question
has answer: http://stackoverflow.com/a/25320447
has body: i have an icon that triggers both the effect of slide up and slide down but after sliding down it doesn't work anymore if i press the same icon again. $(document).ready(function(){ $('.subcat-row').hide(); $("body").on("click",'.drop-subcat', function () { if($(this).children('i').attr('class','fa fa-toggle-down drop-down-icon')){ $(this).closest('.category-row').siblings('.subcat-row').slideDown(500); $(this).children('.drop-down-icon').attr('class', 'fa fa-toggle-up drop-down-icon'); } else if( $(this).children('i').attr('class','fa fa-toggle-up drop-down-icon') ){ $(this).closest('.category-row').siblings('.subcat-row').slideUp(500); $(this).children('.drop-down-icon').attr('class', 'fa fa-toggle-down drop-down-icon'); } }); }); here is the jsfiddle i made.. http://jsfiddle.net/vnbtfc92/
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25320431
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25320447

http://stackoverflow.com/comment/39620903
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25381827
has text: Modified your code a little bit, you found a good trick, but as you mentioned, it requires to code in Java. So, if I have to code a part of that in Java, then I don't need Nashorn with "tricks" at all :). It's obviously "no-question" implementation in Java, Scala, Groovy, etc. But I'm disappointed, that there is a scripting language which comes with JDK, and it'll be very useful to use just a text editor and scratch something there and run it from console, but there is no obvious way to script basic things!

http://stackoverflow.com/q/25333730
answer count: 1
has title: How do I call a controller action from an Ember route while doing a transition?
tagged with: javascript
has body: My objective is to display a fancy "loading..." graphic on my page while Ember fetches model data through the Ember route. This led me to http://emberjs.com/guides/routing/loading-and-error-substates/. That inspired me to create an action on my page's controller which would show the "loading" overlay window in the DOM. For example, here's my controller: controllers/users.js: export default Ember.ArrayController.extend({ ... actions: { displayLoading: function() { // Show the DOM element that says "Loading..." }, ... } }); I'd like to call that while my data is loading, so I then define a route as follows: routes/users.js: export default Ember.Route.extend({ model: function( params ) { return this.store.find('user', params ); }, actions: { loading: function(transition, originRoute) { transition.send('displayLoading'); } } }); But when I do this, I get this error: Uncaught Error: Nothing handled the action 'displayLoading'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble. So my question is where can I define this action so that my loading method will be able to call it? Note that trying this.send('displayLoading') gave me this error: Can't trigger action 'displayLoading' because your app hasn't finished transitioning into its first route. To trigger an action on destination routes during a transition, you can call .send() on the Transition object passed to the model/beforeModel/afterModel hooks.. Update: I am able to catch this action on the route itself, but then I still can't call the action on my controller. Update #2: Thanks to @kingpin2k's answer, I've resolved this. For those interested, here is a full solution: controllers/users.js: export default Ember.ArrayController.extend( { actions: { showLoading: function() { this.set('isLoading', true); }, hideLoading: function() { this.set('isLoading', false); }, } }); routers/users.js: export default Ember.Route.extend({ model…
type: AnsweredQuestion
downvote count: 0
favorite count: 0
score: 16
type: Question
tagged with: ember.js
has answer: http://stackoverflow.com/a/25334510
accepted answer: http://stackoverflow.com/a/25334510
upvote count: 16

http://stackoverflow.com/q/25343743
has answer: http://stackoverflow.com/a/25343804
score: -3
has comment: http://stackoverflow.com/comment/39512926
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25343817
has answer: http://stackoverflow.com/a/25343767
has answer: http://stackoverflow.com/a/25343783
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/39512770
tagged with: javascript
has answer: http://stackoverflow.com/a/25343817
upvote count: 0
has title: How to hide a div with a script by clicking on a button
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25343976
has body: I want to render invisible a div : when the .button-1 is 'active', the .button-2 is hidden and vice versa. Something like display:none in CSS but using Javascript Script $(document).ready(function(){ $('.button-1').click(function(){ $(this).toggleClass('active'); }); }); $(document).ready(function(){ $('.button-2').click(function(){ $(this).toggleClass('active'); }); }); Any idea ? Thanks.
answer count: 5
has answer: http://stackoverflow.com/a/25343976

http://stackoverflow.com/q/25387688
tagged with: google-api
type: UnansweredQuestion
has body: I have this url as json object which is provided by google API. https://www.googleapis.com/customsearch/v1?key=AIzaSyAo6DqmlMti9ID7lL532A7-6Miu1QHcMqI&amp;cx=013881670411723352605:b1y6-jfsiki&amp;q=web%20developer?alt=json-in-script&amp;callback=listEvents I want to use javaScript and want to see complete json object.This is my script code , but it doesn't work. please help me , i am struggling from 3 days. function listEvents(root){ $.getJSON('https://www.googleapis.com/customsearch/v1?key=AIzaSyAo6DqmlMti9ID7lL532A7-6Miu1QHcMqI&amp;cx=013881670411723352605:b1y6-jfsiki&amp;q=web%20developer?alt=json-in-script&amp;callback=listEvents', function(data) {*/ alert(root) }); } function init() { listEvents(); } window.onload = init; Thanks in advance
score: 0
has answer: http://stackoverflow.com/a/25387946
has answer: http://stackoverflow.com/a/25387852
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has title: Google API url use by javaScript

http://stackoverflow.com/q/25241417
has body: I'm trying to add slideDown('400') in this javascript. But dont know where to put it. &lt;script type="text/javascript"&gt; function toggle_visibility(id) { var e = document.getElementById(id); if (e.style.display == 'none') e.style.display = 'block'; else e.style.display = 'none'; } &lt;/script&gt; Iv'e tried this, but it does not work: &lt;script type="text/javascript"&gt; function toggle_visibility(id) { var e = document.getElementById(id); if (e.style.display == 'none') e.slideDown('400').style.display = 'block'; else e.style.display = 'none'; } &lt;/script&gt;
favorite count: 0
has answer: http://stackoverflow.com/a/25241490
has comment: http://stackoverflow.com/comment/39322532
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/39322594
accepted answer: http://stackoverflow.com/a/25241490
has title: Where to put slideDown() in javascript function
has comment: http://stackoverflow.com/comment/39322628
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39322540
tagged with: javascript
has comment: http://stackoverflow.com/comment/39322534
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/39486454
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25320503
type: AnswerComment
has text: @ChrisP don't - use `.map` or `$.map` instead. The entire point of those functions is to create a new array based on an existing an array that has been transmuted via a function. Almost any time you see `var a = []; for (.....) { a.push}` you should be using `a.map` instead.

http://stackoverflow.com/q/25364152
tagged with: express
has title: How to create Node.js custom errors and have the stack property return after res.json()
linked to: http://stackoverflow.com/q/12369543
has comment: http://stackoverflow.com/comment/39549167
has body: I’m attempting to create custom error objects in Node that use Error as the prototype and then to return these errors to the client via the express res.json() method. I can create an instance of a custom error, set it’s properties but when I call res.json(), the stack property is missing. I believe this is due to JSON.stringify() not following prototypes? I can’t see a way of creating custom error objects with an arbitrary number of properties and then use JSON.stringify() on these objects to return all the properties and the base class / superclass Error stack property. Please help! An example is below: (function (customErrorController) { function CustomError() { this.name = 'CustomError'; // String this.message = null; // String this.errorCode = null; // String // this.stack exists as CustomError inherits from Error } CustomError.prototype = new Error(); customErrorController.init = function (app) { app.get('/test', function (req, res) { var customError = new CustomError(); customError.message = 'The Message'; customError.errorCode = 'Err001'; console.log(customError.stack); // This logs the stack fine res.json(customError); // The stack is missing when outputting the object as JSON }); }; })(module.exports);
tagged with: node.js
favorite count: 0
has answer: http://stackoverflow.com/a/25381900
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/18391212
upvote count: 1
has comment: http://stackoverflow.com/comment/39550969
has comment: http://stackoverflow.com/comment/39549778
has comment: http://stackoverflow.com/comment/39549700
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/39549285
has comment: http://stackoverflow.com/comment/48287636
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39551000
score: 0
has text: hi Bergi, thanks for correcting me. I will post my code in a second as soon as I finished formatting it.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25364769

http://stackoverflow.com/comment/39572485
comment on: http://stackoverflow.com/a/25376046
type: Comment
has text: @JayGarza JavaScript is evaluated client-side, which is beyond your control. You cannot enforce what is done in the user's own browser; only what happens on your server before you send them the page.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39466577
has text: Thank you for the tip and your result. I wonder already about how professionals mix html and php. I will change my style :-)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25318221

http://stackoverflow.com/q/25231540
duplicate of: http://stackoverflow.com/q/12829963
answer count: 1
has comment: http://stackoverflow.com/comment/39305504
accepted answer: http://stackoverflow.com/a/25232463
tagged with: javascript
tagged with: jquery
has body: I'm having some HTML being output in a PHP file: echo " click Home Previous Next Pause Resume " As an event for the click button, I have: $(document).ready(function() {$("#showFooter").click(function(){ $("#slideshow-nav").toggle(); });}); which works fine when I put both together in an HTML file but the function does not get executed after I load the HTML output from the PHP script. No errors being displayed in the console what so ever. By the way what I wanna do is providing displayable navigation to a jQuery Cycle2 slideshow. If anyone know a good plugin or a neat way to do this, please let me know. I don't want code but maybe a hint what to look for.
has title: JS function not getting triggered on output generated by PHP
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39303846
has comment: http://stackoverflow.com/comment/39304014
has comment: http://stackoverflow.com/comment/39304592
has answer: http://stackoverflow.com/a/25232463
type: Question
tagged with: php
linked to: http://stackoverflow.com/q/12829963
score: 0
has comment: http://stackoverflow.com/comment/39303690

http://stackoverflow.com/comment/39561569
has text: @LiviuM. The help text for a downvote _literally begins_ __this question does not show any research effort__.
comment on: http://stackoverflow.com/q/25300352
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25248244
has body: If you are looking for a simple tool tip (Html default) you can try the below code. Create a custom Dropdown helper method and add a atttribute for title. Using javascript mouseover you can display the item title. "onmouseover","this.title=this.options[this.selectedIndex].title" public static MvcHtmlString DropDownList(this HtmlHelper htmlHelper, string name, IEnumerable&lt;YourType&gt; selectList) { var select = new TagBuilder("select"); var options = ""; TagBuilder option; foreach (var item in selectList) { option = new TagBuilder("option"); option.MergeAttribute("value", item.Id.ToString()); option.MergeAttribute("text", item.Title); option.MergeAttribute("title", item.Title); option.SetInnerText(item.Title); options += option.ToString(TagRenderMode.Normal) + "\n"; } select.MergeAttribute("id", name); select.MergeAttribute("name", name); select.MergeAttribute("onmouseover","this.title=this.options[this.selectedIndex].title"); select.InnerHtml = options; return new MvcHtmlString(select.ToString(TagRenderMode.Normal)); }
type: Answer
answers question: http://stackoverflow.com/q/25245976
score: 0

http://stackoverflow.com/q/25239768
tagged with: dart
answer count: 1
accepted answer: http://stackoverflow.com/a/25242483
favorite count: 0
upvote count: 2
tagged with: dart-editor
has answer: http://stackoverflow.com/a/25242483
score: 2
type: AnsweredQuestion
has body: I have an javascript web-app which i will be porting to dart but in the dart editor there isn't any javascript syntax highlighting. I wanted to add the package since the editor is eclipse base ( i think ) but i couldn't find anyway to do this. Is it at all possible to add javascript syntax highlighting?
type: Question
downvote count: 0
tagged with: javascript
has title: Is it possible to add javascript syntax highlighting in the dart-editor?

http://stackoverflow.com/q/25258899
downvote count: 0
has comment: http://stackoverflow.com/comment/39355636
favorite count: 0
linked to: http://stackoverflow.com/q/4861927
accepted answer: http://stackoverflow.com/a/25260664
has body: We have MVC an application. we want to offer our customers to enter html texts for use in document generation. For this purpose we have included CK Editor. CK has a function to return the html. We want to 'encode' this Html, so we can place it in an input field that will be included in a form post. What JavaScript function(s) can we use to convert the Html string to a format that we can send with the formpost. The form post is done via AJAX. Update: In an other post we found this function: function htmlEscape(str) { return String(str) .replace(/&amp;/g, '&amp;amp;') .replace(/"/g, '&amp;quot;') .replace(/'/g, '&amp;#39;') .replace(/&lt;/g, '&amp;lt;') .replace(/&gt;/g, '&amp;gt;'); } It looks like this will do the trick, but are there any build-in or JQuery functions that will do this?
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39355823
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25261695
has comment: http://stackoverflow.com/comment/39355687
has comment: http://stackoverflow.com/comment/39355567
has answer: http://stackoverflow.com/a/25260664
has title: Send HTML string with MVC Form Post
type: Question
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39355666
upvote count: 2
has comment: http://stackoverflow.com/comment/39355931
answer count: 2
has comment: http://stackoverflow.com/comment/39355696
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25261695

http://stackoverflow.com/q/25292770
tagged with: google-sheets
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25297341
has body: Hi I've been working on a google analytics dashboard but having a hard time separating data by different months. The script I have pulls the bulk date from the start to end date and I would like to separate it month by month. Below is the script . Thanks in advance! function runDemo() { try { var firstProfile = getFirstProfile(); var results = getReportDataForProfile(firstProfile); outputToSpreadsheet(results); } catch(error) { Browser.msgBox(error.message); } } function getFirstProfile() { var accounts = Analytics.Management.Accounts.list(); if (accounts.getItems()) { var firstAccountId = accounts.getItems()[0].getId(); var webProperties = Analytics.Management.Webproperties.list(firstAccountId); if (webProperties.getItems()) { var firstWebPropertyId = webProperties.getItems()[0].getId(); var profiles = Analytics.Management.Profiles.list(firstAccountId, firstWebPropertyId); if (profiles.getItems()) { var firstProfile = profiles.getItems()[0]; return firstProfile; } else { throw new Error('No views (profiles) found.'); } } else { throw new Error('No webproperties found.'); } } else { throw new Error('No accounts found.'); } } function getReportDataForProfile(firstProfile) { var profileId = firstProfile.getId(); var tableId = 'ga:' + profileId; var startDate = getLastNdays(14); // 2 weeks (a fortnight) ago. var endDate = getLastNdays(0); // Today. var optArgs = { 'dimensions': 'ga:keyword', // Comma separated list of dimensions. 'sort': '-ga:sessions,ga:keyword', // Sort by sessions descending, then keyword. 'segment': 'dynamic::ga:isMobile==Yes', // Process only mobile traffic. 'filters': 'ga:source==google', // Display only google traffic. 'start-index': '1', 'max-results': '250' // Display the first 250 results. }; // Make a request to the API. var results = Analytics.Data.Ga.get( tableId, // Table id (format ga:xxxxxx). startDate, // Start-date (format yyyy-MM-dd). endDate, // End-date (format yyyy-MM-dd). 'ga:sessions,ga:pageviews', // Comma seperated list of met…
type: AnsweredQuestion
has title: How do I separate bulk data in my Google Analytics automated dashboard into month by month data
accepted answer: http://stackoverflow.com/a/25297341
type: Question
tagged with: google-analytics

http://stackoverflow.com/comment/39510234
has text: yes i understand this but i cant handel this problem :/
comment on: http://stackoverflow.com/a/25331780
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/a/25366306
accepted answer of: http://stackoverflow.com/q/25365288
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25365288
has comment: http://stackoverflow.com/comment/39579953
has body: The problem you have is that you're assigning values to all four corners of the object: top, right, bottom and left. To move this properly you only need to change 2 of the co-ordinates. Because your chat window starts in the bottom right, we'll use that as our datum. DEMO: http://jsfiddle.net/rws95a1q/4/ Basic code: var chatWindow = $("#chatdiv"); var chatWidth = chatWindow.width(); var chatHeight = chatWindow.height(); var windowWidth = $(window).width(); var windowHeight = $(window).height(); function moveChatWindow(moveTo) { if (moveTo === "lefttop") { chatWindow.stop().animate({ bottom: windowHeight - chatHeight , right: windowWidth - chatWidth }, 2000); } else if (moveTo === "righttop") { chatWindow.stop().animate({ bottom: windowHeight - chatHeight , right: 0 }, 2000); } else if (moveTo === "leftbottom") { chatWindow.stop().animate({ bottom: 0 , right: windowWidth - chatWidth }, 2000); } else { chatWindow.stop().animate({ bottom: 0 , right: 0 }, 2000); } First up we have to work out a few things - namely the dimensions of the chat box and the size of the document/window. This gives us enough data points to work out where to animate to. Next comes the animation: note how the only dimensions we are ever assigning new values to are the bottom and right. To set it to the "lefttop", the bottom of the chat window needs to be 260px from the top, which is equivalent to the height of the document minus the height of the chat box. The principal for left is the same: width of the document minus the chat box width. UPDATE: I would probably change the positioning of the chat box to fixed. Alternatively I have included some extra code in the JSFiddle to handle window resizing (in principal).
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/a/25354016
has body: Here's how you'd be able to parse the initial array in PHP: $url = 'http://mxs-concept.com/liveresults/test.php'; $page = file_get_contents($url); // fetch the page preg_match('/resultslines=(.+)print_race_analysis/sim', $page, $matches); // find javascript array $js = preg_replace('/,\s+\]$/', ']', $matches[1]); // fix last comma before "]" $array = json_decode($js); // decode the array var_dump($array); // see the exact array you had in javascript However, after reading your edit, it seems that you'd need more work if you're taking the PHP way. You might want to try to install NodeJS and make it parse the JS but might be an overkill. If I would you, I'd translate the JS to PHP even if it will take a day just because NodeJS might take a week instead.
has comment: http://stackoverflow.com/comment/39550607
has comment: http://stackoverflow.com/comment/39550945
type: Answer
has comment: http://stackoverflow.com/comment/39641101
has comment: http://stackoverflow.com/comment/39574498
answers question: http://stackoverflow.com/q/25353847
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/a/32940323
answers question: http://stackoverflow.com/q/25250544
downvote count: 0
type: Answer
upvote count: 6
has body: I had the same issue and found that I had the below connection in another file, which was the reason why I couldn't connect with a different database name. The below createConnection is needed: db = mongoose.createConnection('mongodb://localhost/mydb'); What I had in another file: db = mongoose.Connection('mongodb://localhost/mydb');
score: 6

http://stackoverflow.com/comment/39459833
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25311554
has text: Unfortunately this won't work since the expression is depending on the scope of FirstController.
score: 0

http://stackoverflow.com/comment/39310157
type: QuestionComment
comment on: http://stackoverflow.com/q/25234269
has text: "i know there is multiply='multiply' but i'm not sure if it's well supported" i edited my comment, i forgot to put that my priblem is that multiply is not supported for IE 9 or older
score: 0
type: Comment

http://stackoverflow.com/a/25359714
downvote count: 0
has comment: http://stackoverflow.com/comment/47975934
has comment: http://stackoverflow.com/comment/46113677
has comment: http://stackoverflow.com/comment/47975775
accepted answer of: http://stackoverflow.com/q/25359247
answers question: http://stackoverflow.com/q/25359247
type: Answer
has comment: http://stackoverflow.com/comment/47976008
has comment: http://stackoverflow.com/comment/94297488
has comment: http://stackoverflow.com/comment/46113646
has comment: http://stackoverflow.com/comment/46113388
upvote count: 20
has body: The shim below isn't needed anymore if PhantomJS 2 is used. Sadly CasperJS 1.1-beta3 doesn't support it yet, so you might want to use the master branch from GitHub. The problem is that PhantomJS v1.x does not support the Function.prototype.bind. You need to add a shim for that. In CasperJS it goes into the page.initialized event handler. This shim works well for me on instragram: casper.on( 'page.initialized', function(){ this.evaluate(function(){ var isFunction = function(o) { return typeof o == 'function'; }; var bind, slice = [].slice, proto = Function.prototype, featureMap; featureMap = { 'function-bind': 'bind' }; function has(feature) { var prop = featureMap[feature]; return isFunction(proto[prop]); } // check for missing features if (!has('function-bind')) { // adapted from Mozilla Developer Network example at // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind bind = function bind(obj) { var args = slice.call(arguments, 1), self = this, nop = function() { }, bound = function() { return self.apply(this instanceof nop ? this : (obj || {}), args.concat(slice.call(arguments))); }; nop.prototype = this.prototype || {}; // Firefox cries sometimes if prototype is undefined bound.prototype = new nop(); return bound; }; proto.bind = bind; } }); }); It doesn't work if the shim is exported into its own file and included through the clientScripts option, because those are appended after the instagram javascript which is too late. What might also work is registering to page.resource.received event. There is also the pure PhantomJS question: bind polyfill for PhantomJS
has comment: http://stackoverflow.com/comment/46113368
score: 20
type: AcceptedAnswer

http://stackoverflow.com/comment/39310555
type: QuestionComment
has text: your answer already lies on the [user guide form helper - Adding Attributes](https://ellislab.com/codeigniter/user-guide/helpers/form_helper.html)
comment on: http://stackoverflow.com/q/25234733
score: 0
type: Comment

http://stackoverflow.com/q/25243058
has comment: http://stackoverflow.com/comment/39325617
has body: in jQuery you can do this: $('#myElement').addClass('header'); how can I make it like this in pure javascript var elem = document.getElementById('myElement'); elem.addClass('header'); So I want to make a small custom library which use the selector before the function instead of this: function addClass(element, class) { element.className += ' ' + class; } which is called like this: var elem = document.getElementById('myElement'); addClass(elem, 'header'); Is this possible and if it is how can I do that?
has answer: http://stackoverflow.com/a/25243241
has comment: http://stackoverflow.com/comment/39325558
tagged with: javascript
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25243093
has comment: http://stackoverflow.com/comment/39325691
has answer: http://stackoverflow.com/a/25243093
linked to: http://stackoverflow.com/q/507138
accepted answer: http://stackoverflow.com/a/25243241
type: AnsweredQuestion
type: Question
has title: selector.addClass('classname') in pure javascript

http://stackoverflow.com/q/25282821
score: 1
possible better answer: http://stackoverflow.com/a/25288192
has answer: http://stackoverflow.com/a/25284027
has title: How can i install jquery and jqueryUI files in XPages?
tagged with: lotus-domino
upvote count: 1
has answer: http://stackoverflow.com/a/25288192
type: Question
accepted answer: http://stackoverflow.com/a/25284027
has body: I have downloaded jquery and jquery ui files and i want to import them in my server as a "global library". I want to add my files on the server so as to be globally visible and import them in any XPage. ( I dont want to reference them from the cdn with http, or add the files from my computer as a resource each time or add them only in a specific theme. ) For example: i could place the files in \domino\js\jQuery and \domino\js\jQueryUI or any other folder in the file system and then add them from any XPage from resources tab. Can i do it somehow? Can it be even better, for example: not even add them as a resource and directly use the jquery code add them as an osgi plugin
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: jquery
tagged with: xpages
favorite count: 0
tagged with: lotus-notes
type: AnsweredQuestion

http://stackoverflow.com/a/25321655
type: Answer
has comment: http://stackoverflow.com/comment/39471852
has comment: http://stackoverflow.com/comment/39473903
upvote count: 3
answers question: http://stackoverflow.com/q/25321609
has comment: http://stackoverflow.com/comment/39472096
has comment: http://stackoverflow.com/comment/39473703
has comment: http://stackoverflow.com/comment/39472929
has comment: http://stackoverflow.com/comment/39472598
has body: You could use map to create a new array of objects that have the keys you want to use and the JSON.stringify that array instead: JSON.stringify( poly_points.map(function (point){ return { custom_key_for_k : point.k, custum_key_for_A : point.A }; }) ) You'll need to shim map to support Internet Explorer prior to version 9, or use an equivalent function from any Javascript library which includes it.
has comment: http://stackoverflow.com/comment/39472881
has comment: http://stackoverflow.com/comment/39472558
has comment: http://stackoverflow.com/comment/39473532
downvote count: 0
has comment: http://stackoverflow.com/comment/39472406
has comment: http://stackoverflow.com/comment/39473974
score: 3

http://stackoverflow.com/q/25319745
has answer: http://stackoverflow.com/a/25328420
type: UnansweredQuestion
has title: Backbone fetch calls incrementing up each time I navigate to page
type: Question
has answer: http://stackoverflow.com/a/25347409
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39485437
tagged with: jquery
has body: I have 2 pages for my Backbone app. Page 1 uses the fetch() method on a collection to get data. When I navigate to Page 2, and then back to Page 1, I can see the fetch() data getting logged twice. The fetch calls increment upwards with each new time that I navigate away from, and then back to Page One. Is this a zombie view? How do I stop this from happening? Here is my JavaScript using Backbone: var MyModel = Backbone.Model.extend({ defaults: { 'id': 'null', 'color': '', 'date': '', 'name': '' } }); var MyCollection = Backbone.Collection.extend({ model: MyModel, url: 'https://api.mongolab.com/api/1/databases/testdatabase/collections/Content?apiKey=xxxxxxxxxxxxxxx' }); var aCollection = new MyCollection(); var MyViewOne = Backbone.View.extend({ el: '.js-container', initialize: function () { this.collection = aCollection; this.listenTo(this.collection, 'sync', this.render); this.collection.fetch(); }, template: _.template( $('#One').html() ), render: function () { console.log('render One'); console.log(this.collection); this.$el.html( this.template({collection: this.collection}) ); return this; } }); var MyViewTwo = Backbone.View.extend({ el: '.js-container', template: _.template( $('#Two').html() ), render: function () { console.log('render Two'); this.$el.html( this.template() ); return this; } }); var MyRouter = Backbone.Router.extend({ routes: { '': 'pageOne', 'pageone': 'pageOne', 'pagetwo': 'pageTwo' }, pageOne: function () { var myViewOne = new MyViewOne(); }, pageTwo: function () { var myViewTwo = new MyViewTwo(); myViewTwo.render(); } }); var myRouter = new MyRouter(); Backbone.history.start(); Here is my HTML: Page One Page Two
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/39474192

http://stackoverflow.com/q/25238465
tagged with: css
has answer: http://stackoverflow.com/a/63035682
has body: I'm going to implement CSS width animation in sine function like: But with cubic-bezier, I can only set four parameters like transition: all 500ms cubic-bezier(0.695, 0.015, 1.000, 0.275);. Is it position to achieve this using CSS animation? Or else how to do this in JS?
type: UnansweredQuestion
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39317948
has title: How to use CSS \cubic-bezier to implement sine function?
type: Question
tagged with: javascript
favorite count: 0
tagged with: css-animations
upvote count: 3
answer count: 1

http://stackoverflow.com/q/25345081
favorite count: 0
has title: JavaScript encrypt string without key?
has body: I want to encrypt a string in JavaScript without a key to decrpyt so if people find the encrypted string they cannot decrypt
tagged with: encryption
type: AnsweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/39515022
has answer: http://stackoverflow.com/a/25345203
type: Question
upvote count: 0
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/39515057
has comment: http://stackoverflow.com/comment/39514962
accepted answer: http://stackoverflow.com/a/25345203
answer count: 1
tagged with: string

http://stackoverflow.com/a/25268497
has comment: http://stackoverflow.com/comment/39373846
score: 0
has body: Dropzone can't upload a mock file. Mock file was already uploaded. You can see this issue: https://github.com/enyo/dropzone/issues/418
answers question: http://stackoverflow.com/q/25246822
type: Answer

http://stackoverflow.com/q/25311431
accepted answer: http://stackoverflow.com/a/25311491
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
has body: I have this object $scope.stuff = { '$X': [], '$Y': [], '$Z': [], }; And the following HTML &lt;span ng-repeat="(attr, val) in stuff"&gt;{{attr}}, {{val}}&lt;/span&gt; But the ng repeat doesn't produce anything. If however I delete the '$' from the attribute names - it works. Why?
type: AnsweredQuestion
score: 1
has title: Iterate on object attributes with '$'
upvote count: 1
has answer: http://stackoverflow.com/a/25311491
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39562085
type: Comment
has text: @linurb. Here is the fiddle of my code. http://jsfiddle.net/h8kdfmjs/1/
comment on: http://stackoverflow.com/a/25370601
type: AnswerComment
score: 0

http://stackoverflow.com/a/25282579
score: 1
upvote count: 1
downvote count: 0
type: Answer
has body: In case you won't get clear with the blur event, try to register the click event to an element that is surrounding both the textbox and the dropdown. It may even be the body. Then in the click event check the event.target element. If it is neither the textbox nor the dropdown, close it. It feels clumsy, I know, but it is one of several working options.
answers question: http://stackoverflow.com/q/25282457

http://stackoverflow.com/comment/39493708
type: Comment
type: QuestionComment
has text: Your `row` variable is being declared as a global variable. It should be able to be accessed outside `example_1`, but using implicitly declared global variable is very bad.
score: 1
comment on: http://stackoverflow.com/q/25332919

http://stackoverflow.com/a/25338773
accepted answer of: http://stackoverflow.com/q/25333987
upvote count: 2
answers question: http://stackoverflow.com/q/25333987
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39571008
has body: You could write a custom directive to dynamically compile other directives like this: .directive('tempDynamic', function ($compile, getDirective) { return { scope: { item: '=tempDynamic' }, link: function (scope, element, attrs) { var templateDirective = getDirective(scope.item.type); var html = '&lt;' + templateDirective + ' item="item"&gt;'; var childElement = $compile(html)(scope); element.append(childElement); } } }); And use it like this: &lt;div ng-repeat="item in templates" temp-dynamic="item"&gt;&lt;/div&gt; Example Plunker: http://plnkr.co/edit/r5GNjklVpdbn2ADs7oSf?p=preview Hope this helps.
type: Answer
has comment: http://stackoverflow.com/comment/39567564

http://stackoverflow.com/q/25335296
downvote count: 0
score: 1
favorite count: 0
has title: Karma: how to change preprocessors on commandline (or switch preprocessors in config)
tagged with: command-line
type: AnsweredQuestion
tagged with: karma-runner
upvote count: 1
type: Question
has body: I want to run Karma a couple of times with different preprocessors. Based on the failures, the karma exec listens to --preprocessors on the commandline, but I can't get it set up properly. The following all return the same error. karma start --single-run web-app/karma.conf.js --preprocessors "{\"../grails-app/assets/javascripts/**/!(lib)/**/*.js\": \"jshints\"}" karma start --single-run web-app/karma.conf.js --preprocessors {"../grails-app/assets/javascripts/**/!(lib)/**/*.js": "jshints"} karma start --single-run web-app/karma.conf.js --preprocessors "{'../grails-app/assets/javascripts/**/!(lib)/**/*.js': 'jshints'}" The error: /usr/lib/node_modules/karma/lib/config.js:145 Object.keys(preprocessors).forEach(function(pattern) { ^ TypeError: Object.keys called on non-object at Function.keys (native) at normalizeConfig (/usr/lib/node_modules/karma/lib/config.js:145:10) at Object.parseConfig (/usr/lib/node_modules/karma/lib/config.js:293:10) at Object.exports.start (/usr/lib/node_modules/karma/lib/server.js:282:20) Why am I doing this, are there any alternatives? The coverage and jshint preprocessors aren't compatible. I could copy the karma.conf.js but that's not a great long-term option for maintainability.
tagged with: javascript
has answer: http://stackoverflow.com/a/25341976
accepted answer: http://stackoverflow.com/a/25341976
answer count: 1

http://stackoverflow.com/a/25365148
answers question: http://stackoverflow.com/q/25364410
upvote count: 1
has body: Well, no idea why it wasn't working with the code I posted, as by all means it should have. Anyway, I fixed it by using "JSON.parse()" on the "message" variable passed to "displayText()" I was then able to use "message.username" to get the value.
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/25327120
tagged with: javascript
tagged with: jquery
has body: I got this error Uncaught ReferenceError: highlightedBlock is not defined $(this).parents('.type-coupon').addClass('highlightedBlock'); function findPos(obj) { var curtop = 0; if (obj.offsetParent) { do { curtop += obj.offsetTop; } while (obj = obj.offsetParent); return [curtop]; } } //Scroll to location of highlightedBlock on load window.scroll(0,findPos(highlightedBlock)); says above block is within an event, how can I ensure highlightedBlock is defined? findPos function is to scroll the window's screen to an element, but I can't hardcode highlightedBlock class. Any thought?
has title: scroll to an element using js failed in my case
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25327249
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25327230
type: Question

http://stackoverflow.com/comment/39535150
comment on: http://stackoverflow.com/a/25356599
score: 0
type: Comment
has text: The question tagged jQuery not Underscore.
type: AnswerComment

http://stackoverflow.com/q/25278421
has answer: http://stackoverflow.com/a/25278537
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/25278436
has answer: http://stackoverflow.com/a/25278437
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25278537
has comment: http://stackoverflow.com/comment/39391295
favorite count: 0
has comment: http://stackoverflow.com/comment/39391355
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has body: When I run the following code and mouseover the href nothing changes (no highlight, no changed cursor). If I hold click on it, the hover event throws the alert. I have no clue what could be wrong, this is impacting my web project, but also happening with very basic code. html: Test css: .link{ color: #000; } a.link:hover{ font-size: 18px; color: #00FF00; } jsFiddle Also removing 100% of the jQuery doesn't help either, I was just using that to debug what was going on.
has title: local href's won't mouseover/hover in WAMP
tagged with: css
has comment: http://stackoverflow.com/comment/39391307
upvote count: 1
has answer: http://stackoverflow.com/a/25278436

http://stackoverflow.com/q/25242925
has title: Fullcalendar js eventClick on dynamically added events
has answer: http://stackoverflow.com/a/25243452
has answer: http://stackoverflow.com/a/34003464
has body: I have the following js: !function ($) { $(function(){ // fullcalendar var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); var addDragEvent = function($this){ // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/) // it doesn't need to have a start or end var eventObject = { title: $.trim($this.text()), // use the element's text as the event title className: $this.attr('class').replace('label','') }; // store the Event Object in the DOM element so we can get to it later $this.data('eventObject', eventObject); // make the event draggable using jQuery UI $this.draggable({ zIndex: 999, revert: true, // will cause the event to go back to its revertDuration: 0 // original position after the drag }); }; $('.calendar').each(function() { $(this).fullCalendar({ header: { left: 'prev,next', center: 'title', right: 'today,month,agendaWeek,agendaDay' }, editable: true, droppable: true, // this allows things to be dropped onto the calendar !!! drop: function(date, allDay) { // this function is called when something is dropped // retrieve the dropped element's stored Event Object var originalEventObject = $(this).data('eventObject'); // we need to copy it, so that multiple events don't have a reference to the same object var copiedEventObject = $.extend({}, originalEventObject); // assign it the date that was reported copiedEventObject.start = date; copiedEventObject.allDay = allDay; // render the event on the calendar // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/) $('#calendar').fullCalendar('renderEvent', copiedEventObject, true); // is the "remove after drop" checkbox checked? if ($('#drop-remove').is(':checked')) { // if so, remove the element from the "Draggable Events" list $(this).remove(); } } , events: [ ], eventClick: function(event) { alert('win'); } }); }); getEvents(); }); }(window.jQuery); function getEven…
tagged with: fullcalendar
type: Question
has comment: http://stackoverflow.com/comment/39326453
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25243338
has answer: http://stackoverflow.com/a/70033027
score: 0
answer count: 4
type: UnansweredQuestion

http://stackoverflow.com/comment/40246281
type: AnswerComment
type: Comment
has text: It checks the session ID against the signature and returns it if the cookie has not been tampered with. The ID can be extracted without unsigning as well but that would make using signed cookies pointless. The signature is calculated from the session ID and `secret`. See https://github.com/visionmedia/node-cookie-signature for example.
score: 1
comment on: http://stackoverflow.com/a/25375468

http://stackoverflow.com/q/25231718
tagged with: jquery
has answer: http://stackoverflow.com/a/25231737
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25231745
favorite count: 0
has title: Variable in handler not being reassigned
has answer: http://stackoverflow.com/a/25231741
has comment: http://stackoverflow.com/comment/39304090
has body: I have a boolean variable and two buttons on my page. The boolean variable is assigned to ture on page load and it should switch between true and false when I click Button A and Button B and alert ture when Button A is clicked and alert false when Button B is clicked. The problem with my code is it is alerting true no matter which button is clicked. I can put the alert inside onclick function but I don't want to do it. I want to use boolean variable. Here is code. Button A Button B
answer count: 4
accepted answer: http://stackoverflow.com/a/25231737
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25231734
score: 1
has answer: http://stackoverflow.com/a/25231734
upvote count: 1
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/25232862
favorite count: 0
has comment: http://stackoverflow.com/comment/39306734
has comment: http://stackoverflow.com/comment/39306681
has title: Javascript: How to highlight some numbers or text within a line or paragraph?
tagged with: css
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39306429
has comment: http://stackoverflow.com/comment/39306536
has comment: http://stackoverflow.com/comment/39306939
has body: I am using the nth-child to add red to some specific numbers and it not working. Can someone show how this can be fixed or alternate way to do this using JQuery or CSS? As thisis being generated. Is there a way to select a range to highlight some numbers? p.range:nth-child(n+2):nth-child(-n+4) { color:red; } 123345232 the output should be only 233 should be red
has comment: http://stackoverflow.com/comment/39306793
score: -1
accepted answer: http://stackoverflow.com/a/25233149
has comment: http://stackoverflow.com/comment/39306436
downvote count: 2
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25233149

http://stackoverflow.com/comment/39556481
type: QuestionComment
comment on: http://stackoverflow.com/q/25367834
has text: Have you considered pagination? Or something like what google images does (load as you scroll).
score: 1
type: Comment

http://stackoverflow.com/q/25333050
score: 1
has title: What is the big deal about asynchronous Javascript?
has comment: http://stackoverflow.com/comment/39495224
has comment: http://stackoverflow.com/comment/39495123
has comment: http://stackoverflow.com/comment/39495478
linked to: http://stackoverflow.com/q/3919075
has answer: http://stackoverflow.com/a/25334091
type: Question
has answer: http://stackoverflow.com/a/25333263
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/39495261
has comment: http://stackoverflow.com/comment/39494875
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39493921
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/39493907
has body: I have just started reading more about what asynchronous programming is all about and would ask if my reasoning below is correct and if it is not what am i misunderstanding? My understanding is that asynchronous programming is mostly relevant when talking about I/O, this is because the execution of I/O events are handled by some other execution environment for example the operation system, or database. However I could also run two instances of Node.js for example one instance that needs to be highly responsive on which I instantly pass over execution of long running Javascript processes to another Node.js instance where the longer running processes can lock the singel thread and only send back the callback telling the responsive server that the execution was ok? The most common way to create an external execution environment in which to run asynchronous javascript is to start WebWorkers to avoid blocking the single three? It is also possible to write asynchronous code that has no positive effect, for example if all my asynchronous code is executed on a singel Node.js instance and not passed away to some other execution environment. This would give me no positive effect and only lead to a much more complicated program logic, all my code would still need to be executed in the same environment? So in conclusion, asynchronous programming is all about avoiding executing anything in the singel thread, you only want to pass along the actual execution to some other process? Is my reasoning correct?
has comment: http://stackoverflow.com/comment/39493949
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39495395
tagged with: node.js
has comment: http://stackoverflow.com/comment/39493951
has comment: http://stackoverflow.com/comment/39493895

http://stackoverflow.com/q/25351471
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39525953
has answer: http://stackoverflow.com/a/25351728
tagged with: php
has title: Twitter bootstrap. bootstrap javascript is working but others script wont
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: wordpress
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/62937955
has body: I was wondering why my other scripts wont work but the bootstrap.js is working. I have here my code for my functions.php on calling the scripts. &lt;?php /*Linking of CSS Child Theme to Parent Theme + JavaScript*/ function theme_add_bootstrap() { wp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/css/bootstrap.css' ); wp_enqueue_style( 'custom-css', get_template_directory_uri() . '/css/custom.css' ); &lt;!--Working Javascript --&gt; wp_enqueue_script( 'bootstrap-js', get_stylesheet_directory_uri().'/js/bootstrap.js', array( 'jquery' ) ); wp_enqueue_script( 'custom-js', get_stylesheet_directory_uri().'/js/custom.js', array( 'jquery' ) ); wp_enqueue_script( 'jquery-easy-min-js', get_stylesheet_directory_uri().'/js/jquery.easy.min.js', array( 'jquery' ) ); wp_enqueue_script( 'jquery-1-js', get_stylesheet_directory_uri().'/js/jquery-1.11.0.js', array( 'jquery' ) ); } add_action( 'wp_enqueue_scripts', 'theme_add_bootstrap' ); The other 3 scripts (custom.js , jquery.easy.min.js, and jquery-1.11.0.js) are working fine in LOCALHOST. however when I uploaded my wordpress site. this scripts are no longer functioning. can someone help with this? by the way this 3 scripts are for PAGE SCROLLING.
has answer: http://stackoverflow.com/a/37733354
score: 0
has answer: http://stackoverflow.com/a/73089465
answer count: 3
upvote count: 1
tagged with: javascript

http://stackoverflow.com/a/29060215
upvote count: 6
has body: If you want to retrieve Likes and comments count of a post on FB you can achieve this by using Id of the post Like this ..Your_Post_ID?fields=likes.limit(0).summary(true),comments.limit(0).summary(true) the result will contain Total numbers of likes of the post, total numbers of comments of the post, post ID and post created time. The result will be like this { "likes": { "data": [ ], "summary": { "total_count": 550 } }, "comments": { "data": [ ], "summary": { "order": "chronological", "total_count": 858 } }, "created_time": "2014-10-12T05:38:48+0000", "id": "Your_Post_ID" }
score: 6
answers question: http://stackoverflow.com/q/25328985
downvote count: 0
type: Answer

http://stackoverflow.com/q/25266818
tagged with: jquery
has body: I'm Dragging and Drooping an image from a toolbar onto a canvas and then moving it around in the canvas.Currently I'm able to load multiple images onto a canvas multiple times from the toolbar and delete them on double click as shown in the link below. http://jsfiddle.net/gkefk/33/ I want to add the same functionality on a grid of deleting a particular copy of the image from the canvas grid when the user double clicks on that particular image.For this I'm triggering the same jQuery event on double click which i used in the 1st link. $("#image").dblclick(function(){ layer.remove(); }); Even though I'm double clicking on a particular copy the image,that particular copy is not getting deleted from the grid.I can't understand what I'm doing wrong..Please Help The link to the fiddle containing the jQuery event http://jsfiddle.net/Lucy1/wQ8YA/31/
has answer: http://stackoverflow.com/a/25267373
upvote count: 1
answer count: 1
favorite count: 0
has title: Removing an Image from Canvas Grid on Double Click
tagged with: drag-and-drop
tagged with: kineticjs
type: AnsweredQuestion
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/25267373
type: Question
tagged with: javascript

http://stackoverflow.com/comment/43861759
has text: I get it working only when using as expose name the same name (i mean using require `app.js` with expose `app`, but I get an error when using another string than `app` which seems weird
comment on: http://stackoverflow.com/a/27712825
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25296315
has body: Not in any way I recommend. I you must, there is a way to access an anonymous function from within itself. This is deprecated and wont work in strict mode/ES5+: var anonymousFn = null; this.mouseover(function(parameter) { foo(parameter); anonymousFn = arguments.callee; // now anonymousFn has a reference to the annymous function }); See: arguments.callee
type: Answer
has comment: http://stackoverflow.com/comment/39426395
answers question: http://stackoverflow.com/q/25296193
accepted answer of: http://stackoverflow.com/q/25296193
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/41178501
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25358169
has text: Unfortunately not! There seems to be a bug/"feature" in android's browser that prevents html5-autio from playing...

http://stackoverflow.com/a/26621554
downvote count: 0
answers question: http://stackoverflow.com/q/25328886
upvote count: 2
has body: adding module name as prefix solve the problem! that means /** * @ngdoc function * @name MainModule.NotifyCtrl * @requires $scope * @requires api/NotifyModule.NotificationsService thanks a lot.
type: Answer
score: 2

http://stackoverflow.com/a/25271505
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25269298
has comment: http://stackoverflow.com/comment/39383287
accepted answer of: http://stackoverflow.com/q/25269298
upvote count: 1
type: AcceptedAnswer
has body: When I've done stuff like this in the past, sometimes I'll just rebuild the selections array. Here is some sample code: $(function() { var selections = [], render_selections = function() { $('#selections').html(selections.join(', ')); }; $('input[type="checkbox"]').change(function() { selections = $.map($('input[type="checkbox"]:checked'), function(a) { return a.value; }) render_selections(); }); }); and here is a sample fiddle: http://jsfiddle.net/v4w25pe5/
type: Answer

http://stackoverflow.com/a/25361845
type: Answer
has comment: http://stackoverflow.com/comment/39548232
has comment: http://stackoverflow.com/comment/39557518
upvote count: 5
has body: There is no such event, for instance no onAccessKey event you would have to hook one of the onkey* events. However the accesskey does trigger some activation events for elements when the accesskey is used (tested with chrome and firefox). So you can simply use those events like you would normally as if the user clicked,focused,changed that part of the UI. Display elements, i.e. div,span, etc: onclick input elements, i.e. text,textarea: onfocus, if not previously focused onclick in some browsers input elements, i.e. radio,checkbox: onfocus, if not previously focused onclick onchange, if not previously checked select elements: onfocus, if not previously focused onclick, if not previously selected select element options (triggered on select element): onfocus, if select box not previously focused onclick, if select box not previously selected onchange, if option not previously selected JSFiddle demo An example of using it to open a menu html Menu Item 1 Item 2 Item 3 js jQuery("#menuBtn").click(function(){ jQuery(this).next().toggle(); }); JSFiddle Demo
score: 5
accepted answer of: http://stackoverflow.com/q/25360723
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25360723

http://stackoverflow.com/comment/39338154
type: QuestionComment
comment on: http://stackoverflow.com/q/25249535
has text: try this as your regex: `/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/`
score: 0
type: Comment

http://stackoverflow.com/q/25388249
tagged with: angularjs-scope
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25388498
tagged with: angularjs
upvote count: 2
has body: I have created a custom directive (with some help from SO). It's a full page date picker which uses ngModel to set the date when the user selects a date. At the same time it calls a callback function which is set when the directive is added to the page. The problem is that if I put 2 date pickers on the page then it always tries to call the callback from the second one. Here is the HTML... &lt;fp-date-picker ng-model="dateOne" on-select="dateSelectedOne()"&gt;&lt;/fp-date-picker&gt; &lt;fp-date-picker ng-model="dateTwo" on-select="dateSelectedTwo()"&gt;&lt;/fp-date-picker&gt; Here is my directive with most of it removed for brevity angular.module('directives').directive('fpDatePicker', ['$parse', function ($parse) { return { restrict: 'EA', require: 'ngModel', templateUrl: '/templates/fpDatePicker.tpl.html', link: function($scope, $element, $attrs, ngModel){ // A callback executed when a date is selected var onSelectCallback = $parse($attrs.onSelect); // Set current month $scope.selectedDate = moment(); // Set date when one is clicked $scope.selectDate = function(day){ var selectedDay = day.number; var selectedMonth = $scope.currentMonth.format('MM'); var selectedYear = $scope.currentMonth.format('YYYY'); $scope.selectedDate = moment(selectedYear + '-' + selectedMonth + '-' + selectedDay, 'YYYY-MM-DD'); // Update the model ngModel.$setViewValue($scope.selectedDate); // Call the on-select callback onSelectCallback($scope); }; } }; }]); And just in case it's needed, here is my directive template.... &lt;div class="fpDatePicker-controls"&gt; &lt;a href="#" ng-click="previousMonth()"&gt;&amp;lt;&lt;/a&gt; &lt;a href="#" ng-click="nextMonth()"&gt;&amp;gt;&lt;/a&gt; &lt;/div&gt; &lt;div class="fpDatePicker-month"&gt; &lt;a class="fpDatePicker-day" ng-repeat="day in currentMonth.days" ng-click="selectDate(day)" &gt; {{day.number}} &lt;/a&gt; &lt;/div&gt; I thought that the problem of it always using the callback from the last instance of the directive on the page might be …
type: AnsweredQuestion
score: 2
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/25388498
has title: Multiple custom directives on 1 page with callbacks
tagged with: javascript

http://stackoverflow.com/q/25350248
tagged with: browserify
has comment: http://stackoverflow.com/comment/39524096
has title: Require module node.js
type: UnansweredQuestion
tagged with: node.js
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/39523934
has body: I'm writing a wrapper for a private api. This api only accepts https requests and thus I need to send https requests to make it work. I'm using browserify to bundle up the .js-files. The problem is that the https module seems to noe be loaded properly along with the other modules, like the http modules. After the code beneath has been run, the https variable is undefined, while the http variable is defined as one would expect. Any ideas on what could be wrong here? function(require, module, exports){ (function (process,Buffer){ var optional = require('./lib/optional') , http = require('http') , https = optional('https'); // ...
type: Question
tagged with: javascript

http://stackoverflow.com/q/25249573
tagged with: jquery
tagged with: ajax
accepted answer: http://stackoverflow.com/a/25249800
tagged with: php
type: AnsweredQuestion
tagged with: mysql
has title: send form via AJAX in jQuery then save in MySQL but doesn't work
type: Question
has comment: http://stackoverflow.com/comment/39338306
has comment: http://stackoverflow.com/comment/39338594
tagged with: javascript
has answer: http://stackoverflow.com/a/25249800
has body: as title, I am a beginner about website design. Please never mind if I ask a stupid question. while i send the form, it didnt work. here is html: &lt;form id="form1" name="form1" action="toSQL.php" method="POST" accept-charset="utf-8"&gt; &lt;input type="text" name="Cliname" id="textfield" maxlength = "10" /&gt; &lt;textarea name="message" id="message" rows="3" maxlength = "20" &gt;&lt;/textarea&gt; &lt;input type="submit" value="submit" id="submit" /&gt; &lt;/form&gt; &lt;div class="alert"&gt;&lt;/div&gt; and here is js: &lt;script type="text/javascript"&gt; $(document).ready(function() { var form = $(this) ; var submited = $('#submit') ; var alerted = $('.alert') ; form.on( 'submit', this, (function(event) { event.preventDefault(); if ( $.trim($form.find('input[name="Cliname"]').val()) == "" || $.trim($form.find('input[name="message"]').val()) == "" ) { alert( "please enter!!" ) ; return ; } else { $.ajax({ url: 'toSQL.php', // form action url type: 'POST', // form submit method get/post dataType: 'html', // request type html/json/xml data: form.serialize(), // serialize form data beforeSend: function() { alerted.fadeOut(); }, success: function(data) { alerted.html(data).fadeIn(); // fade in response data form.trigger('reset'); // reset form }, error: function(e) { console.log(e) } }); } })); }); &lt;/script&gt; server side php: &lt;?php if( isset( $_SERVER['HTTP_X_REQUESTED_WITH'] ) ){ if (isset($_POST['Cliname']) AND isset($_POST['message'])) { $name = filter_var($_POST['name'], FILTER_SANITIZE_STRING); $message = filter_var($_POST['message'], FILTER_SANITIZE_STRING); if (send($name, $message)) { echo 'Message sent!'; } else { echo 'Message couldn\'t sent!'; } } else { echo 'All Fields are required'; } return; } function send( $name, $message ) { $time = date("Y-m-d H:i:s"); $mysqlConnection=mysql_connect("localhost", 'root', '') or die("connect error!"); mysql_select_db('test') or die ("db error!"); $queryStr="INSERT INTO fortest (time, message, name) VALUES ( …
has comment: http://stackoverflow.com/comment/39338496
score: 0
has comment: http://stackoverflow.com/comment/39338492
has comment: http://stackoverflow.com/comment/39338209
answer count: 1

http://stackoverflow.com/q/25282291
has comment: http://stackoverflow.com/comment/39398354
upvote count: 0
linked to: http://stackoverflow.com/q/19491650
linked to: http://stackoverflow.com/q/3528509
favorite count: 0
linked to: http://stackoverflow.com/q/8228281
has body: What does (function($) {})(); mean?
possible better answer: http://stackoverflow.com/a/25282345
accepted answer: http://stackoverflow.com/a/25282370
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39398252
has answer: http://stackoverflow.com/a/25282370
downvote count: 1
type: Question
duplicate of: http://stackoverflow.com/q/2937227
duplicate of: http://stackoverflow.com/q/8228281
tagged with: javascript
has answer: http://stackoverflow.com/a/25282345
score: -1
linked to: http://stackoverflow.com/q/2937227
has comment: http://stackoverflow.com/comment/39398154
has title: What does it (function($) {})(); mean?
answer count: 2

http://stackoverflow.com/a/25382865
accepted answer of: http://stackoverflow.com/q/25382311
type: Answer
score: 1
answers question: http://stackoverflow.com/q/25382311
upvote count: 1
has body: In afterLoad() this context it's NivoSlider. So you can call just this.stop(). afterLoad: function() { this.stop(); }
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25266904
has comment: http://stackoverflow.com/comment/39370777
upvote count: 1
has comment: http://stackoverflow.com/comment/39372137
linked to: http://stackoverflow.com/q/750486
accepted answer: http://stackoverflow.com/a/25267864
type: AnsweredQuestion
score: 1
tagged with: loops
has body: I've read these questions: JavaScript closure inside loops – simple practical example How do JavaScript closures work? How do I pass the value (not the reference) of a JS variable to a function? and tried to apply their solutions (as well as at least 1/2 a dozen other implementations) and none of them are working. Here's the function that has the loop: ExecuteQueryWhereQueryAndParamsBothArrays: function (queryArray, paramsArray, idsArray, success, fail, errorLogging) { var hasError = false; $rootScope.syncDownloadCount = 0; $rootScope.duplicateRecordCount = 0; $rootScope.db.transaction(function (tx) { for (var i = 0; i &lt; paramsArray.length; i++) { window.logger.logIt("id: " + idsArray[i]); var query = queryArray[i]; var params = paramsArray[i]; var id = idsArray[i]; tx.executeSql(query, params, function (tx, results) { incrementSyncDownloadCount(results.rowsAffected); }, function(tx, error) { if (error.message.indexOf("are not unique") &gt; 0 || error.message.indexOf("is not unique") &gt; 0) { incrementDuplicateRecordCount(1); return false; } // this didn't work: errorLogging(tx, error, id); // so I wrapped in in an IIFE as suggested: (function(a, b, c) { errorLogging(a, b, idsArray[c]); })(tx, error, i); return true; }); } }, function () { fail(); }, function () { success(); }); And here's the errorLogging function that is writing my message (Note, I'm not able to "write" the message in the same javascript file because I'd need to [angular] inject another reference into this file and it would cause a circular reference and the code won't run) var onError = function (tx, e, syncQueueId) { mlog.LogSync("DBService/SQLite Error: " + e.message, "ERROR", syncQueueId); }; What other method can I implement to stop it from returning the very last "id" of my sync records (when it's only the first record that has the error)?
type: Question
linked to: http://stackoverflow.com/q/111102
tagged with: closures
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39370699
linked to: http://stackoverflow.com/q/2568966
has answer: http://stackoverflow.com/a/25267864
answer count: 1
has title: Javascript closure not working
favorite count: 0

http://stackoverflow.com/q/25358693
has answer: http://stackoverflow.com/a/35100459
answer count: 3
has answer: http://stackoverflow.com/a/33639607
downvote count: 0
tagged with: x-editable
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has body: I am using angular x-editable in my project. http://vitalets.github.io/angular-xeditable/#editable-row Anything works fine except of validation error displaying. Here is my HTML template: Name Width Length Sheets quantity Low price High price Currency {{ material.name }} {{ material.width }} {{ material.length }} {{ material.sheets }} {{ material.priceLow }} {{ material.priceHigh }} {{ showCurrency( material ) }} Save Cancel Edit Delete Add Here is a controller where I handle form behaviour: angular.module( 'client' ) .controller( 'materialController', [ '$scope', '$filter', 'sheetMaterialFactory', function( $scope, $filter, sheetMaterialFactory ){ /** * index action * @return void */ $scope.index = function(){ $scope.currencies = [ { value: 'RUB', text: "Р" }, { value: 'EUR', text: "€" }, { value: 'USD', text: "$" }, ] sheetMaterialFactory.getList().then( function( materials ){ $scope.sheetMaterials = materials; }); $scope.content = "partials/material.html"; } $scope.showCurrency = function( material ){ var selected = $filter('filter')( $scope.currencies, { value: material.currency }); return ( material.currency && selected.length ) ? selected[ 0 ].text : 'Not set'; } /** * update sheet material * @param data – object of material options * @param _id – unique id of material * @return void */ $scope.updateSheetMaterial = function( data, _id, form ){ data._id = _id; var action = data._id ? "update" : "create"; sheetMaterialFactory [ action ]( data ) .then( function( sheetMaterial ){ if( "update" == action ){ var collection = $scope.sheetMaterials; collection = collectionService.updateObject( collection, sheetMaterial ); } else { collection.push( sheetMaterial ); } }, function( error ){ if( error.data.errors ){ angular.forEach( error.data.errors, function( errorData, field ){ form.$setError( field, errorData.message ); }); } else { form.$setError( 'name', 'Неизвестная ошибка' ); } }); } /** * create sheet material * @return void */ $scope.createSheetMaterial = functio…
type: Question
has title: Angular x-editable setError not displaying validation errors
score: 5
has answer: http://stackoverflow.com/a/25368794
upvote count: 5
tagged with: javascript

http://stackoverflow.com/comment/39397809
type: QuestionComment
has text: Possibly because `bar.Bazs` is returning one or more objects and not a property? You can put a breakpoint in the Razor code to see what's being returned. Incidentally, it is considered better to have the linq in your controller and pass the results to the View.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25281176

http://stackoverflow.com/a/25337770
type: Answer
score: 1
has body: I would suggest changing it from hidden checkboxes to a single then updating the jquery to update the hidden #user_group and then getting rid of the name="user_group" from all other elements as that confuses the issue where most browsers take the last value and pass that to the server. HTML Show User Group Group 1 User A User B Group 2 User C User D JS $('.select_box_header span').addClass('nonActiveSpan'); $('.select_box_header').click(function(){ $('.select_box').toggleClass('activeSelect'); //Open Select Box $('.select_box_header span').toggleClass('nonActiveSpan activeSpan'); // Toggle Dropdown Arrow }); /* Check if Custom Checkbox is being checked..*/ $('.select_me').on('click', function(){ $('#user_group').val($(this).attr('data-val')); $('.select_box_header').html($('#user_group').val()); $('.select_box').toggleClass('activeSelect'); //Open Select Box $('.select_box_header span').toggleClass('nonActiveSpan activeSpan'); // Toggle Dropdown Arrow }); You'll want to play with it to make it look nice and not get rid of the arrow when you select a value, and to be able to select the "no value" option again. but this is should answer how to do this. in your PHP script you just use $_REQUEST['user_group'] to access your variable.
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25337385

http://stackoverflow.com/comment/39582355
score: 0
type: Comment
has text: Updating filterQuery should trigger a new render. Could you make a fiddle that reproduces the behavior you're witnessing?
type: AnswerComment
comment on: http://stackoverflow.com/a/25381650

http://stackoverflow.com/comment/39352179
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25256842
has text: thanks this line of code makes issue return proxied.apply(this, arguments);

http://stackoverflow.com/q/25322286
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39473006
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/25322396
type: Question
has title: Angular: parsing DOM objects
tagged with: javascript
has comment: http://stackoverflow.com/comment/39473019
accepted answer: http://stackoverflow.com/a/25322396
answer count: 1
downvote count: 0
has body: Im using an external library that returns an object. I console logged the object and found out that the information im trying to dig can be found here: console.log(object.helper.context.innerHTML); Which produces a whole bunch of html as shown below. Question is, is there a way to parse the "#number text" part? The format is always: hashtag+numbertext. Note: I do not know beforehand what the number / text will be each time. // more code...↑ #55 text joo

http://stackoverflow.com/comment/39660589
type: Comment
has text: That I can also infer from server access logs - assemble a flow and determine if the user went backwards - but that's not what I'm looking for. I would like to know when the user clicked on the back button rather then using the site's built in navigation.
comment on: http://stackoverflow.com/a/25421327
type: AnswerComment
score: 0

http://stackoverflow.com/q/25307554
has comment: http://stackoverflow.com/comment/39445686
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39445419
accepted answer: http://stackoverflow.com/a/25307836
possible better answer: http://stackoverflow.com/a/25307838
has answer: http://stackoverflow.com/a/25307838
has comment: http://stackoverflow.com/comment/39445495
answer count: 2
has comment: http://stackoverflow.com/comment/39445708
has title: How to Call a jQuery Function on Another jQuery Function?
has comment: http://stackoverflow.com/comment/39445672
score: 0
has body: How to call a jQuery function on another jQuery function? I am trying to refresh the contents of a div using the jQuery setInterval and load functions. So far, everything is working fine, except it loads the full div, including the div tags. I only want the contents of the div to be reloaded/refreshed. I tried adding the jQuery function text(), but it isn't working, or maybe I am writing up the wrong syntax. $('#numberOfTries').load('index.php #numberOfTries').text(); does not work. This is what I have so far, which works but loads the entire div with the div tags: HTML of Index.php (Top) <?php echo $numberOfTries; ?> JS of Index.php (Bottom) The script loads the full div, which is 50 , but I only want to load the content of the div, which is 50. When the script runs, the HTML ends up looking like this: 50 But I only want it to look like this: 50 I think my syntax $('#numberOfTries').load('index.php #numberOfTries').text(); is incorrect. Please let me know if clarification is needed.
has comment: http://stackoverflow.com/comment/39445771
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39445615
has answer: http://stackoverflow.com/a/25307836

http://stackoverflow.com/a/25268285
accepted answer of: http://stackoverflow.com/q/25268251
downvote count: 0
has body: jQuery just wraps the method of the same name on the native DOM event object. So, event.stopPropagation() See also, the spec.
has comment: http://stackoverflow.com/comment/39373065
type: Answer
score: 7
has comment: http://stackoverflow.com/comment/39373273
answers question: http://stackoverflow.com/q/25268251
has comment: http://stackoverflow.com/comment/39372934
upvote count: 7
type: AcceptedAnswer

http://stackoverflow.com/a/25303905
score: 0
answers question: http://stackoverflow.com/q/25267667
has body: After many attempts, the following worked for me: function doIfPresent(elementId, doIfPresent, next) { var elem = by.id(elementId); browser.driver.isElementPresent(elem).then(function (present){ if (present) { doIfPresent(element(elem)); } next(); }); } eg. doIfPresent('my-button', function(element){ element.click();}, function(){ // your code continues here }); I don't get it though why we'd need to use futures here.
type: Answer

http://stackoverflow.com/q/25286056
type: Question
tagged with: javascript
has title: How to programmatically add components or views inside other components/views in ember js
has comment: http://stackoverflow.com/comment/39407473
downvote count: 0
answer count: 1
has body: I have a component say {{component-1}} which gets called many times and creates a custom-texbox container and label as many times as it gets called. Now whenever a user writes something in it a suggestion box should appear below it. Since the suggestion box can be reused everywhere i dont want to have a separate suggestion box for each {{component-1}}, rather i want to have another component called {{suggestion-box}} that gets inserted inside component-1 i.e. the textbox container. I dont want {{suggestion-box}} to be inside dom at all since it is needed only when somebody types in it. I want to add/insert it into {{component-1}} when someone types. Instead of a component i even tried to use a view Here are the different things i have tried and failed Note: suggestionBox is the component textbox-container is an element inside {{component-1}} Inside {{component-1}} this.$().find(".textbox-container").append(this.suggestionBox ); where this.suggestionBox = suggestionBoxComponent.create(); I have event tried suggestionBoxView.create(); It gives me the error that i one view cant be inserted into another and i need to use containerView var tmp = Ember.Handlebars.compile('&lt;div class=".suggestionBox"&gt;&lt;/div&gt;'); this.$().find('.textbox-container').append(tmp()); I get the error called Uncaught TypeError: Cannot read property 'push' of undefined I even tried to use view instead of component i.e. make suggestionBox a view but then again i cannot insert one view inside another I have tried a lot more things. Few points: I dont want alternate solutions of how textbox and suggestion box could be created How to pass information from a component or a a template to a view? Say i do {{view "suggestion-box"}} inside component-1 template, how do i pass values to it? Say for components we pass in the context like this {{component1 sampleVar1=val1 sampleVar2=val2}} i Want to know how to programmatically add a component or a view and if it is a view how to pass the data to it?…
has comment: http://stackoverflow.com/comment/39416169
favorite count: 0
has answer: http://stackoverflow.com/a/25287841
type: UnansweredQuestion
tagged with: ember.js
score: 2
tagged with: components
tagged with: view
upvote count: 2

autofill
tags question: http://stackoverflow.com/q/25230993
tag name: autofill
type: Tag

http://stackoverflow.com/q/25302450
has answer: http://stackoverflow.com/a/25302672
has comment: http://stackoverflow.com/comment/39436338
type: Question
has title: How to append input box value between scopes in AngularJS
has comment: http://stackoverflow.com/comment/39436953
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25302672
has body: I was reading this example http://jsfiddle.net/7n8NR/3/ in this example once you click on add to list it added your entered data in Unchecked: array below with check item button and when you press check item button it pushes the values in Checked item array. This is very simple example. What I am going to trying is I have added new input text box in Unchecked: array and trying to send their value to the Checked item array but it is not updating. My working demo is here http://jsfiddle.net/7n8NR/240/ Controller: // Add a Item to the list $scope.addItem = function () { $scope.items.push({ amount: $scope.itemAmount, name: $scope.itemName, //This one I have added qty: $scope.qty }) HTML: amount: {{item.amount}} - name: {{item.name}} - /*This is one I have added*/ qty: check item I am just attempting but don't know the correct way of doing this. Please any one can help on this. Thanks in advance.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/q/25314698
answer count: 5
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25314852
has body: I have this simple jQuery code below that shows or hides a bunch of table rows depending on the value of 2 radio buttons. The code below works great for the click event but I would also like to add in code that work when the page is loaded, before the click event ever happens it should show or hide my table rows based on the value of the radio button. So when page loads, if the radio button for the "yes" value is selected it should show the tables, if no then it should hide them. IF no radio button is selected, it should also hide them. Can someone help to add these additions? $('input[type=\"radio\"]').click(function(){ if($(this).attr('value')=='yes'){ $('.showCta').show(); } if($(this).attr('value')=='no'){ $('.showCta').hide(); } });
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25315400
has answer: http://stackoverflow.com/a/25314843
type: Question
has answer: http://stackoverflow.com/a/25314786
score: 0
has title: Show or hide a table row based on a Radio button value
has answer: http://stackoverflow.com/a/25315400
possible better answer: http://stackoverflow.com/a/25314784
has answer: http://stackoverflow.com/a/25314784

http://stackoverflow.com/comment/39588232
comment on: http://stackoverflow.com/q/25383855
has text: So you are using a webview inside the app?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25374651
score: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25374794
has body: I'm working on an AngularJS app. The app needs to alternate time outs. This alternating is handled by an array. The array looks like this [3000, 1000, 3000, 1000, 5000]. This array means run an operation for three seconds. Then, wait one second. Then run another operation for three seconds. Then wait another second. Finally, run another operation for 5 seconds. The operations will differ. Either way, I'm not sure how to execute them in sequence. How do I execute a series of $timeout elements in AngularJS? Thank you!
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25374794
answer count: 1
has comment: http://stackoverflow.com/comment/39569980
tagged with: angularjs
has title: Executing a series of $timeouts

http://stackoverflow.com/comment/39389618
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25277432
type: QuestionComment
has text: @Franva I bet it is. Check preset values in model.

http://stackoverflow.com/a/25233987
downvote count: 0
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/25233969
has body: Javascript native numbers do not have enough precision (significant digits) to hold the number you are expecting. See the question What is the standard solution in JavaScript for handling big numbers (BigNum)? for suggestions on how to deal with this problem. Depending on your application, you may actually be able to use strings instead of numbers (for example, if your number represents something like a physical part number). You would only need a bigint library if you intend to do arithmetic on your numbers.
accepted answer of: http://stackoverflow.com/q/25233969
type: AcceptedAnswer

http://stackoverflow.com/comment/39448399
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25308856
type: Comment
has text: I want to remove actually

http://stackoverflow.com/comment/39400710
comment on: http://stackoverflow.com/q/25282898
score: 0
type: Comment
type: QuestionComment
has text: omg :-( my bad luck :-(

http://stackoverflow.com/comment/39429702
type: AnswerComment
comment on: http://stackoverflow.com/a/25293538
has text: Sorry, was a little confused. It was with text strings that it failed. Figured it out, though, by adding an if-else to treat strings with d3.ascending
score: 0
type: Comment

http://stackoverflow.com/a/30057114
has body: I found this page to be helpful: https://github.com/nnnick/Chart.js/blob/master/samples/pie-customTooltips.html He shows where and how to define the function for your custom tooltip, as well as an example of the styling. I had to modify the code to match my needs, but this is a great example on how to implement the custom tooltip feature. Some things to note that threw me off at first: 1) The id in the style rules need to be modified to match your tooltip div. (this is obvious, but I didn't catch it at first) 2) tooltip.text will follow the format you set for 'tooltipTemplate' in your options, or the default tooltipTemplate set in chart.js
has comment: http://stackoverflow.com/comment/99611014
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/25338141
score: 0
type: Answer

http://stackoverflow.com/a/25281454
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25281044
has body: Maybe you can change togglePushy to something like this: $.togglePushy = function(){ body.toggleClass(pushyActiveClass); //toggle site overlay pushy.toggleClass(pushyClass); container.toggleClass(containerClass); push.toggleClass(pushClass); //css class to add pushy capability } Now you should be able to access it as $.togglePushy()
downvote count: 0
score: 1

http://stackoverflow.com/q/25320363
has title: Deferred Promise & Jquery
tagged with: loops
has answer: http://stackoverflow.com/a/25323539
has comment: http://stackoverflow.com/comment/39469713
type: Question
accepted answer: http://stackoverflow.com/a/25320503
has comment: http://stackoverflow.com/comment/39485782
has comment: http://stackoverflow.com/comment/39475114
has answer: http://stackoverflow.com/a/25323395
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25323395
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/39498542
tagged with: jquery
has comment: http://stackoverflow.com/comment/39486000
tagged with: deferred
has body: I read a lot of answers about deferred but cannot exactly find what I want. The close piece of code is http://jsfiddle.net/UZzeC/ Difference in my code is that I want to call on "process" function inside the when. statement N number of times. //Dynamically generated JSON list var json_list = [ {"id":"div1","name":"Google.com"}, {"id":"div2","name":"eBay.com"} {"id":"div3","name":"Yahoo.com"}, {"id":"div4","name":"Facebook.com"} ]; $.when( for (var i in json_list) { process(json_list[i].id, json_list[i].name), } ).done(function() { $('#global').text("OK"); } ) .fail(function() { $('#global').text("FAIL"); }); the end state will be the code connecting to multiple web services async and returning its progress when each comes back with data Can I embed this loop like this? I saw some usage on "Apply" with when but not sure how it would work for me.
tagged with: promise
has comment: http://stackoverflow.com/comment/39469473
has answer: http://stackoverflow.com/a/25320503
has comment: http://stackoverflow.com/comment/39475282
type: AnsweredQuestion

http://stackoverflow.com/comment/39390598
comment on: http://stackoverflow.com/q/25248135
has text: You should provide a code example that can be run directly by answerers (e.g. give us an array with dummy data). Since no one can run your code example, no one can be sure that they are writing code that will actually solve your problem.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39397175
has text: Really bad idea to put that much code into an onclick handler. Extract it into a function and call the function from `onclick`, or better yet, attach an event listener.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25281672
score: 0

http://stackoverflow.com/comment/39426092
type: AnswerComment
has text: ". $row['color_name'] ." ";
type: Comment
comment on: http://stackoverflow.com/a/25291946
score: 0

http://stackoverflow.com/q/25298612
upvote count: 2
has body: I'm working on a project that was originally made with sails 0.9.8.something and was recently updated to 0.10.4. I've received errors while trying to run sails lift since then. Here's the error: module.js:340 throw err; ^ Error: Cannot find module './Sails' 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; (/Users/mjbrender/Documents/Development/session86/node_modules/sails/lib/app/index.js:6:13) 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) To confirm, I've updated locally: $ sails -v 0.10.4 And after reading this, I deleted and updated as recommended. Still no luck. Any clue what's up?
tagged with: node.js
accepted answer: http://stackoverflow.com/a/25298703
score: 2
type: AnsweredQuestion
type: Question
tagged with: sails.js
linked to: http://stackoverflow.com/q/21334716
tagged with: javascript
has answer: http://stackoverflow.com/a/25298703
answer count: 1
downvote count: 0
favorite count: 0
has title: Error on sails lift since update to 0.10.4

http://stackoverflow.com/a/25290928
downvote count: 0
has body: The funnel chart doesn't seem to have an option to update its width after it's been created. So the easiest way to adapt to a new size is to simply create a new funnel: $(window).on("resize", function() { options.width = $("#funnelPanel").width(); var funnel = new D3Funnel ( data, options ); funnel.draw('#funnelContainer'); }); See http://jsbin.com/kisawi/1
upvote count: 3
answers question: http://stackoverflow.com/q/25288188
type: Answer
score: 3

http://stackoverflow.com/comment/39463348
has text: dataset would work, but its a bit slower (not an issue for this instance), and doesn't have IE support, if that matters.
type: Comment
comment on: http://stackoverflow.com/a/25316693
score: 1
type: AnswerComment

http://stackoverflow.com/a/25261203
answers question: http://stackoverflow.com/q/25260333
score: 2
downvote count: 0
has body: Here is a Fiddle I created a directive that can render HTML elements based on the data you've given. It's not yet refined but I think this will work. angular.forEach(scope.elements, function(value, key) { // create an element based on its type var newElement = document.createElement(value.type); // add the content newElement.innerHTML = value.content; for (attribute in value) { if (attribute != 'type' &amp;&amp; attribute != 'content') { //apply attribute newElement.setAttribute(attribute, value[attribute]); } } element.append(newElement); }); Limitations Nested elements are not handled by this code (further refinements can handle that) This could be vulnerable to injection attacks, so I suggest you use the ngSanitize module or something similar I'm not sure about the performance :) This is to give you an idea that AngularJS can handle your concern.
type: Answer
upvote count: 2

http://stackoverflow.com/comment/39506426
comment on: http://stackoverflow.com/a/25307753
type: AnswerComment
has text: Thanks for reporting back, Toby. Try and use tags with a lot of followers to have more success, even I don't look at the AES tag regularly.
score: 0
type: Comment

http://stackoverflow.com/comment/39403418
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25284367
has text: Its displaying NAN not a number
score: 0

http://stackoverflow.com/comment/39576669
score: 0
type: Comment
has text: @wen you'll have to use data attribute on some element like i have used in a link and then access it in javascript
type: AnswerComment
comment on: http://stackoverflow.com/a/25378148

http://stackoverflow.com/q/25230592
has answer: http://stackoverflow.com/a/25230663
has answer: http://stackoverflow.com/a/25231072
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39301990
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/39301938
answer count: 2
favorite count: 0
has body: I have an input element. And when focus out a div is closed, and as well I have a handler that when you click on an item in the div when input is onfocus, it changes a select inputs value. The problem is they dont work together. This, just overrides the whole thing: $('.$name input').on( 'blur', function(){ $(this).siblings('div').eq(0).hide(); }); and second handler: $('span.$name div ul').on('click', 'li', function(){ var value = $(this).attr('value'); $('span.$name select').val( value ); }); How do I fix my issue? I tried to use event.target, in first handler, but it returns input box. Here is Html code, if that helps: viens divi tris viens divi tris Whole handler for now: $('.$name input').on( 'blur', function(e){ $('span.$name div ul').on('click', 'li', function(ev){ var value = $(this).attr('value'); var html = $(this).html(); console.log(value); $('span.$name select').val( value ); $('span.$name input').val( html ); $('span.$name div').hide(); }); }); and If I want that div closes always when focus out: $('.$name input').on( 'blur', function(e){ $('span.$name div ul').on('click', 'li', function(ev){ var value = $(this).attr('value'); var html = $(this).html(); console.log(value); $('span.$name select').val( value ); $('span.$name input').val( html ); }); $('span.$name div').hide(); }); Last example doesnt work.
has title: Get clicked element in an event handler
type: UnansweredQuestion
downvote count: 2

http://stackoverflow.com/a/25238421
type: Answer
has body: You are accessing a property of an object, not creating a variable. Don't use the var keyword.
answers question: http://stackoverflow.com/q/25238385
score: 0
has comment: http://stackoverflow.com/comment/39317861
has comment: http://stackoverflow.com/comment/39317578
has comment: http://stackoverflow.com/comment/39317821

http://stackoverflow.com/q/25331167
type: Question
score: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25332197
has title: Does AngularJS run filter on every digest?
has body: {{ item.name }} In this example, if item.type never changes in any of the items, nor does items.length as well as item objects, will AngularJS still run filter on every digest cycle?
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39492714
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25332197

http://stackoverflow.com/q/25353217
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: height
accepted answer: http://stackoverflow.com/a/25353550
has answer: http://stackoverflow.com/a/25353550
tagged with: css
has body: I am looking for plugin that arrange the images like that: http://milli.wpengine.com/ I have trying to do that but I have not succsed... http://build-net.co.il/aba/ Thanks guys. sorry for my bad english
type: AnsweredQuestion
type: Question
has title: plugin that auto img's height got an EXAMPLE

http://stackoverflow.com/a/25268884
score: 2
has body: Your json is invalid. Each entry needs to be wrapped in it's own {}. See http://jsfiddle.net/rbqyf78e/ var data= [ { id: 1, title: 1, message: 'some new message1' }, { id: 2, title: 2, message: 'some new message2' }, { id: 3, title: 3, message: 'some new message3' }, { id: 4, title: 4, message: 'some new message4' }, { id: 5, title: 5, message: 'some new message5' }, { id: 6, title: 6, message: 'some new message6' }, { id: 7, title: 7, message: 'some new message7' }, { id: 8, title: 8, message: 'some new message8' } ];
accepted answer of: http://stackoverflow.com/q/25268800
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25268800

youtube-javascript-api
type: Tag
tags question: http://stackoverflow.com/q/25274217
tags question: http://stackoverflow.com/q/25289687
tag name: youtube-javascript-api
tags question: http://stackoverflow.com/q/25322225

http://stackoverflow.com/q/25232988
has comment: http://stackoverflow.com/comment/39306702
has answer: http://stackoverflow.com/a/25233021
tagged with: href
has title: append once with javascript href link
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has body: I know it has been posted before on how to append only once, but my situation is a little unique because I'm attempting to call the function from an href link. I have my code posted on jsfiddle, but it's not working for some reason. The same code on my site works. Can someone help me get this working so that clicking the href link will append a given string to the #services div only one time. The code thats on my actual site appends the "details" over and over again every time I click the link, but I only want it to do it once. SERVICES More Details var details = ' Just some additional details '; function moreDetails(){ $('#services').append(details); } http://jsfiddle.net/7g59yb5r/1/
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25233201
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25233181

http://stackoverflow.com/a/25300157
has comment: http://stackoverflow.com/comment/39432573
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25299926
has comment: http://stackoverflow.com/comment/39432901
has comment: http://stackoverflow.com/comment/39432636
has comment: http://stackoverflow.com/comment/39433678
type: Answer
has comment: http://stackoverflow.com/comment/39432964
has comment: http://stackoverflow.com/comment/39434080
has body: You can also do this: DEMO: http://www.bootply.com/WOXmGk0wqF Add Class SlideIn (or whatever you want to call it): &lt;div class="navbar navbar-inverse navbar-fixed-top slideIn"&gt; CSS .slideIn { top:-100px; } .navbar {transition:all 1s ease-in-out} jQuery: $('.navbar-inverse').removeClass('slideIn');
has comment: http://stackoverflow.com/comment/39432263
has comment: http://stackoverflow.com/comment/39434069
has comment: http://stackoverflow.com/comment/39433351
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39434160
has comment: http://stackoverflow.com/comment/39432846
has comment: http://stackoverflow.com/comment/39433899
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25299926
has comment: http://stackoverflow.com/comment/39432786
has comment: http://stackoverflow.com/comment/39434016

http://stackoverflow.com/comment/39414058
type: Comment
has text: If you want to bind event handlers, you can use event delegation instead, as explained here: http://stackoverflow.com/questions/12829963/events-triggered-by-dynamically-generated-element-are-not-captured-by-event-hand
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25290594

http://stackoverflow.com/q/25356271
score: 1
has comment: http://stackoverflow.com/comment/39642834
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39644446
has comment: http://stackoverflow.com/comment/39542142
tagged with: google-chrome-extension
has body: I'm making a Chrome Extension for the first time. When I right click the extension icon and inspect the popup this is the error I'm getting. Uncaught SyntaxError: Unexpected end of input myextension/popup.html And the fact that it's failing on an HTML file is making me confused. I looked through about 10 other similar questions and most of the time it's apparently a syntax error in the javascript file. I've linted mine with a couple different linters and still nothing is showing up. Could somebody help me spot a mistake here? It's 62 lines: function updatePopup(){ listofbad = JSON.parse(localStorage["badguys"]); $('#dumpster').empty(); var i = 0; for(i = 0; i < listofbad.length; i = i+1){ $('#dumpster').append( listofbad[i] + " "); } } $(document).ready(function(){ if(localStorage["badguys"] != undefined){ var namesthe = JSON.parse(localStorage["badguys"]); updatePopup(); chrome.tabs.query({ active: true, currentWindow: true }, function(tabs) { /* ...and send a request for the DOM info... */ console.log("Sending message from popup to content"); chrome.tabs.sendMessage( tabs[0].id, {from: 'popup', subject: 'DOMInfo', newnames: namesthe} ); } ); } }); function save_options() { var thenames = []; if( localStorage["badguys"] != undefined ){ thenames = JSON.parse(localStorage["badguys"]); } console.log("JSONParse: " + thenames.toString()); //thenames = ["Aidenator", "Moobot", "Nightbot", "Teamevilmaster"]; var elname = document.getElementById("namebox").value; if( $.inArray(elname, thenames) > -1 ){ return false; } thenames.push(elname); localStorage["badguys"] = JSON.stringify(thenames); updatePopup(); chrome.tabs.query({ active: true, currentWindow: true }, function(tabs) { /* ...and send a request for the DOM info... */ console.log("Sending message from popup to content"); chrome.tabs.sendMessage( tabs[0].id, {from: 'popup', subject: 'DOMInfo', newnames: thenames} ); }); } document.getElementById('namebutton').addEventListener('click', save_options); function clearlis…
has title: Uncaught SyntaxError: Unexpected end of input on popup.html file in Chrome Extension
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/39642949

http://stackoverflow.com/q/25334944
favorite count: 0
tagged with: backbone.js
has title: pnotify: buttons don't work
score: 3
has answer: http://stackoverflow.com/a/25414192
has body: I'm trying to use buttons of Pnotify but I couldn't get them to work. The problem is that I'm using Pnotify with requiredJS and Bower (within backbone).. I tried in many ways.. Pnotify documentation has a comment regading this issue: (https://github.com/sciactive/pnotify#using-pnotify-with-requirejs) this is the example: requirejs(['pnotify', 'pnotify.nonblock', 'pnotify.desktop'], function(PNotify){ PNotify.desktop.permission(); new PNotify({ title: 'Desktop Notice', text: 'If you\'ve given me permission, I\'ll appear as a desktop notification. If you haven\'t, I\'ll still appear as a regular PNotify notice.', desktop: { desktop: true }, nonblock: { nonblock: true } }); }); That example works for me, so I modified it a little bit for my needs: require(['pnotify', 'pnotify.buttons', 'pnotify.nonblock'], function(PNotify){ new PNotify({ title: title , text: msg, type: classes, delay: delay, animation: 'fade', opacity: .9, nonblock: { nonblock: true, nonblock_opacity: .2 } }); }); Is this way the nonblock messages works fine and the desktop notifications too (if needed) but buttons don't appear... Someone had a similar problem?? Any idea? it would be great to find a solution for this.. Thanks! NOTE: I already have all pnotify's modules installed
upvote count: 3
tagged with: requirejs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25414192
tagged with: javascript
tagged with: pnotify
type: Question
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/39425242
score: 0
has text: It's working of course but I want to get sth like this: hex_hmac_sha1("1492343027",'ą') == hash_hmac("sha1", $x , "1492343027") what $x should be? hex_hmac_sha1 function results are ok, php is problem for me
type: Comment
comment on: http://stackoverflow.com/a/25296091
type: AnswerComment

http://stackoverflow.com/q/25278093
tagged with: node.js
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25281101
has title: order of execution of node JS timer APIs
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25281101
has body: I am very new to node.js. Am trying to understand what exactly is meant by 'asynchronous' in terms of node js. In the above context I have the below code:- function foo() { setImmediate(function two() { console.log(1); }); setTimeout(function one() { console.log(3); },0); process.nextTick(function three() { console.log(2); }); console.log(4); } foo(); can some one please explain me, in depth, as to what exactly would be the order of execution for all of the above timer APIs and WHY will it be so? Any explanations/references regarding the call back stack etc. will also be helpful.
tagged with: asynchronous
upvote count: 2

http://stackoverflow.com/a/25288516
type: Answer
has comment: http://stackoverflow.com/comment/39434668
downvote count: 0
score: 3
answers question: http://stackoverflow.com/q/25288471
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25288471
type: AcceptedAnswer
has body: You have to assign the event to the ul itself, passing in the li element as a parameter: $('ul#container').on('click', '#li_' + xy, function() { ... }); This is known as event delegation. Event delegation allows us to attach a single event listener, to a parent element, that will fire for all descendants matching a selector, whether those descendants exist now or are added in the future. If each li element will have the same click function, you can move that click handler outside of your for loop completely. As a side note you can also move that var declaration down into your for loop like so: for (var xy = 1; ...; ...)

http://stackoverflow.com/a/25300560
answers question: http://stackoverflow.com/q/25300502
has body: To toggle the width you should so something like this: &lt;script&gt; $("a:nth-child(4)").click(function () { var targetWidth = (someBoolean) ? '100px' : '300px'; $(".artists").animate({width:targetWidth},0); $('.blur').toggleClass('blurbody'); }); &lt;/script&gt;
score: 0
type: Answer

http://stackoverflow.com/a/25269464
accepted answer of: http://stackoverflow.com/q/25269260
answers question: http://stackoverflow.com/q/25269260
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39375275
has body: Your binding will not work if you attempt to bind to DOM elements contained in $('.activated') before creating them. What this usually means is that you need that event listener to bind after creating. If you're dynamically creating DOM elements, you need to do something like this: var activeFilterNames = []; $('.filter').click(function() { if (!this.classList.contains('disabled')) { activeFilterNames.push(this.textContent); i = activeFilterNames.length; var newFilter = document.createElement('span'); newFilter.id = activeFilterNames[i-1]; newFilter.className = this.className+" activated"; newFilter.innerHTML = activeFilterNames[i-1]; document.getElementById('active_filters').appendChild(newFilter); $('.activated').unbind('click'); $('.activated').click(function() { alert('hi'); } ); $("#active_filters &gt; span").removeClass('filter'); $(this).addClass('disabled'); } } ); Notice, before binding we unbind. This makes sure that if you do this multiple times, you aren't binding 2, 3, 4 times to the same DOM element.

input
tags question: http://stackoverflow.com/q/25325663
tags question: http://stackoverflow.com/q/25319400
tags question: http://stackoverflow.com/q/25310701
tags question: http://stackoverflow.com/q/25344603
tags question: http://stackoverflow.com/q/25372458
tags question: http://stackoverflow.com/q/25366846
tags question: http://stackoverflow.com/q/25364544
tags question: http://stackoverflow.com/q/25324079
tags question: http://stackoverflow.com/q/25352536
tags question: http://stackoverflow.com/q/25294336
tags question: http://stackoverflow.com/q/25344485
tags question: http://stackoverflow.com/q/25374034
tag name: input
tags question: http://stackoverflow.com/q/25306451
type: Tag
tags question: http://stackoverflow.com/q/25259621
tags question: http://stackoverflow.com/q/25261895
tags question: http://stackoverflow.com/q/25309998

http://stackoverflow.com/a/25247231
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25247125
has comment: http://stackoverflow.com/comment/39334363
score: 4
accepted answer of: http://stackoverflow.com/q/25247125
has comment: http://stackoverflow.com/comment/39333775
has comment: http://stackoverflow.com/comment/39333891
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/39333738
downvote count: 0
has body: I want the javascript loaded only on the domain that I specify, while if it is loaded by another domain, the page will be directed to the domain that I specify. This should do it: if (location.host != "your.domain") location.href = "http://your.domain"; I want to use this method to avoid theft and cloning scripts by people who are not responsible. That line will only help against the case that the other domain includes your.domain/script.js (and steals your bandwidth). When the script is actually copied (and not served from your server), it would be trivial to remove such a line. It's impossible to protect. Rather have a look at How can I obfuscate (protect) JavaScript?
has comment: http://stackoverflow.com/comment/39334472
has comment: http://stackoverflow.com/comment/39334506

http://stackoverflow.com/comment/39591252
comment on: http://stackoverflow.com/q/25385561
type: Comment
type: QuestionComment
has text: I don't get your issue : if the figures smoothly disappear, then they leave a ghost... ? Could you share a picture of your issue ?
score: 0

http://stackoverflow.com/comment/39414911
comment on: http://stackoverflow.com/q/25291000
score: 0
type: Comment
type: QuestionComment
has text: Okay, thanks for your help. I did not understand that part of the description.

http://stackoverflow.com/q/25315134
has body: I am facing problem in Internet Explorer, the following code is running fine on both Firefox and Chrome, but Internet Explorer showing alert value "undefine" var yearId = $('#planService tbody tr td select#recognizeType').val(); alert(yearId); $('#recogTypeId').val(yearId); any update ?
type: AnsweredQuestion
upvote count: 0
possible better answer: http://stackoverflow.com/a/25315285
type: Question
has comment: http://stackoverflow.com/comment/39459770
has comment: http://stackoverflow.com/comment/39461121
score: -1
accepted answer: http://stackoverflow.com/a/25325163
has title: Internet Explorer showing alert value "undefine" but Firefox and chrome showing actual value
answer count: 2
has comment: http://stackoverflow.com/comment/39459840
downvote count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25315285
favorite count: 0
has answer: http://stackoverflow.com/a/25325163
has comment: http://stackoverflow.com/comment/39460014
has comment: http://stackoverflow.com/comment/39459698
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25236691
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25234939
answers question: http://stackoverflow.com/q/25234939
upvote count: 1
has body: Wrote this in Haskell first just to get the algorithm down. import Data.List (maximumBy, tails) import Data.Map (Map, findWithDefault) import qualified Data.Map.Strict as Map import Data.Ord (comparing) main :: IO() main = putStrLn $ show $ normalize [[1..6], [7..9], [5..6], [9]] normalize :: Ord a =&gt; a -&gt; a normalize xxs = map (\xs -&gt; findWithDefault xs xs index) xxs where index = suffixIndex xxs suffixIndex :: Ord a =&gt; a -&gt; Map [a] [a] suffixIndex xxs = Map.fromListWith (maxBy length) entries where entries = [ (suf, xs) | xs &lt;- xxs, suf &lt;- suffixes xs ] suffixes xs = drop 1 $ filter (not . null) $ tails xs maxBy :: Ord b =&gt; (a -&gt; b) -&gt; a -&gt; a -&gt; a maxBy f x y = maximumBy (comparing f) [x, y] suffixIndex maps each suffix to the longest list having that suffix. So, for example [[1,2,3], [2,3]] results in an index that looks like [2,3] -&gt; [1,2,3], [3] -&gt; [1,2,3]. Once the index is built, each list is "normalized" (to use your word) by just applying the map (if a mapping exists). And now in Javascript. console.log(JSON.stringify(normalize([[1,2,3,4,5,6], [7,8,9], [5,6], [9]]))); function normalize(xxs) { var index = suffixIndex(xxs); return xxs.map(function (xs) { str = JSON.stringify(xs); return index.hasOwnProperty(str) ? index[str] : xs; }); } function suffixIndex(xxs) { var index = {}; xxs.forEach(function (xs) { suffixes(xs).forEach(function (suffix) { var str = JSON.stringify(suffix); index[str] = index.hasOwnProperty(str) ? maxBy(lengthOf, index[str], xs) : xs; }); }); return index; } function suffixes(xs) { var i, result = []; for (i = 1; i &lt; xs.length; i++) result.push(xs.slice(i)); return result; } function lengthOf(arr) { return arr.length; } function maxBy(f, x, y) { return f(x) &gt; f(y) ? x : y; }
score: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/76085497
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25231729
has text: Will check it once I reach my room
score: 0

http://stackoverflow.com/q/25336588
has body: I'm trying to understand how the Same Origin Policy (SOP) applies in different situations. I have the following JavaScript code written in a local HTML file and run with Chrome on Windows: $(document).ready(function () { $.get("http://www.quandl.com/api/v1/datasets/FRED/GDP.json", function (r) { window.alert(r.source_name); }); }); It works by giving me data retrieved from another domain (www.quandl.com). However, if I swap that with google.com, the callback won't be invoked: $(document).ready(function () { $.get("http://www.google.com", function (r) { window.alert(r); }); });
has answer: http://stackoverflow.com/a/25336678
has comment: http://stackoverflow.com/comment/39500501
has comment: http://stackoverflow.com/comment/39500577
tagged with: javascript
tagged with: jquery
tagged with: same-origin-policy
type: AnsweredQuestion
score: 3
downvote count: 0
has title: Same Origin Policy seemingly inconsistent using jQuery AJAX API
accepted answer: http://stackoverflow.com/a/25336678
has comment: http://stackoverflow.com/comment/39500492
favorite count: 0
tagged with: ajax
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/39500508
upvote count: 3

http://stackoverflow.com/q/25370106
type: Question
has comment: http://stackoverflow.com/comment/39561167
has comment: http://stackoverflow.com/comment/39561110
accepted answer: http://stackoverflow.com/a/25372496
tagged with: javascript
tagged with: forms
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25370306
has answer: http://stackoverflow.com/a/25372496
has answer: http://stackoverflow.com/a/25370306
tagged with: jquery
has body: I am writing a program which requires a text box and a textarea to be added dynamically to a form. I am using the clone function for this purpose. Unfortunately, I cannot seem to figure out how to make each box have a unique ID. Here is my Jquery: And my HTML: Thank you in advance for your help
has title: Naming two different inputs in a dynamically created form with JQUERY
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39561084
tagged with: dynamic
has comment: http://stackoverflow.com/comment/39561343

http://stackoverflow.com/comment/39436348
type: QuestionComment
has text: Your question doesn't make sense. If this is a production page and the config.js is included in the page, why do you try to include it through casper again? You probably can't overwrite configurations that are done in the original config.js with your own, but that depends on the actual code of config.js. Please some string to distinguish between the events. Also, have you tried waiting a little after the click? `this.wait(5000, function(){fs.write(...);});`
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25279827

http://stackoverflow.com/q/25331042
answer count: 2
has answer: http://stackoverflow.com/a/25334761
tagged with: apache
tagged with: websocket
accepted answer: http://stackoverflow.com/a/26470586
tagged with: javascript
score: 0
has body: I am new in websockets technology. I was trying to create a websockets php server and connect to the server with a javascript client. I am using xampp 1.8.3. I made this simple PHP server: <?php error_reporting(E_ALL); set_time_limit(0); $address = "127.0.0.1"; $port = 1777; $maxConnections = 10; if(!($sock = socket_create(AF_INET, SOCK_STREAM, 0))){ $errorCode = socket_last_error(); $errorMsg = socket_strerror($errorCode); die("socket_create() failed -> {$errorCode}:{$errorMsg}\n"); } echo "Server created.\n"; if(!(socket_bind($sock, $address, $port))){ $errorCode = socket_last_error(); $errorMsg = socket_strerror($errorCode); die("socket_bind() failed -> {$errorCode}:{$errorMsg}\n"); } echo "Server opened on {$address}:{$port}\n"; if(!(socket_listen($sock, $maxConnections))){ $errorCode = socket_last_error(); $errorMsg = socket_strerror($errorCode); die("socket_listen() failed -> {$errorCode}:{$errorMsg}\n"); } echo "Waiting for connections...\n"; $client = socket_accept($sock); if(socket_getpeername($client, $address, $port)){ echo "The client {$address}:{$port} is online.\n"; } $msg = socket_read($client, 1024000); if(!(socket_write($client, $msg, strlen($msg)))){ $errorCode = socket_last_error(); $errorMsg = socket_strerror($errorCode); die("socket_write() failed -> {$errorCode}:{$errorMsg}\n"); } echo "Message sent\n"; socket_close($client); socket_close($sock); ?> I ran this php file with xampp shell using the following expression: php htdocs/server.php and I got this message on shell: php htdocs/server.php Server created. Server opened on 127.0.0.1:1777 Waiting for connections... Then I opened my client.html on chrome (my supports websockets). My client.html code is: Websockets web-server connection Websockets connection. Status: And I received this message on javascript console log: WebSocket connection to 'ws://127.0.0.1:1777/' failed: client.html:9 And my shell had this messages: php htdocs/server.php Server created. Server opened on 127.0.0.1:1777 Waitin…
tagged with: php
has answer: http://stackoverflow.com/a/26470586
type: AnsweredQuestion
has title: Creating a PHP websockets server
possible better answer: http://stackoverflow.com/a/25334761
type: Question

http://stackoverflow.com/a/31488989
downvote count: 1
answers question: http://stackoverflow.com/q/25319453
has comment: http://stackoverflow.com/comment/51050140
has body: Well in ES2016 you can use the same decorator pattern that python does. I've created a module that let you easily wrap your original code with your own. https://github.com/cmartin81/decorator-wrap
type: Answer
score: 0
upvote count: 1

http://stackoverflow.com/q/25321777
has title: Pushing objects in an array only returns last object pushed
downvote count: 0
possible better answer: http://stackoverflow.com/a/55967707
has answer: http://stackoverflow.com/a/55967707
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/25321965
tagged with: http://stackoverflow.com/tag/html
tagged with: datatable
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25322094
has body: I am working on YUI DataTables, to populate the data table i want to send the columns and their values dynamically from outside, for that i have written the following code: &lt;html&gt; &lt;script src="http://yui.yahooapis.com/3.17.2/build/yui/yui-min.js"&gt;&lt;/script&gt; &lt;div class="example yui3-skin-sam" id="simple"&gt; &lt;!-- You need this skin class --&gt; &lt;/div&gt; &lt;script&gt; var cols = ["id", "name", "price"]; var obj = { id: "", name: "", price: "" }; var data2 = new Array(); obj.id = "ga"; obj.name = "gadget"; obj.price = "$6.99"; data2.push(obj); obj.id = "ga2"; obj.name = "gadget2"; obj.price = "$7.99"; data2.push(obj); obj.id = "ga3"; obj.name = "gadget3"; obj.price = "$8.99"; data2.push(obj); YUI().use("datatable", function (Y) { // A table from data with keys that work fine as column names var simple = new Y.DataTable({ columns: cols, data : data2, summary: "Price sheet for inventory parts", caption: "Example table with simple columns" }); simple.render("#simple"); }); &lt;/script&gt; &lt;/html&gt; now the problem is that, it shows only the last obj pushed in data2.. kindly tell me why its not displaying all three objs. the resulting table from this code is id name price ga3 gadget3 $8.99
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/39519597
type: Question
tagged with: yui
has answer: http://stackoverflow.com/a/38025273
tagged with: javascript
has answer: http://stackoverflow.com/a/25322094

http://stackoverflow.com/q/25308943
has answer: http://stackoverflow.com/a/25311658
answer count: 1
has title: Limit OrbitControls horizontal rotation
has body: How can I limit horizontal rotation on OrbitControls? Inside the code I could see that it's possible to limit it vertically using minPolarAngle and maxPolarAngle. But I couldn't find a way to limit it horizontally. -- Edit: I know that it OrbitControls doesn't rotate the Mesh but the Camera. I just want a solution to put horizontal limits on the camera.
upvote count: 9
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25311658
downvote count: 0
tagged with: javascript
favorite count: 0
score: 9
type: Question
tagged with: three.js

http://stackoverflow.com/q/25241155
has comment: http://stackoverflow.com/comment/39321992
has comment: http://stackoverflow.com/comment/39323275
has title: Plugin not working as intended, possible Javascript / jQuery variable scope issue
accepted answer: http://stackoverflow.com/a/25259495
upvote count: 1
has body: I have created a basic plugin using a Codepen that I found which allows for "sticky" elements to be displayed on site. I've not written a plugin before and I seem to be getting confused with variables (var var_name, var $var_name etc.) and then also when referring back to them. I feel this misunderstanding is causing the problem with the plugin. I have two elements that scroll with the page but stop when they reach the bottom of their parent. This works fine however the first element appears to be sticking to the bottom of the parent once it has reached the offset position of the following element. So to me it looks like the height of the 2nd element is being used to calculate the position of the first. Below is the plugin and the two bits of code I'm using it initiate the plugin. I have set up a jsfiddle however it is coming up with an undefined is not a function error. //Initiate plugin $(window).load(function() { $('.section-1-pin').sticky({ parent: '#section-1', main: '.section-1-sibling' }); $('.section-2-pin').sticky({ parent: '#section-2', main: '.section-2-sibling' }); }); //Plugin code in external file (function($) { $.fn.sticky = function( options ) { return this.each(function() { var $this = $(this); options = options || {}; var parent = options.parent; var $main = options.main; if( !$this.parent().is('.wrap') ) { $this.wrap( '&lt;div class="wrap"&gt;&lt;/div&gt;' ); } $( '&lt;div class="sticky-stop"&gt;&lt;/div&gt;' ).insertAfter( parent ); measureheight = function() { stickyHeight = $this.outerHeight(); mainHeight = $(String($main)).outerHeight(); var stickyStop = $(parent).next('.sticky-stop'); console.log(stickyHeight); if ( (mainHeight - stickyHeight) &gt; 0) { $(parent).waypoint(function(direction) { $(parent).toggleClass('sticky', direction === 'down'); }); $(stickyStop).waypoint(function(direction) { $(parent).toggleClass('at-bottom', direction === 'down'); }, { offset: function() { return stickyHeight; } }) } else { $(parent).waypoint('destroy');…
type: AnsweredQuestion
score: 1
tagged with: jquery-waypoints
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25259495
favorite count: 0
tagged with: scope
has comment: http://stackoverflow.com/comment/39322238

http://stackoverflow.com/a/25406418
score: 2
downvote count: 0
upvote count: 2
type: Answer
has body: I wanted to comment, but it seems my reputation is not high enough to do so. Hence, the reply. I took a look at jScrollPane, and it seems as if it listens to the "scroll" event of the mouse and scrolls using window.scrollBy and causes jQuery's .scroll not to fire. Though I cannot assure this is why it won't fire (I'm assuming this is why your code won't work), since my knowledge in javascript is pretty limited. Replacing $(element).scroll(function () {}); with $(element).on('mousewheel DOMMouseScroll', function() {}); should fix it. I think... Why it should, you probably should ask someone else as I would only cause confusion.
answers question: http://stackoverflow.com/q/25331377

http://stackoverflow.com/a/25378865
score: 0
type: Answer
has body: If i understood correctly, (Assuming you want the value in both fields to be the same) the issue is that you are trying to load the value corresponding to the id of element from localStorage. If the user didn't type anything in either of the textboxes, corresponding value will be empty. You should update a common value in localstorage once the user types which will be displayed in both fields. $('#email').on("blur keyup change", function () { $('#emailCopy').val($(this).val()); // If you want to display on the go localStorage.setItem("email", $(this).val()); }); $('#emailCopy').on("blur keyup change", function () { $('#email').val($(this).val()); // If you want to display on the go localStorage.setItem("email", $(this).val()); }); $('#email, #emailCopy').val(localStorage.getItem("email")); Demo
answers question: http://stackoverflow.com/q/25378631

http://stackoverflow.com/q/25266637
tagged with: angularjs
type: UnansweredQuestion
has body: From AngularJS isArray source: return toString.call(value) === '[object Array]'; Why did they not go with? return value instanceof Array;
has answer: http://stackoverflow.com/a/25266688
type: Question
upvote count: 4
tagged with: arrays
answer count: 1
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
has title: Why does AngularJS not use instanceof in its isArray function?

http://stackoverflow.com/comment/39866035
type: QuestionComment
comment on: http://stackoverflow.com/q/25236714
score: 0
has text: Does this help? It is a non-kendo discussion of the same thing: http://stackoverflow.com/questions/23749244/how-can-i-make-a-textarea-with-character-limit-highlighting-like-twitter
type: Comment

http://stackoverflow.com/q/25232869
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25233062
has answer: http://stackoverflow.com/a/25233062
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39306551
tagged with: css
favorite count: 0
has title: CSS width animation not working when clicking tabs
has body: Below is a stripped down version of something I'm working on. Basically I have a series of tabs that when clicked on, show a different picture. When I click on the tab, I want to animate the overflow width, revealing the .show content. I can't figure out why things are not animating. FYI, I'm doing this in Chrome. LIVE CODE HTML: Slide 1 Slide 2 Slide 3 CSS: .container { width:800px; margin:0 auto; background:#999999; } ul { list-style-type:none; display:table; width:100%; } li { display:table-cell; color:#ffffff; } li.active { color:blue; } .tab-wrapper { width:800px; height:300px; border-top:solid 20px #ffffff; } .tab { width:800px; height:300px; position:relative; background:#666666; display:none; } .tab.active { display:block; } .overflow { width:0%; height:100%; border:solid 3px red; overflow:hidden; position:relative; -webkit-transition:width 1s ease; } .tab.active .overflow { width:100%; -webkit-transition:width 1s ease; } [data-slide="1"] .show { width:800px; height:200px; top:50px; position:absolute; } [data-slide="1"] .show { background:yellow; } [data-slide="2"] .show { background:green; } [data-slide="3"] .show { background:blue; } JS: $('.tabs li').click(function() { var tab = $(this).data('tab'); var picked = $('.tab').data('slide', tab); $('.tabs li.active').removeClass('active'); $('.tab.active').removeClass('active'); $(this).addClass('active'); $('.tab[data-slide=' + tab + ']').addClass('active'); });
upvote count: 1
has answer: http://stackoverflow.com/a/25234207
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39306637
accepted answer: http://stackoverflow.com/a/25234207
type: Question
answer count: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/25276719
type: Question
answer count: 2
has title: Text/Image button in Safari not clicking
accepted answer: http://stackoverflow.com/a/25276770
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25277184
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25276770
tagged with: css
tagged with: macos
tagged with: safari
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25277184
has body: I've been searching around the apple forums and did a search here but I can't seem to find a solution. I have a button which has text in it. The button is a 'sliding doors' image button. The button has a javascript event listener. When the user clicks the text in the button the button does not function, however when the user clicks the image area of the button it does work. Any idea how to fix this? HTML Next CSS .buttonWrapper{ position: relative; z-index: 3; width:100%; max-width: 477px; height:152px; overflow: hidden; margin-left: auto; margin-right: auto; background-color: green; } .button{ position: absolute; z-index: 1; width:100%; max-width: 477px; height:304px; background-color:red; } .button:hover{ opacity:0.7; } .button:active{ top:-152px; } .buttonClicked{ top:-152px; } .buttonText{ position: absolute; top:0; width: 100%; height:304px; text-transform: uppercase; font-size: 30px; color: #fff; line-height: 152px; text-align: center; } I've put together a JSFiddle to show the issue. http://jsfiddle.net/xv5of614/4/ On OSX Safari click the text, nothing happens. Then click the read button area, an alert is triggered. I should also add that this also happens if using an a href in place of the listener. Does anyone know how to solve this?

http://stackoverflow.com/a/25264565
downvote count: 0
has body: There is an experimental infobar API, but it's unknown when, if ever, it becomes stable. As-is, you really need to inject your UI into the page DOM from a content script, with an iframe being a good solution to separate your UI from the page.
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25264327

http://stackoverflow.com/q/25371204
has comment: http://stackoverflow.com/comment/39563353
upvote count: 1
has body: The problem: I'm getting double keypresses from one keypress event when that event updates content in two windows. (I am a hobbyist. Please forgive my lack of expertise. Thanks.) I am trying to use one browser window to control the display of contents in a window launched from that first window. That first window also has a div that shows the content sent to the second window. I'm using shortcut.js to assign to the space bar the command to update each window. But the problem I'm about to describe also occurs when I use the plain old jQuery keypress() function. I've tried altering the parameters of the shortcut.js function to no avail. Here's a simplified version of the code: g_win = window.open('displaywin.html'); // launch the second window slideContent = updateTheContent(); // get new content for window #2 slideContentPreview = alterTheContent(slideContent); // modify it for window #1 if (g_win != undefined){ // Is window #2 open? $("#display2").html(slideContent); // display the content in window #2 } $("#display1").html(slideContentPreview); // always display the content in window #1 Here's the jquery keypress code: $(document).keypress(function(e) { switch(e.which) { case 32: { // space showNextSlide(); break; } default: return; } e.preventDefault(); }); The weird thing is that it works fine if I haven't launched the second window. But if g_win is launched, the content is updated properly, but the Space keypress event is triggered again, causing the program to update the contents again. The effect is that every other piece of content is skipped in both windows. What amazingly obvious mistake am I making? Thanks! [LATER:] Here is the entire html for window #2: whatev Click in presenter view to start
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39563342
has title: Single keypress firing twice when controlling content in a second window
has comment: http://stackoverflow.com/comment/39564271
has answer: http://stackoverflow.com/a/25371649
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39563844
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
score: 1

http://stackoverflow.com/a/25344286
answers question: http://stackoverflow.com/q/25344214
score: 1
upvote count: 1
has body: As others have mentioned, you could set a variable to $(this) if you wish to use it in another function. On practical example would be when doing an ajax call tied to an event on the page. Using JQuery: &lt;script&gt; $(document).on("click", ".mySelector", function () { // Where we are in the click event, $(this) refers to whatever // element has a class of mySelector that was clicked var self = $(this); theDiv.html(''); $.ajax({ cache: false, type: "GET", url: "/SomeAjaxMethod", data: { }, success: function (data) { // Trying to access $(this) here will return undefined, as // we are technically in the callback method // Where our event is based on a class, there is likely more // than one element on the page with the class, so it would be // difficult to get the exact element again without some other code self.html(data); }, error: function (xhr, ajaxOptions, thrownError) { alert("Ajax failed.") } }); // end ajax call }); // end on mySelector class click &lt;/script&gt; or: &lt;script&gt; $(document).ready(function () { $('.foo').click(function () { var self = $(this); // Whatever element that was clicked with foo class $('.bar').each(function () { var bar = $(this); // Current iteration of bar element in the loop var baz = self; // self is still the initial value, but $(this) is not }); // end bar loop }); // end foo click }); // end doc ready &lt;/script&gt;
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39528670
comment on: http://stackoverflow.com/a/25352363
type: AnswerComment
score: 0
type: Comment
has text: I didn't do anything @Vivek...

http://stackoverflow.com/comment/39419971
type: AnswerComment
has text: I'd add #3, bumping the mouse speed and click settings to max
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25271290

http://stackoverflow.com/q/25297800
has body: I'm trying to record audio but the files as they are stored on server are only 10kb or less. The file is being saved to server, and has the correct name, but is 10 kb or less. In the browser the audio file is capable of being reviewed and plays as expected. Server side python code: def save_file(file, filename, path=''): ''' Little helper to save a file ''' fd = open('%s/%s' % ('/root/ws911/media/', str(path) + str(filename)), 'wb') #for chunk in file.chunks(): # fd.write(chunk) fd.write(file) fd.close() JavaScript code excerpts: // PostBlob method uses XHR2 and FormData to submit // recorded blob to the PHP server function PostBlob(blob, fileType, fileName) { // FormData var formData = new FormData(); formData.append(fileType + '-filename', fileName); formData.append(fileType + '-blob', blob); // POST the Blob using XHR2 xhr('xxxxxxxxxxxxxx/get_json/', formData, function(fileURL) { }); } var container = document.getElementById('container'); // var legalBufferValues = [256, 512, 1024, 2048, 4096, 8192, 16384]; // sample-rates in at least the range 22050 to 96000. recordAudio = RecordRTC(stream, { //bufferSize: 16384, //sampleRate: 45000, onAudioProcessStarted: function() { if (!isFirefox) { recordVideo.startRecording(); } } }); recordAudio.startRecording(); stop.disabled = false; }, function(error) { alert(JSON.stringify(error, null, '\t')); }); }; var fileName; stop.onclick = function() { record.disabled = false; stop.disabled = true; preview.src = ''; fileName = Math.round(Math.random() * 99999999) + 99999999; recordAudio.stopRecording(function(url) { preview.src = url; PostBlob(recordAudio.getBlob(), 'video', fileName + '.webm'); }); function xhr(url, data, callback) { var request = new XMLHttpRequest(); request.onreadystatechange = function() { if (request.readyState == 4 &amp;&amp; request.status == 200) { callback(request.responseText); } };
upvote count: 3
linked to: http://stackoverflow.com/q/16571044
tagged with: javascript
type: UnansweredQuestion
score: 3
has title: webrtc audio record to python
answer count: 0
downvote count: 0
tagged with: webrtc
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40279673
tagged with: python

http://stackoverflow.com/a/25263694
answers question: http://stackoverflow.com/q/25263011
type: Answer
upvote count: 1
has body: I think you must add a node to the venue images. Like this: child :venue_images do attributes :id, :caption node :url do |image| o.image.url(:thumb) end end
score: 1
downvote count: 0

http://stackoverflow.com/comment/39543818
has text: just it alerts the html tags only
comment on: http://stackoverflow.com/a/25360978
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25334296
type: Question
tagged with: jshint
has comment: http://stackoverflow.com/comment/39496229
accepted answer: http://stackoverflow.com/a/25334399
has comment: http://stackoverflow.com/comment/39496388
has comment: http://stackoverflow.com/comment/39496495
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39496529
favorite count: 0
has comment: http://stackoverflow.com/comment/39496438
has comment: http://stackoverflow.com/comment/39496291
has comment: http://stackoverflow.com/comment/39496247
has comment: http://stackoverflow.com/comment/39496427
has answer: http://stackoverflow.com/a/25334399
has comment: http://stackoverflow.com/comment/39496246
upvote count: 1
has title: What is the relative processing speed of JSONObject.item vs JSONObject['item']?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39496299
has body: I'm working on speeding up some old JavaScript code that uses a lot of the following structure: var obj = { attr1: value, attr2: value2, ... attrN: valueN }; someFunction(obj['attr1']); JSHint gives me the following advice: ['attr1'] is better written in dot notation. So it prefers obj.attr1 over obj['attr1']. I understand the aesthetic reason for this warning (explained here), but which notation is faster? I would think that the former would be more efficient because the latter involves the conversion of a string literal, but I have nothing other than speculation to back that up. Any help you can offer would be much appreciated.
has comment: http://stackoverflow.com/comment/39496253
score: 1
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has comment: http://stackoverflow.com/comment/39496538

http://stackoverflow.com/q/25376722
has title: data role not apply to the items appended by javascript
type: Question
tagged with: android
has comment: http://stackoverflow.com/comment/39631740
has body: I am working on android webview program and tried to append list item dynamically to the page. However, the data-role = "listview" does not apply to this new ul list. Please help. Following is the javascript code. $(document).on('pagebeforeshow', function () { var listposts = window.jsinterface.getPostValue(); $('#postlist').append(listposts); }); Following is the corresponding html code.
has comment: http://stackoverflow.com/comment/39573826
score: 0
tagged with: webview
tagged with: jquery-mobile
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/39638402
answer count: 0
has comment: http://stackoverflow.com/comment/39597561
has comment: http://stackoverflow.com/comment/39684433

http://stackoverflow.com/q/25376489
answer count: 1
has answer: http://stackoverflow.com/a/25384738
has title: Snake Draft - Overall Order Position (Math Related)
accepted answer: http://stackoverflow.com/a/25384738
type: AnsweredQuestion
tagged with: math
type: Question
has body: So I'm creating a Fantasy Football draft helper, and it's a 12-team snake draft format, which proceeds 1 through 12 LTR, then 13 through 24 RTL, then 25 through 36 LTR -----> &lt;----- ------> So, the person with the #1 overall position (Team A) also finds themselves in the #24 and #25 position. The #12 position also has the #13 position, as the order "wraps around" a grid. Like so Here is what I have come up with to flag any team's overall orders dynamically, based on draft position, but I'm no math whiz, and it seems wonky to have a special case for position=1 that doesn't apply to any of the other cases. This works, but I want to know what the real math is for this, if anyone knows. Here is a fiddle I created with some sample code, based on my current solution. var TEAMS = 12; var ROUNDS = 4; var POS = 1; var $overallOrder = $('#overallOrder'); var total = TEAMS * ROUNDS; if (POS &gt; TEAMS) { alert("only " + TEAMS + " teams"); return false; } for (var i=1; i&lt;=total; i++) { var isMyTurn = false; if ((i % (2*TEAMS)) == ((2*TEAMS) - (POS-1))) { isMyTurn = true; } if ((i % (2*TEAMS)) == POS) { isMyTurn = true; } //special case for first position ? if (POS==1 &amp;&amp; (i % (2*TEAMS)) == 0) { isMyTurn = true; } var turnText = (isMyTurn) ? i + " My Turn!" : i ; $overallOrder.append('&lt;li&gt;'+turnText+'&lt;/li&gt;'); } Try changing the POS var from 1-12 and you can see the results. Again, I'm looking for the mathematical function that would encapsulate the above logic, if anyone knows. Thanks! http://jsfiddle.net/3oy1w71c/1/ Thanks!
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39433488
has text: PHP is `ServerSide`! You have no access on `ClientSide` Keystrokes. Else, try to use JQuery for this: http://api.jquery.com/event.which/ If you wanna execute PHP Functions on Keystrokes, catch the KEYCODE (like "2", or sth. else and send an `AJAX Request` to the PHP Function with the keycode)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25301008

http://stackoverflow.com/a/25325376
score: 0
answers question: http://stackoverflow.com/q/25303735
has body: Just remove the respond_to do|format| format.js end block. In your case it will load the select.js partial automatically according to the rails defaults. I'm not sure, but perhaps you will need to change the path to /java/select.js also
type: Answer
accepted answer of: http://stackoverflow.com/q/25303735
type: AcceptedAnswer

http://stackoverflow.com/comment/56476956
comment on: http://stackoverflow.com/q/25300034
score: 0
type: Comment
type: QuestionComment
has text: For those interested in handling `CONTROL` vs `COMMAND`: [Using cross-platform keyboard shortcuts in end-to-end testing](http://stackoverflow.com/questions/33263091/using-cross-platform-keyboard-shortcuts-in-end-to-end-testing).

http://stackoverflow.com/a/25362615
answers question: http://stackoverflow.com/q/25361989
downvote count: 0
type: Answer
has body: In the above code object ($x) empty check is not proper, Below is the modified code var $x = $("input[name='" + linkedmodule + "']"); //var x=document.getElementsByName(linkedmodule); console.log($x); if (!($x === undefined || $x == null || $x.length &lt;= 0)) { linkedid = $x.val(); linked_module = $x.attr("relatedModule"); console.log("Value of the element : "+ linkedid); } else { }
score: 1
upvote count: 1

http://stackoverflow.com/comment/39537936
has text: The method is set to OPTIONS instead of GET.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25357584
score: 0

http://stackoverflow.com/q/25320380
answer count: 3
upvote count: 1
downvote count: 1
tagged with: jquery
favorite count: 0
has body: I have an animation that expands a tiled div tag when you click the div, however I can't seem to get the active class to hold after the click, I have to hold down the mouse button or it will revert to its previous size, im not sure why. I didn't create a jfiddle because its to hard to get everything to work right with out my custom stuff http://snomada.com/angular_test/ is a live example. My friend helped me out with a jsfiddle and it works but when i replicated with my code it doesnt work http://jsfiddle.net/inpursuit/g6pf2ye1/3/ solved body{ background: url(../images/banner.jpg); background-size: 2000px 2000px; background-repeat: no-repeat; } #content{ top:55px; position:absolute; margin:0px; left:7%; } .tile-container{ float:left; margin:5px; width:400px; height:200px; overflow:hidden; -webkit-transition: all .2s ease-in-out; -webkit-transform: scale(1.0); -moz-transition: all .2s ease-in-out; -moz-transform: scale(1.0); -o-transition: all .2s ease-in-out; -o-transform: scale(1.0); transition: all .2s ease-in-out; transform: scale(1.0); } /*.tile-container:active, .tile-container .test { -webkit-transform: translate(0px,-100%); -moz-transform: translate(0px,-100%); -o-transform: translate(0px,-100%); transform: translate(0px,-100%); -webkit-transition: all .2s ease-in-out; -webkit-transform: scale(1.0); -moz-transition: all .2s ease-in-out; -moz-transform: scale(1.0); -o-transition: all .2s ease-in-out; -o-transform: scale(1.0); transition: all .2s ease-in-out; transform: scale(1.0); width:450px; height:350px; } /*.tile-container:active > .tile, .tile-container .test > .tile { -webkit-transform: translate(0px,-100%); -moz-transform: translate(0px,-100%); -o-transform: translate(0px,-100%); transform: translate(0px,-100%); background-size: 450px 350px; } */ .tile-container{ float:left; margin:5px; width:400px; height:200px; background-color: #0000FF; overflow:hidden; -webkit-transition: all .2s ease-in-out; -webkit-transform: scale(1.0); -moz-transition: all .2s e…
has comment: http://stackoverflow.com/comment/39469860
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25320448
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25320782
type: Question
has comment: http://stackoverflow.com/comment/39469496
tagged with: javascript
has title: Keep jquery .addClass active after click, my div just reverts if i dont hold down mouse
has answer: http://stackoverflow.com/a/25320451
score: 0

http://stackoverflow.com/q/25349970
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/39524263
has comment: http://stackoverflow.com/comment/39523297
upvote count: 2
has body: I want to use Mousetrap inside my Safari extension so that the extension can capture keyboard shortcuts. But it does't seem to work. I am working on a small extension, which is entirely inside the Global.html file. So far, I've tried: &lt;script type="text/javascript" src="./mousetrap.min.js"&gt;&lt;/script&gt; Injected script Or is there another way to make a keyboard shortcut trigger something in a Safari extension? I just need one (it involves Cmd and Shift). UPDATE with solution For people from the future (do we have jetpacks yet?), this is what I did in the injected end script: window.addEventListener('keydown', handleKeydown, false); function handleKeydown(e) { // If &lt;my JS keyCode of choice&gt; is pressed down, checks it Cmd and Shift were pressed if (e.keyCode == &lt;my JS keyCode of choice&gt; &amp;&amp; e.metaKey &amp;&amp; e.shiftKey) { safari.self.tab.dispatchMessage('&lt;someMessage&gt;'); } } And I put this in the Global.html: safari.application.addEventListener('message', handleMessage, false); function handleMessage(msg) { if (msg.name == '&lt;someMessage&gt;') { someFunctionDefinedBelowThis(); } }
type: Question
has comment: http://stackoverflow.com/comment/39524276
tagged with: javascript
has comment: http://stackoverflow.com/comment/39524374
answer count: 1
has answer: http://stackoverflow.com/a/25350717
accepted answer: http://stackoverflow.com/a/25350717
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39523273
has title: How should I use an existing JavaScript library inside my Safari extension?
has comment: http://stackoverflow.com/comment/39524596
has comment: http://stackoverflow.com/comment/39524572
tagged with: safari-extension
tagged with: safari

http://stackoverflow.com/comment/133869243
score: 0
has text: @jfriend00 That link is broken but it used to lead somewhere into this repository: https://github.com/mlegenhausen/fetch-intercept
type: AnswerComment
comment on: http://stackoverflow.com/a/25335826
type: Comment

d3.js
tags question: http://stackoverflow.com/q/25330414
tags question: http://stackoverflow.com/q/25305683
tags question: http://stackoverflow.com/q/25321281
tags question: http://stackoverflow.com/q/25284570
tags question: http://stackoverflow.com/q/25340210
tags question: http://stackoverflow.com/q/25303917
tags question: http://stackoverflow.com/q/25274560
tags question: http://stackoverflow.com/q/25296214
tags question: http://stackoverflow.com/q/25236391
tags question: http://stackoverflow.com/q/25284256
tags question: http://stackoverflow.com/q/25305727
tags question: http://stackoverflow.com/q/25249431
tags question: http://stackoverflow.com/q/25357475
tags question: http://stackoverflow.com/q/25375188
tags question: http://stackoverflow.com/q/25356824
tags question: http://stackoverflow.com/q/25285376
tags question: http://stackoverflow.com/q/25330987
tags question: http://stackoverflow.com/q/25280125
tags question: http://stackoverflow.com/q/25302904
tags question: http://stackoverflow.com/q/25361011
tags question: http://stackoverflow.com/q/25361096
tags question: http://stackoverflow.com/q/25311826
tags question: http://stackoverflow.com/q/25292879
tags question: http://stackoverflow.com/q/25358383
tags question: http://stackoverflow.com/q/25317329
tags question: http://stackoverflow.com/q/25308590
tags question: http://stackoverflow.com/q/25361045
type: Tag
tags question: http://stackoverflow.com/q/25237789
tags question: http://stackoverflow.com/q/25291823
tags question: http://stackoverflow.com/q/25336141
tags question: http://stackoverflow.com/q/25389774
tags question: http://stackoverflow.com/q/25269264
tags question: http://stackoverflow.com/q/25252724
tags question: http://stackoverflow.com/q/25258362
tags question: http://stackoverflow.com/q/25287905
tags question: http://stackoverflow.com/q/25254129
tags question: http://stackoverflow.com/q/25333282
tags question: http://stackoverflow.com/q/25288188
tags question: http://stackoverflow.com/q/25263426
tags question: http://stackoverflow.com/q/25330008
tags question: http://stackoverflow.com/q/25235183
tags question: http://stackoverflow.com/q/25272479
tags question: http://stackoverflow.com/q/25328753
tags question: http://stackoverflow.com/q/25320004
tags question: http://stackoverflow.com/q/25264350
tags question: http://stackoverflow.com/q/25307177
tags question: http://stackoverflow.com/q/25377611
tags question: http://stackoverflow.com/q/25325681
tags question: http://stackoverflow.com/q/25300070
tags question: http://stackoverflow.com/q/25270780
tags question: http://stackoverflow.com/q/25324096
tags question: http://stackoverflow.com/q/25320578
tags question: http://stackoverflow.com/q/25316432
tags question: http://stackoverflow.com/q/25271712
tag name: d3.js
tags question: http://stackoverflow.com/q/25279639
tags question: http://stackoverflow.com/q/25241548
tags question: http://stackoverflow.com/q/25237006
tags question: http://stackoverflow.com/q/25358357
tags question: http://stackoverflow.com/q/25347594
tags question: http://stackoverflow.com/q/25243468
tags question: http://stackoverflow.com/q/25292474
tags question: http://stackoverflow.com/q/25263512
tags question: http://stackoverflow.com/q/25386886
tags question: http://stackoverflow.com/q/25279307
tags question: http://stackoverflow.com/q/25315624
tags question: http://stackoverflow.com/q/25253834
tags question: http://stackoverflow.com/q/25384052
tags question: http://stackoverflow.com/q/25268041
tags question: http://stackoverflow.com/q/25313695
tags question: http://stackoverflow.com/q/25367987
tags question: http://stackoverflow.com/q/25334677
tags question: http://stackoverflow.com/q/25333309
tags question: http://stackoverflow.com/q/25322864
tags question: http://stackoverflow.com/q/25293465
tags question: http://stackoverflow.com/q/25283817

http://stackoverflow.com/comment/39406208
type: Comment
type: QuestionComment
has text: Which version do you use? I've tried to simulate the problem, but I didn't succeed and I get the expected result. http://jsfiddle.net/GuyT/ua5qzrvw/
score: 0
comment on: http://stackoverflow.com/q/25284288

http://stackoverflow.com/q/25250182
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25250296
tagged with: getjson
has comment: http://stackoverflow.com/comment/39340113
has title: Using $.each() with variable
has body: I use $.getJSON to get data from .json file. My .json file's structure looks like the one below data.json { "foo" : { "foo1" : { "prop1": "foo1's prop1", "prop2": "foo1's prop2", "prop2": "foo1's prop3", }, ... }, "bar" : { "bar1" : { "prop1": "bar1's prop1", "prop2": "bar1's prop2", "prop2": "bar1's prop3", }, ... }, ... } and my HTML structure Choose Foo Bar ... Choose and .js file that include $.getJSON $(document).ready(function() { var $bolumler = $('#get_json'); $(".container_a").click(function(event){ var $a_id = $(this).attr('id'); $.getJSON('data.json', function(data) { $bolumler.html(''); $bolumler.fadeOut(300, function() { if ($a_id == "foo") { $.each(data.foo,function(i,data2) { $bolumler.append(""+data2.prop1+""); }); } else if ($a_id == "bar") { ...// lots of else if } }); $bolumler.fadeIn(300); }); }); }); I want to get data from data.json according to clicked a's id. For example, if i click first a -which has id foo- i want to get foo1,foo2... then i want to use their prop1,pro2,... values. I make it possible with lots of else if statemennt but that was long. Is it possible to use $.each(variable,function(){});. I tried these -hopelessly- but they didn't work. $.each(data.$bk,function(i,data2) { var newData = data+"."+$bk; $.each(newData,function(i,data2) {
tagged with: each
accepted answer: http://stackoverflow.com/a/25250296
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39339569
has comment: http://stackoverflow.com/comment/39339882
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/25304314
type: AnsweredQuestion
has body: I have this modelView public class Ue { public class uEkranModel { public List&lt;Grup&gt; Grup = new List&lt;Grup&gt;(); private List&lt;Secim&gt; _secim; public List&lt;Secim&gt; secim { get { if (_secim == null) _secim = new List&lt;Secim&gt;(); return _secim; } set { _secim = value; } } } public class Secim { public Guid uGuid { get; set; } public Guid fGuid { get; set; } } } I need to fell the List secims items with JS and post it back to controller. I have tried to : 1)initialize the list in the controller : Controller : gidecek.Data = new Models.Ucak.UcakDeneme.uEkranModel(); gidecek.Data.secim.Add(new Models.Ue.Secim { uGuid = new Guid() }); gidecek.Data.secim.Add(new Models.Ue.Secim { uGuid = new Guid() }); View : @using (Html.BeginForm("deneme", "U", FormMethod.Post, new { id = "secimTamam", style = "display:none" })) { @Html.EditorFor(m =&gt; m.Data.secim[0]) @Html.TextBoxFor(m =&gt; m.Data.secim[0].uGuid, new {id="gidis" }) } JS : $("#Data_secim_0__ucusGuid").attr("value", index); This way , when the code is executed the value field of the textboxfor is changed(when the JS fired) but when I check the post data in controller , it is NULL. also tried : $("#Data_secim_0__ucusGuid").val(index); which doesnt cahnge the value of teh textbox. What I need is to fill the model values with js and post the form with js as well.(The data user is selecting is different, I am just posting back the GUID of the items within a form.)
has comment: http://stackoverflow.com/comment/39439928
type: Question
tagged with: javascript
tagged with: post
has answer: http://stackoverflow.com/a/25304623
score: 0
tagged with: asp.net-mvc-5
answer count: 1
accepted answer: http://stackoverflow.com/a/25304623
has comment: http://stackoverflow.com/comment/39439818
tagged with: model
has title: MVC , JS change value textboxfor not posting

http://stackoverflow.com/comment/39560832
comment on: http://stackoverflow.com/q/25370021
has text: you should use onsubmit for the form not onclick of the button, hitting enter in a text field is not going to trigger a click for a button
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/a/25432122
has comment: http://stackoverflow.com/comment/39962349
answers question: http://stackoverflow.com/q/25387644
upvote count: 2
has body: Error is reported because fileSystem.root.getFile is not able to find index.html at location pointed by LocalFileSystem.PERSISTENT. You can log fileSystem.root.fullPath to find the path where fileSystem.root.getFile() is looking into in your device or system. Your apps files like index.html are not stored or dropped at LocalFileSystem.PERSISTENT unless it is explicitly copied there. You can find more detail on where LocalFileSystem.PERSISTENT points in SO question Where does LocalFileSystem.PERSISTENT point to?
has comment: http://stackoverflow.com/comment/39705317
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/comment/39554190
score: 2
has text: I don't think this anything to do with pdf.js -- pages are not rendering since pdfViewer height is 0px. Probably http://stackoverflow.com/questions/10871898/why-cant-i-make-my-div-100-height-if-i-use-an-html5-doctype-how-do-i-get-it-1 will help
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25350168

http://stackoverflow.com/comment/39504056
has text: As new to design patterns, We follow philosphy like "Do it when need it". Write a function and call it. So looking around , which removes the onLoad call of this func.
score: 0
comment on: http://stackoverflow.com/q/25338302
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39448993
type: QuestionComment
comment on: http://stackoverflow.com/q/25309242
score: 0
has text: Any errors in the console?
type: Comment

http://stackoverflow.com/a/25339261
type: Answer
answers question: http://stackoverflow.com/q/25338960
has body: Please try the following: If I posted what you didn't expected, comment on it. I will update the code. COLLECTION
score: 0

http://stackoverflow.com/comment/39584266
has text: The demo looks perfectly fine. But not sure how I can use it with my simpleform. I will try around a little and tell you if it works. Thanks alot!
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25382541

http://stackoverflow.com/comment/39586129
type: AnswerComment
has text: The question is tagged javascript not php.
type: Comment
score: 2
comment on: http://stackoverflow.com/a/25383661

http://stackoverflow.com/q/25276915
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25277076
linked to: http://stackoverflow.com/q/3528324
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39388654
has title: redirect page to main link
has comment: http://stackoverflow.com/comment/39388669
type: Question
has answer: http://stackoverflow.com/a/25277076
has body: Is there a way I can protect a page from being accessed unless it's from a particular referral URL? ie. if someone is on Page A and clicks a link to go to Page B, they would access it fine but if a person from anywhere else tries to access Page B, they get an error or possibly just redirected to Page A. Thanks for the help
tagged with: javascript
has comment: http://stackoverflow.com/comment/39388655
linked to: http://stackoverflow.com/q/4662110
score: 0
answer count: 1

http://stackoverflow.com/q/25250386
tagged with: filtering
score: 2
downvote count: 0
has title: Filtering a sorted column with SelectOneMenu in PrimeFaces DataTable
tagged with: javascript
has answer: http://stackoverflow.com/a/28702275
type: AnsweredQuestion
tagged with: datatable
favorite count: 0
has comment: http://stackoverflow.com/comment/45573570
type: Question
upvote count: 2
accepted answer: http://stackoverflow.com/a/28702275
has body: I have the following column in a DataTable: The problem is when I click the blue area, it first sorts the column and then opens the select options. I tried adding event.stopPropagation();return false to the events onclick, onkeyup and onkeydown of my p:selectOneMenu but no success. I thought it was bubbling until the column and then sorting it but it seems that is not the case. I think that is a bug, but I only have time to an workaround. So my question is: Does anyone have experienced it and know how to fix it ?
answer count: 1
tagged with: primefaces

http://stackoverflow.com/comment/39378386
type: Comment
type: QuestionComment
has text: Also remember that `return null` will display null on the screen, you might want to change it to an empty string or something
comment on: http://stackoverflow.com/q/25270767
score: 0

http://stackoverflow.com/a/25384294
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
has body: Two details were amiss. Firstly, as noticed by @Bjorn, the function isn't called which is fixed by replacing function addhttp(url) { ... }; with $(function () { ... });, and secondly, as @Mritunjay pointed out, the href is changed after the return is done so their order simply needs to be reversed to document.getElementById('wl').href= url; return url; Making the working script $(function () { var url = "new link"; if (!/^(f|ht)tps?:\/\//i.test(url)) { url = "http://" + url; } document.getElementById('wl').href= url; return url; }); If this answer helps you please upvote their comments instead.
accepted answer of: http://stackoverflow.com/q/25384040
answers question: http://stackoverflow.com/q/25384040
type: Answer

http://stackoverflow.com/comment/39390360
comment on: http://stackoverflow.com/q/25277913
has text: Are you using this random number to generate a private key? A password? If not, I think your security software is being a little bit paranoid.
type: QuestionComment
type: Comment
score: 3

http://stackoverflow.com/q/25300450
type: Question
tagged with: javascript
has title: how to load dynamic dependent dropdown in form load?
score: 0
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: onload
tagged with: form-load
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39432625
has body: I implemented a dynamic drop-down menu and once the the user select an item it'll load the subcategories under the selected item underneath of drop-down menu. That all happens in my "add details" page. But, when it comes to the edit page I want to show both of the previously selected item from the drop-down and subcategory items underneath the drop-down. This is the JQuery that I'm using for the property on change in the "add details" page. $(document).ready(function() { $("#parent_cat").change(function() { $(this).after('&lt;div id="loader" style="position:inline;"&gt;&lt;img src="../device manager/img/loading.gif" alt="loading subcategory" /&gt;&lt;/div&gt;'); $.get('loadsubcat_edit.php?parent_cat=' + $(this).val() + '&amp;branchId=' + &lt;?php echo json_encode($user_ID); ?&gt;, function(data) { $("#sub_cat").html(data); $('#loader').slideUp(200, function() { $(this).remove(); }); }); }); }); I want to load this JQuery when the form load. Any solution would be great. Thanks in advanced.
has answer: http://stackoverflow.com/a/25300629
accepted answer: http://stackoverflow.com/a/25300629

http://stackoverflow.com/comment/39400320
comment on: http://stackoverflow.com/a/25282290
has text: it works, but how can I do it dynamically, because when I fill inputs it doesn't work
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25340512
score: 1
has comment: http://stackoverflow.com/comment/39507449
has body: No, it shouldn't be a syntax error. In Javascript, RegExp objects are not strings, they are a distinct class of objects. /.../modifiers is the syntax for a RegExp literal. I can't explain the syntax error you got on your friend's computer, it looks fine to me. I pasted it into the Javascript console and it was fine.
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/39516264
answers question: http://stackoverflow.com/q/25340437
downvote count: 0

http://stackoverflow.com/comment/39367565
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25265295
has text: Yea you can use `.wrap li:nth-child(3):hover{ background: url("/path-to-another-image"); }`

http://stackoverflow.com/comment/39594870
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25387909
type: QuestionComment
has text: No. The backend code uses Spring Security with X.509 certificate based authentication, and any input from client-side will be validated. However, being able to generate some sort of token would allow us to leverage a modern Javascript framework, while taking advantage of the existing security infrastructure.

http://stackoverflow.com/q/25262815
has title: How do i pass drop down to a form field
has comment: http://stackoverflow.com/comment/39363838
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39362521
has body: so i have a drop down and i want to pass the value selected onto a hidden text form field. I have spent a long time looking around and am unable to find any way to do this. I know it will be done with a javascript function but not sure how. Here is my code currently: <? $year = $_GET["year"]; $x="SELECT nfw_week.week_no FROM nfw_week"; $xx= mysql_query("$x") or die($myQuery." ".mysql_error()); ?> Year for this weekly analysis: <select name="weekdate" id="weekdate" class="form-control" value="" onChange="getweekdate(this.value,'<? echo $week_number ?>');"> <? while(list($week_number)= mysql_fetch_row($xx)){ if($week_number < 10){ $week_number = "0".$week_number; } $date = date('d/m/Y', strtotime($year."W".$week_number.$day))."\n"; $weekvanumbervalue = 'value="'.$week_number.'" '; $datenumbervalue = 'value="'.$date.'" '; ?> <option <? echo $weekvanumbervalue; ?> <? echo $datenumbervalue; ?>>Date Starting: <? echo $date ?> Week Number:<? echo $week_number ?> <? } ?> so i want to somehow push what ever is selected from the drop down to be pushed into the text field id of selectedweekhidden i have jquery loaded at top of page
accepted answer: http://stackoverflow.com/a/25263908
type: Question
has comment: http://stackoverflow.com/comment/39362505
has comment: http://stackoverflow.com/comment/39362464
upvote count: 0
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/39362829
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/39362496
favorite count: 0
has answer: http://stackoverflow.com/a/25263908
downvote count: 2

http://stackoverflow.com/comment/39579709
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25340490
has text: it worked for me thanks @Md Salahuddin

http://stackoverflow.com/q/25295735
accepted answer: http://stackoverflow.com/a/25312391
has comment: http://stackoverflow.com/comment/39449937
type: Question
type: AnsweredQuestion
tagged with: tabletools
has comment: http://stackoverflow.com/comment/39444707
has comment: http://stackoverflow.com/comment/39450512
has comment: http://stackoverflow.com/comment/39450315
downvote count: 0
answer count: 1
has title: TableTools not loading on a DataTables Table
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: The datatables works fine however I am trying to add TableTools and I am having issues. With what I am using the data tables works fine as intended with no issues at all, however trying to add tabletools to it has had no success. There are no console errors reported with what I am doing yet nothing displays. This leads me to believe I am doing something wrong in the code. I have put the code below. The script includes: &lt;script src="//cdn.datatables.net/1.9.4/js/jquery.dataTables.js"&gt;&lt;/script&gt; &lt;script src="//cdn.datatables.net/tabletools/2.2.0/js/dataTables.tableTools.js"&gt;&lt;/script&gt; &lt;script src="//tinymce.cachefly.net/4.0/tinymce.min.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="//cdn.datatables.net/tabletools/2.2.0/css/dataTables.tableTools.css" type="text/css" media="all" /&gt; I am using the following code: var foreTable = $(".cscf-fore-table").dataTable({dom: \'T&lt;"clear"&gt;lfrtip\', tableTools: { "sSwfPath": "//cdn.datatables.net/tabletools/2.2.0/swf/copy_csv_xls.swf", "aButtons": [ "copy", "csv", "xls", "print" ] }, "bSort": false,"aLengthMenu": [ [25, 50, 100, 200, -1], [25, 50, 100, 200, "All"] ], "iDisplayLength":-1, "bJQueryUI":true, "sPaginationType":"full_numbers"});
has answer: http://stackoverflow.com/a/25312391
score: 3
tagged with: datatables
upvote count: 3

http://stackoverflow.com/comment/39578004
has text: show us how you put jquery in your application?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25378473

http://stackoverflow.com/a/25315051
accepted answer of: http://stackoverflow.com/q/25314912
type: AcceptedAnswer
downvote count: 0
has body: Assuming you already know the property names you are looking for (because I assume they match the column titles), you can simply do something like this: var array = []; for(var i=0; i &lt; original.results.length; i++) { var subArray = []; subArray.push(original.results[i].name || ""); subArray.push(original.results[i].address || ""); subArray.push(original.results[i].age || ""); array.push(subArray); } console.log(array); Or, if you want to be more terse, you can do this in the body of the loop: array.push([original.results[i].address || "", original.results[i].name || "", original.results[i].age || ""]); If you don't know the properties of the objects in results then it's a little more tricky. You can use a for..in loop to loop over all the properties, but the order won't be guaranteed.
type: Answer
answers question: http://stackoverflow.com/q/25314912
score: 1
upvote count: 1

http://stackoverflow.com/comment/39451591
type: AnswerComment
has text: yes just move the Number.prototype.toRad declaration directly into the core of your controller
comment on: http://stackoverflow.com/a/25310372
type: Comment
score: 1

http://stackoverflow.com/q/25337161
has body: How to create form slider like the screenshot.
possible better answer: http://stackoverflow.com/a/25337487
has answer: http://stackoverflow.com/a/25337487
tagged with: javascript
downvote count: 4
has title: How to create form slider with 5 values
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/25337268
tagged with: jquery
score: -4
has comment: http://stackoverflow.com/comment/39501498
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/25337268
answer count: 2

http://stackoverflow.com/comment/39495854
score: 0
type: AnswerComment
type: Comment
has text: Can that be placed within a ternary operator? I'm using a grid toggle to a generate and remove a grid for the user. But this won't work: _opts.xaxes[i].tickFormatter = _opts.xaxes[i].tickFormatter == null ? function (val, axis) {return val%5?"":val;} : null;
comment on: http://stackoverflow.com/a/25333618

http://stackoverflow.com/q/25383118
tagged with: meteor-blaze
has comment: http://stackoverflow.com/comment/39588434
score: 0
has comment: http://stackoverflow.com/comment/39585047
accepted answer: http://stackoverflow.com/a/25384165
tagged with: meteor
has body: My application is a list of products. I have too many, and want to group them, so I can refactor my publish/subscribe code (and my templates as well). Assume 4 distinct collections in my mongodb: balloons, balls, tents, tea. I need to group them into newly created foo and bar. Then I can write two publish/subscribe statements instead of 4, and access my data by doing something like: on Client: Foo = new Meteor.Collection('foo'); Bar = new Meteor.Collection('bar'); in html template {{#each foo.balloons }} &lt;p&gt;{{ size }}&lt;/p&gt; &lt;p&gt;{{ price }}&lt;/p&gt; {{/each}} or in another html template {{#each bar.tents }} &lt;p&gt;{{ size }}&lt;/p&gt; &lt;p&gt;{{ price }}&lt;/p&gt; {{/each}}
tagged with: nosql
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25384165
tagged with: mongodb
has title: meteorjs and mongodb: how to group many collections into one
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/39527498
type: Comment
has text: Why do you use Tree.prototype to set the age?
comment on: http://stackoverflow.com/a/25352322
type: AnswerComment
score: 0

http://stackoverflow.com/a/25322228
score: 2
accepted answer of: http://stackoverflow.com/q/25322107
upvote count: 2
answers question: http://stackoverflow.com/q/25322107
has body: When you use the Revealing Module Pattern, you can easily encapsulate your data and expose only the properties/functions that you want in your public API: angular.module('myModule', []) .factory('$myService', function () { var name = { name: 'John' }; var phone = { phone: '555-5555'}; var SSN = 123456789; var address = '5555 Rd Blvd.'; var available = { isAvailable: false }; return { getName: function () { return name; }, isAvailable: function () { return available; } name: name, phone: phone, address: address }; }) ;
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39478147
type: Answer

http://stackoverflow.com/a/25265048
has body: Try header('Pragma: no-cache', true); header("Cache-Control: no-store, no-cache, must-revalidate", true); in fetchrecord.php
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39390959
answers question: http://stackoverflow.com/q/25264878

http://stackoverflow.com/comment/39322907
type: AnswerComment
has text: @singe31 Fair point. However, I would argue this method is more semantic that using `next()`/`prev()`. Especially if you end up moving around the HTML.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25241631

http://stackoverflow.com/comment/39374918
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25269334
has text: Just wondering.. did you try adding 'px' to specify the size? Or browser is assuming that you r passing pixels?
score: 0

http://stackoverflow.com/a/25333322
has body: Apps Script is going to be limited to a 5 minute execution time. You could create time based triggers to contend with that functionality to some extent, but the script will stop 5 minutes after being invoked. If you still think Apps Script is a good fit, you would just need to deploy your script as a web app, and utilize a doGet(event) function or a doPost(event) function to receive the request from your external application. If you need to return content, there is ContentService to help facilitate that part of the process. To maintain the different data points for each user, you will need to utilize ProertiesService.getUserProperties(), to store persistent string values for each user. The other part of Apps Script that may come into play with your Javascript, is that Apps Script uses caja sanitization for javascript (just something to be mindful of, if you run into issues).
accepted answer of: http://stackoverflow.com/q/25318628
type: Answer
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/25318628
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/40450866
score: 1
answers question: http://stackoverflow.com/q/25384729
upvote count: 1
type: Answer
has body: It can be done only using an iFrame. Page, loaded in an iFrame, acts as a proxy, translating message events into localStorage events, and vice-versa. localStorage is separate for each domain, that's why it can't be implemented in two different tabs.
downvote count: 0

http://stackoverflow.com/a/25236984
type: Answer
accepted answer of: http://stackoverflow.com/q/25234806
has body: By "clicking this button" If you meant to trigger a click on div#BuyWithRobux , You can do so like $("#BuyWithRobux").click(); or $("#BuyWithRobux").trigger("click"); The syntax for triggering a click remains the same, all you've to do is to use the right selector to target the element on which you need to trigger the event. You can learn more about jQuery selectors here
upvote count: 1
answers question: http://stackoverflow.com/q/25234806
has comment: http://stackoverflow.com/comment/39315549
score: 1
has comment: http://stackoverflow.com/comment/39315422
has comment: http://stackoverflow.com/comment/39315192
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25260215
tagged with: extjs4
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25262647
type: Question
has body: Hello i created a code from my sencha mvc extjs i do have a grid which suppose to have 5 columns company, website, username, tabs, login button View Source Code: Ext.define('OC.view.Container', { extend: 'Ext.container.Viewport', layout: 'border', initComponent : function(){ document.getElementById('id').value = "John"; this.items = [{ xtype: 'panel', region: 'north', height: 25, bodyPadding : 5, baseCls : 'x-plain', html : 'Welcome ' + document.getElementById('id').value + '!' }, { xtype: 'panel', region: 'center', layout: 'fit', items: [{ xtype : 'credentials', border: false }] }]; this.callParent(arguments); } }); Ext.define('OC.view.Credentials', { extend: 'Ext.grid.Panel', alias: 'widget.credentials', store : 'Credentials', initComponent : function(){ this.columns = [{ xtype : 'rownumberer' }, { text : 'Company', dataIndex : 'company', flex : 1 }, { text : 'Website', dataIndex : 'website', flex : 1 }, { text : 'Username', dataIndex : 'username' }, { text : 'Tabs', dataIndex : 'id', width : 30, flex: 1, editor : { xtype : 'textfield', allowBlank : false } }, { text : 'Login', xtype : 'actioncolumn', width : 70, items : [ { icon : '../js/main/login.png', tooltip : 'Click to Login', handler : function(grid, rowIndex, colIndex) { var rec = grid.getStore().getAt(rowIndex); this.url = rec.get('website'); this.cTabs = rec.get('id'); var data = { username : '', password : '', company : rec.get('company') }; for(var i = 1; i &lt;= this.cTabs; i++) { chrome.tabs.create({ url : this.url, selected : true }, function(tab) { var tabID = tab.id; chrome.tabs.executeScript(null, { file: 'js/main/funct.js', code : 'func.login('+ JSON.stringify(data) +')' //runAt : 'document_idle' }); /* chrome.tabs.update(tab.id, { selected : true }); */ }); } } }] }], &lt;-- starts selType : 'cellmodel', plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit : 1 }) ], height : 200, width : 400, renderTo : Ext.getBody(); this.callParent(arguments); &lt;-- end } }); Model Source Code…
tagged with: javascript
score: 0
has title: Form wouldn't display when Creating a Textfield in Sencha extjs
answer count: 1
tagged with: sencha-touch
tagged with: extjs

http://stackoverflow.com/a/25236086
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/39313582
has comment: http://stackoverflow.com/comment/39313963
has comment: http://stackoverflow.com/comment/39314162
has body: You can update Products.details.current directly from your getProducts function. If getProduct can be called from different places in your app and you want to keep the info in sync within your controller, you can use a $watch. app .factory('Products', function($http, ENV){ var Products = {}; Products.details = { //grabs the most current endpoint and creates a session of that data current: {}, getProduct: function($scope, productId) { return $http.get(ENV.apiEndpoint + '/v2/listings/' + productId + '.json') .success(function(data){ Products.details.current = data; // Update return data; }) .error(function(data, status){ console.log('error:' + status); }); } }; return Products; }) .controller('MainCtrl', function($scope, Products) { $scope.product = Products.details.current; var handleProductSuccess = function (data) { // (not required if you use the watch below) // stores the data for the current controller $scope.product = data; }; //on click of a product from view Products.details.getProduct($scope, $scope.productId) .success(handleProductSuccess); // If another scope can modify Products.details.current and you want to watch for it: $scope.$watch( function () { return Products.details.current;}, function (newVal) { $scope.product = newVal; }, true ); });
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25235305
has comment: http://stackoverflow.com/comment/39313524
answers question: http://stackoverflow.com/q/25235305
has comment: http://stackoverflow.com/comment/39912659

http://stackoverflow.com/comment/119687619
has text: In my case this did the trick. Thank you!
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/54111114

http://stackoverflow.com/q/25364467
type: Question
has answer: http://stackoverflow.com/a/25366680
score: 2
has comment: http://stackoverflow.com/comment/39551110
answer count: 1
has title: Make dynamic SVG like Travis CI build status
downvote count: 0
has comment: http://stackoverflow.com/comment/40261542
tagged with: javascript
favorite count: 0
has body: I'm trying to create an SVG that works much like the Travis CI build status icon. Looking at the url: https://travis-ci.org/ddavison/sublime-tabs.svg?branch=master The URL points to an SVG, but the SVG seems to be able to pull information from another source, hence the "passing" or "failing" message.. How can I replicate this? I've tried faking the browser by making it a &lt;script&gt;, and just generating an SVG, but that doesn't seem to work. It just renders XML on the page. Is it possible that Travis has a rule that parses .svg as some other script file? How can I execute JavaScript before i actually render the SVG to the user?
accepted answer: http://stackoverflow.com/a/25366680
tagged with: ruby
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/39553794
upvote count: 2
has comment: http://stackoverflow.com/comment/39554426
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39554089

http://stackoverflow.com/q/25301067
has answer: http://stackoverflow.com/a/25301087
answer count: 4
has answer: http://stackoverflow.com/a/25301122
score: 1
upvote count: 1
type: Question
has body: There is the following code with jQuery: var ths = $(".timetable__table th"); var th; for (var i = 0; i &lt; ths.size(); i++) { th = ths.get(i).text(); console.log(th); } When I try to execute this code I get the following exception: TypeError: ths.get(...).text is not a function. I don't understand why it occurs, I just need to get the text value of a tag. How can I fix it?
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Jquery get text value of some selector using index in array
has answer: http://stackoverflow.com/a/25301184
favorite count: 0
has answer: http://stackoverflow.com/a/25301092
type: UnansweredQuestion

http://stackoverflow.com/q/25255821
has body: I'm implementing a typing suggestion functionality on my website using Typeahead.js/Bloodhound but I can't get Bloodhound to work. Here is the code: var indicator_commands = new Bloodhound({ datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.defaultInput); }, queryTokenizer: Bloodhound.tokenizers.whitespace, prefetch: '/static/indicator.json', }); console.log (indicator_commands.index.serialize()); indicator_commands.initialize(); console.log (indicator_commands.index.serialize()); Here is part of the indicator.json: [ { "name": "sma", "fullname": "Smooth Moving Average", "parameter": "sma,period,applied_to_optional,#color_optional;", "defaultInput": "sma,14,close,#ababab;", "tokens" : ["sma,14,close,#ababab;"], "short_help": "", "long_help": "", }, { "name": "ema", "fullname": "Exponential Moving Average", "parameter": "ema,period,applied_to_optional,#color_optional;", "defaultInput": "ema,14,close,#ababab;", "tokens" : ["ema,14,close,#ababab;"], "short_help": "", "long_help": "", } ] I was expecting some data in indicator_commands but it showed none. What do I need to change to get it working?
score: 0
has answer: http://stackoverflow.com/a/25265638
tagged with: typeahead.js
answer count: 1
accepted answer: http://stackoverflow.com/a/25265638
type: AnsweredQuestion
tagged with: bloodhound
tagged with: http://stackoverflow.com/tag/json
has title: Getting Bloodhound to work
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39413481
type: AnswerComment
has text: on the bright side, it could mean better control when the user resizes the browser though (with even more work...). Good luck!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25289384

http://stackoverflow.com/comment/39386785
type: Comment
comment on: http://stackoverflow.com/a/25274609
type: AnswerComment
has text: And the result is what? With the first solution, if it fails, you definitely should not change pages nor refresh this page. It just won't do anything and you'll have to figure out where else you have a bug in your code.
score: 0

http://stackoverflow.com/a/25364577
has comment: http://stackoverflow.com/comment/39550941
answers question: http://stackoverflow.com/q/25364492
has comment: http://stackoverflow.com/comment/39550319
type: Answer
has comment: http://stackoverflow.com/comment/39550549
has comment: http://stackoverflow.com/comment/39550480
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39550171
upvote count: 1
type: AcceptedAnswer
has body: Try assigning different priority to map-activity directive, so it would process after ng-bind-html And as both @Abhishek Jain and @Dalorzo pointed out , your directive has to be attribute applied to the same DOM element .directive('mapActivity', function() { return { priority: 0, // check what priority ng-bind-html have and set it to be more than that. link: function(scope, element, attrs) { ... } } }) priority When there are multiple directives defined on a single DOM element, sometimes it is necessary to specify the order in which the directives are applied. The priority is used to sort the directives before their compile functions get called. Priority is defined as a number. Directives with greater numerical priority are compiled first. Pre-link functions are also run in priority order, but post-link functions are run in reverse order. The order of directives with the same priority is undefined. The default priority is 0.
has comment: http://stackoverflow.com/comment/39550553
accepted answer of: http://stackoverflow.com/q/25364492

http://stackoverflow.com/comment/39359941
type: AnswerComment
type: Comment
score: 2
comment on: http://stackoverflow.com/a/25260960
has text: Upvoted. Because people are pointlessly downvoting in this thread.

http://stackoverflow.com/q/25316254
answer count: 1
has title: Haiku Generator - How to run this script?
has comment: http://stackoverflow.com/comment/39461763
linked to: http://stackoverflow.com/q/1911015
accepted answer: http://stackoverflow.com/a/25316310
type: AnsweredQuestion
tagged with: javascript
linked to: http://stackoverflow.com/q/9901082
type: Question
duplicate of: http://stackoverflow.com/q/9901082
has body: I've been trying to create a very very basic Haiku Generator, which parses text from a large dictionary file and then (for now at least) chooses words that have 5 or 7 syllables and outputs them. Below is my first go at the code, but the problem I'm having right now is that I don't know exactly how to test or run this code. When I put it through my Chrome JS console, I get the error "require is not defined", which is an integral part of the code to parse the data, so I'm not sure how to fix this. Can anyone provide some insight on this? Here's my code: var fs = require("fs"); // open the cmu dictionary file for "reading" (the little r) // cmudict_file = File.open('cmudict.txt', 'r') var wordArray = []; var phonemeArray = []; var syllArray = []; // When parsing the dictionary file, I want it to output into two arrays of the same length // The arrays will be parallel, so wordArray[i] will refer to the word // phonemeArray[i] will refer to the phoneme for that word, and syllArray[i] will refer to the number of syllables in that word. fs.readFile('cmudict.txt', function(err, data) { if(err) { return console.log(err); } var lines = data.toString().split("\n"); lines.forEach(function(line) { line_split = line.split(" "); wordArray.push(line_split[0]); phonemeArray.push(line_split[1]); }); }); //This function will create an array of the number of syllables in each word. function syllCount(phonemeArray){ var sylls = []; for (i = 0, x = phonemeArray.length; i &lt; x; i++){ sylls = phonemeArray.match(/\d/); syllArray.push(sylls.length); } } //Here I want to create arrays of words for each number of syllables. //Since I am only looking for 5 and 7 syllable words now, I will only put those into arrays. //In order to make it easy to expand for words of other syllable counts, I will use a switch statement rather than if/else var syllCount5 = []; var syllCount7 = []; function syllNums(syllArray) { for (i = 0, x = syllArray.length; i &lt; x; i++) { switch (syllArray[i]) { case 5: s…
tagged with: parsing
has answer: http://stackoverflow.com/a/25316310
score: 0

http://stackoverflow.com/comment/39361231
score: 2
comment on: http://stackoverflow.com/q/25262158
has text: Might be better asked on http://codereview.stackexchange.com/
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25268094
has body: var script=document.createElement('script'); script.type='text/javascript'; script.src="https://cdn.adf.ly/js/link-converter.js"; document.body.appendChild(script);
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25267945
score: 1
answers question: http://stackoverflow.com/q/25267945

http://stackoverflow.com/q/25234414
tagged with: google-chrome-extension
answer count: 1
has title: chrome extension blocking google.co.uk
accepted answer: http://stackoverflow.com/a/25234870
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25234870
tagged with: google-chrome
type: Question
has body: I have a simple unpacked chrome extension loaded. All other extensions turned off. manifest.js { "manifest_version":2, "name":"Etc", "description":"Etc", "version":"1.0", "content_scripts": [{ "matches" : ["*://*/*"], "js": ["contentscript.js"], "run_at":"document_end" }], "background": { "scripts": ["background.js"], "persistent": false }, "permissions":[ "tabs", "*://*/*" ], "browser_action": { "default_title": "Idonethis", "default_icon":"icon.png" } } The background.js chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { if (request.greeting == "hello") sendResponse({farewell: "goodbye"}); }); The contentscript.js chrome.runtime.sendMessage({greeting:"hello"}, function(response) { console.log(response.farewell); }); On most domains such as www.bbc.co.uk the message passing works correctly and displays message contentscript.js:2 However on www.google.co.uk or uk.yahoo.com it does not pass a message, nor execute any contentscript.js as far as I can tell. Is this part of the security specification of chrome extensions? EDIT This code has been fixed and can be viewed here https://github.com/lindaymacvean/test-chrome-ext
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39332504
type: QuestionComment
has text: Thank you both for your responses.
score: 0
comment on: http://stackoverflow.com/q/25246332
type: Comment

http://stackoverflow.com/comment/39328892
type: QuestionComment
has text: If you want to learn about the different ways of attaching event handlers, I recommend to read these articles: http://www.quirksmode.org/js/introevents.html
score: 2
type: Comment
comment on: http://stackoverflow.com/q/25244648

http://stackoverflow.com/comment/39460354
has text: You didn't add jquery on this fiddle, are you missing jquery also on your webpage?
comment on: http://stackoverflow.com/q/25315413
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25353617
score: 1
upvote count: 1
downvote count: 0
type: Answer
has body: Since You're already using jquery, this might be the solution one of the solution: html: and jquery:
answers question: http://stackoverflow.com/q/25353340

http://stackoverflow.com/q/25259496
upvote count: 1
tagged with: csom
has comment: http://stackoverflow.com/comment/39356625
downvote count: 1
tagged with: sharepoint-2013
type: Question
tagged with: javascript
score: 0
tagged with: filesize
has title: Sharepoint File Uploading - Limit of file size
tagged with: file-upload
has comment: http://stackoverflow.com/comment/39357182
has body: Can anyone tell me what is the file limit when uploading a file through code using client object model (javascript) Sharepoint 2013. Thanks
favorite count: 0
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/40206371
type: AnswerComment
has text: @DaveA It doesn't, but at least you are defining your own scope.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25443313

http://stackoverflow.com/q/25319600
accepted answer: http://stackoverflow.com/a/25320234
score: 0
answer count: 1
tagged with: typescript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25320234
has body: I would like to have my application hold information about network activity. So I created this function: networkStart = (action: string = null) =&gt; { this.action = action; this.net = true; this.netd = true; } networkStop = (action: string = null) =&gt; { this.net = false; this.netd = false; } But there's a problem. I want to be able to store details of the activity in something like an array or an object that has the action name as the key. So that when some network activity starts then the information is recorded in that array as true for that action and when it stops it is changed to false. How can I convert this so it uses an array to store the actions?
type: Question
has title: How can I store a list of actions and have these set as true of false with a function call?
tagged with: javascript

http://stackoverflow.com/comment/39491426
type: Comment
comment on: http://stackoverflow.com/a/25331413
score: 0
type: AnswerComment
has text: Get it from where? Obviously `a` has it, but...?

http://stackoverflow.com/a/25374330
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25374209
has body: If I understand what you mean, you want a user to be able to select a row out of a table by clicking on it. Then when they click the button, you can capture the selected row's data in each cell. I'll use JQuery in the explanation. You will want to create an event handler for a click event on a &lt;tr&gt;. When that &lt;tr&gt; is clicked, you can apply a CSS class such as .selected to it. Then when the user clicks the button, you have another event handler loop through the .selected class's children and return the values (which would be &lt;td&gt;'s). $('tr').click(function() { $('.selected').removeClass('selected'); $(this).addClass('selected'); }); $('#submit').click(function() { $('.selected').children().each(function() { alert($(this).html()); }); }); Here is a working example on JSFiddle using JQuery.
has comment: http://stackoverflow.com/comment/39628620
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/39376460
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25267401
has text: @CBroe yeah, I'm already breaking my hover text divs out of their original containers in order to play nice with z-indexing so I guess I guess could move them up a level. I sort of wanted a solution that kept the markup intact but I can work with that. Turn it into an answer an I'll accept it (if nothing else comes along).
score: 0

http://stackoverflow.com/comment/39411735
type: Comment
score: 2
comment on: http://stackoverflow.com/a/25289403
type: AnswerComment
has text: you can just do `this.nextSibling` instead of `$( this ).get( 0 ).nextSibling`

http://stackoverflow.com/a/29884810
has comment: http://stackoverflow.com/comment/76671882
has comment: http://stackoverflow.com/comment/83893307
type: Answer
upvote count: 14
score: 13
answers question: http://stackoverflow.com/q/25301960
downvote count: 1
has body: Not sure if you still need the answer to this question. But will post the solution I found as I experienced the same problem. Using your code above the only thing you are missing is to encode your csv string returned by your toCsv function. This would look like this in your code above: function toCsv(arr){ return arr.reduce(function(csvString, row){ csvString += row.join(',') ; csvString += "\r\n"; //";";//"\n"; return encodeURIComponent(csvString); }, ''); } function flowDataCsv(){ document.location = 'data:Application/octet-stream,' + toCsv(flowDataGrid); } Hopefully this helps anyone who comes across this issue again in the future!

http://stackoverflow.com/q/25259718
tagged with: javascript
tagged with: base64
tagged with: jquery
score: 0
tagged with: html5-canvas
answer count: 1
accepted answer: http://stackoverflow.com/a/25260670
has title: Is it possible to convert any type (Url) to base64 format
has comment: http://stackoverflow.com/comment/39357181
type: AnsweredQuestion
has body: I have a link, which can return any type of file (say image/jpeg, zip, mp4 etc). Now i want to convert the above mentioned file data into base64. Is it possible with javascript alone ? I tried canvas.toDataUrl(), but that can help only if my returning file format is image.
type: Question
has comment: http://stackoverflow.com/comment/39358117
has answer: http://stackoverflow.com/a/25260670

http://stackoverflow.com/comment/39488454
has text: .parent('tr') as well as .parent().parent() both give the exact same behavior as described above... the hell?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25329870

http://stackoverflow.com/q/25286685
has comment: http://stackoverflow.com/comment/39406432
downvote count: 0
upvote count: 55
has comment: http://stackoverflow.com/comment/43370014
favorite count: 0
has answer: http://stackoverflow.com/a/42163312
has answer: http://stackoverflow.com/a/32485988
has answer: http://stackoverflow.com/a/33233802
has answer: http://stackoverflow.com/a/35303602
has answer: http://stackoverflow.com/a/37193931
type: Question
has answer: http://stackoverflow.com/a/40223642
has body: Using jQuery 2.1.0 and jQuery.ui 1.11.0 Tested in iOS 7. iPhone and iPad Mini. Works on android and regular browsers. The problem We recently upgraded from jQuery UI 1.10.0 to 1.11.0 and now, when clicking an item in an autocomplete results list, you only get a hover, you have to click the same element again to get a click event. This used to work fine with version 1.10.0. (JSFiddle link in comments) What does not work using css {cursor: pointer} does not work using onclick="" does not work (JSFiddle link in comments) The weird part But here comes the fun/weird part. It works in JSFiddle edit view, but not on the JSFiddle "/show" page. JSFiddles: (type a letter to show results "s" is a good one) Html view (does not work) Edit view (works) I've been working on this for days, but hadn't been able to reproduce it in JSFiddle before testing only the html view. So now I turn to you. I can't for the life of me figure out why the one page triggers a click event, and the other does not. I am using the most basic function of jQuery autocomplete. In fact, using the exact same code that is presented on jQuery UI's home page. The question So, how do I get autocomplete to work with one click in iOS on the /show page? (I will post additional links in comments because I don't have 10 rep yet. Unless I don't have enough rep to comment...)
tagged with: ios7
has answer: http://stackoverflow.com/a/32817003
score: 55
has answer: http://stackoverflow.com/a/27622899
tagged with: jquery-ui-autocomplete
tagged with: jquery-ui
answer count: 12
has title: Autocomplete requires you to click twice in iOS after update to 1.11.0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/34949772
has answer: http://stackoverflow.com/a/45066645
has answer: http://stackoverflow.com/a/36646433
has answer: http://stackoverflow.com/a/26878991

http://stackoverflow.com/comment/39562197
type: Comment
has text: @DanielSanchez. I tried its not working.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25370601

http://stackoverflow.com/comment/39500902
type: Comment
comment on: http://stackoverflow.com/a/25336666
type: AnswerComment
has text: Just in your example lacking of devices is not an error, if you will not define this case as error, it will be never so. You don't need to add `try` will be enough just assign cases of error by just `trow` errors
score: 0

http://stackoverflow.com/a/25262680
has body: You can use lastIndexOf since you're only concerned about getting one element instead of using split which would return all of them. var url = "http://localhost:2013/foo"; console.log(url.substr(url.lastIndexOf('/') + 1)); // returns 'foo'
score: 0
answers question: http://stackoverflow.com/q/25262581
type: Answer
has comment: http://stackoverflow.com/comment/39364044

http://stackoverflow.com/comment/39530028
has text: I don't think that's what I mean. Turn of the JS and the 100% of the interior columns are gone. But thanks anyway.
comment on: http://stackoverflow.com/q/25352635
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25235283
favorite count: 0
has body: I've created this handler to watch for new children being created. This little trick stops the child_added event from triggering my code on each page load. Instead it only gets triggered when something is actually added. // Listen for new rooms being created var first_room_added_after_load = true; this._roomRef.endAt().limit(1).on('child_added', function(snapshot){ if (first_room_added_after_load) { // we want to skip the first room, because it will already exist first_room_added_after_load = false; return; } else { this._onCreateRoom(snapshot); } }, this); That said, when I call remove() on a node in _roomRef then child_added is triggered for a node that already exists. Any hints as to why, and how to stop it? I should also mention this only seems to happen if I remove something that was created after something else already in the list. If I remove the older items first, then child_added is not triggered.
tagged with: firebase
linked to: http://stackoverflow.com/q/19883736
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25244393
accepted answer: http://stackoverflow.com/a/25244393
type: Question
upvote count: 4
answer count: 2
possible better answer: http://stackoverflow.com/a/62696684
has comment: http://stackoverflow.com/comment/39334498
downvote count: 0
tagged with: javascript
score: 4
has title: child_added gets triggered after remove
has answer: http://stackoverflow.com/a/62696684

http://stackoverflow.com/a/25312842
has comment: http://stackoverflow.com/comment/39455747
has comment: http://stackoverflow.com/comment/39455390
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/39455526
score: 2
has comment: http://stackoverflow.com/comment/39455404
has comment: http://stackoverflow.com/comment/39455936
has comment: http://stackoverflow.com/comment/39455932
accepted answer of: http://stackoverflow.com/q/25312747
has comment: http://stackoverflow.com/comment/39455358
answers question: http://stackoverflow.com/q/25312747
has body: may you use this regexp instead of yours. var fxRate = fxresult.replace(/\s/g,""); yours will work to but i think this one is a lil bit better because you avoid typos like one whitespace or two. and you have a typo here var fxresult value = " Call for price " //---------------------------------------^ missing a ; but your major problem in this line is var fxresult value = " Call for price " //----------^ you have a problem with the var declaration (variable names can't contain spaces) see working FIDDLE
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39455775

http://stackoverflow.com/q/25313715
possible better answer: http://stackoverflow.com/a/25313993
type: Question
has body: I've this HTML code: .... Then in my jQuery code I have a condition, if it fails, then I append some HTML to the SELECT element as follow: $(".country").on('change', function() { country = $(this).find('option:selected').val(); $.get(Routing.generate('states', {country_id: country})).success(function(data) { if (data.message === "") { $('.state').empty().append(' Choose state '); $.each(data.entities, function(i, d) { $('.state').append(' ' + d.name + ' '); }); $('.state').removeAttr('disabled'); } else { $('.country').after('' + data.message + ''); } }).error(function(data, status, headers, config) { if (status == '500') { message = "No connection"; } }); }); This output something like this: .... Some text goes here But any time I change the select and condition fails is repeat once and once producing this: .... Some text goes here Some text goes here Some text goes here Some text goes here Some text goes here When should be just one time, what I need to do to fix that? Also how I add a class to since this is not the only DIV with that class and applying to $('.form-group') will add to all the DIVs on the page, any advice?
score: 1
tagged with: javascript
upvote count: 1
tagged with: jquery
favorite count: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: Append text if validation fails but not repeat every time
has answer: http://stackoverflow.com/a/25313829
has answer: http://stackoverflow.com/a/25313993
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25313916
accepted answer: http://stackoverflow.com/a/25313916

http://stackoverflow.com/comment/39545217
score: 0
type: Comment
type: QuestionComment
has text: I already had taken a look over there, but no one worked for me. I still have the same trouble.
comment on: http://stackoverflow.com/q/25334146

http://stackoverflow.com/q/25384360
tagged with: momentjs
has answer: http://stackoverflow.com/a/41400067
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/63800834
has answer: http://stackoverflow.com/a/73707394
has title: How to prevent moment.js from loading locales with webpack?
type: Question
answer count: 8
possible better answer: http://stackoverflow.com/a/37172595
tagged with: webpack
tagged with: javascript
has answer: http://stackoverflow.com/a/25426019
accepted answer: http://stackoverflow.com/a/25426019
has answer: http://stackoverflow.com/a/76850081
score: 219
has answer: http://stackoverflow.com/a/40144727
has comment: http://stackoverflow.com/comment/39622402
has comment: http://stackoverflow.com/comment/39641793
tagged with: gulp
has answer: http://stackoverflow.com/a/43728394
favorite count: 0
upvote count: 219
has answer: http://stackoverflow.com/a/37172595
downvote count: 0
has body: Is there any way you can stop moment.js from loading all the locales (I just need English) when you're using webpack? I'm looking at the source and it seems that if hasModule is defined, which it is for webpack, then it always tries to require() every locale. I'm pretty sure this needs a pull request to fix. But is there any way we can fix this with the webpack config? Here is my webpack config to load momentjs: resolve: { alias: { moment: path.join(__dirname, "src/lib/bower/moment/moment.js") }, }, Then anywhere I need it, I just do require('moment'). This works but it's adding about 250 kB of unneeded language files to my bundle. Also I'm using the bower version of momentjs and gulp. Also if this can't be fixed by the webpack config here is a link to the function where it loads the locales. I tried adding &amp;&amp; module.exports.loadLocales to the if statement but I guess webpack doesn't actually work in a way where that would work. It just requires no matter what. I think it uses a regex now so I don't really know how you would even go about fixing it.

http://stackoverflow.com/q/25298314
answer count: 2
has comment: http://stackoverflow.com/comment/39428730
has title: Serialize fails in IE with new html5 form attribute
has comment: http://stackoverflow.com/comment/39428746
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25298439
has comment: http://stackoverflow.com/comment/39428790
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39428793
has comment: http://stackoverflow.com/comment/39429028
has comment: http://stackoverflow.com/comment/39428809
tagged with: serialization
has body: For some reason, serialize returns an empty string on forms I try to serialize. Two identical forms, one with the new html5 form attribute: &lt;form id="foo"&gt;&lt;/form&gt; &lt;input form="foo" type="text" placeholder="cat" value="cat" name="cat" id="cat" /&gt; &lt;form id="bar"&gt; &lt;input type="text" placeholder="dog" value="dog" name="dog" id="dog" /&gt; &lt;/form&gt; Running serialize on both of these and one returns correctly and the new html5 form returns an empty string. I'm hoping I'm doing something silly because this is a major issue for me as I don't have control over how these forms are written. I only have javascript hooks with this CMS I'm using. Serializing with: console.log($('form#foo').serialize()); console.log($('form#bar').serialize()); This works fine with every other browser I have tested, but not in ie, 8,9,10 or 11! EDIT: I have just checked: http://www.w3schools.com/html/html5_form_attributes.asp, and the support for IE is not there... Has anyone found a hack for this? DEMO: http://jsfiddle.net/875dks8c/5/
has answer: http://stackoverflow.com/a/25298514
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39428699
has comment: http://stackoverflow.com/comment/39428777
has comment: http://stackoverflow.com/comment/39429007
tagged with: forms
has comment: http://stackoverflow.com/comment/39428745
type: Question

http://stackoverflow.com/a/25456763
downvote count: 0
has comment: http://stackoverflow.com/comment/39735913
accepted answer of: http://stackoverflow.com/q/25302351
has comment: http://stackoverflow.com/comment/39736373
answers question: http://stackoverflow.com/q/25302351
type: Answer
has comment: http://stackoverflow.com/comment/42595489
has comment: http://stackoverflow.com/comment/39735763
score: 2
has comment: http://stackoverflow.com/comment/42595865
has body: I have implemented a solution to this problem here: http://jsfiddle.net/Fresh/rzL509qr/ The result is: I'll be the first to note that it is not the most elegant of solutions, as it involves using an SVG matrix transformation after AmCharts has rendered it's output. I have also introduced jQuery into the application to apply the code to perform the transformation (you can change this to javascript at a later date, I've just used jQuery for my convenience). The solution involves transforming the group (i.e. 'g' element) which contains map i.e. &lt;g transform="matrix(1 0 0 -1 0 370)"&gt; This transformation matrix reflects everything about the horizontal line through the centre of the image. "370" is the height of your SVG (370px). I've applied this matrix transformation using: $('svg g:nth-child(8)').attr('transform','matrix(1 0 0 -1 0 370)'); Update Whilst this solution correctly reverses the co-ordinates, the drag up/down functionality has been broken (doh!). I wont delete this answer as it may help and hopefully someone will have a smart idea on how to invert the mouse y-axis in this scenario! What you could try is apply this transformation, reverse the left and right arrows, but disable the drag facility. This should allow a user to navigate intuitively around the map, though without the convenience of using a mouse.
has comment: http://stackoverflow.com/comment/42593695
has comment: http://stackoverflow.com/comment/39735393
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/39733191
comment on: http://stackoverflow.com/a/25366688
has text: I don't dare to put that in my code now, I'll test it later if I dare to. can you tell me what's the code you wrote means? I'm not familiar with Jquery coding...(just a normal school student learning basic codes...)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25324592
has body: You have 2 options for persistent storage. 1) chrome.storage API. It is available for content scripts that you are obviously using, so little modification will be needed for your code. However, it will need to be restructured, since it's asynchronous. 2) If you add a background page, localStorage in it will bind to your extension's "domain" and will therefore be persistent and unique. This will possibly require more restructuring of how your tracking works.
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25324526
answers question: http://stackoverflow.com/q/25324526
downvote count: 0

http://stackoverflow.com/tag/svg
tags question: http://stackoverflow.com/q/25243555
tags question: http://stackoverflow.com/q/25243144
tags question: http://stackoverflow.com/q/25376617
tags question: http://stackoverflow.com/q/25364467
tags question: http://stackoverflow.com/q/25252724
tags question: http://stackoverflow.com/q/25278029
tags question: http://stackoverflow.com/q/25377921
tags question: http://stackoverflow.com/q/25332529
tags question: http://stackoverflow.com/q/25254129
tags question: http://stackoverflow.com/q/25259032
tags question: http://stackoverflow.com/q/25288188
tags question: http://stackoverflow.com/q/25276919
tags question: http://stackoverflow.com/q/25328753
tags question: http://stackoverflow.com/q/25307177
tags question: http://stackoverflow.com/q/25377611
tags question: http://stackoverflow.com/q/25295666
tags question: http://stackoverflow.com/q/25239608
tags question: http://stackoverflow.com/q/25302351
tags question: http://stackoverflow.com/q/25250522
tags question: http://stackoverflow.com/q/25282715
tag name: svg
tags question: http://stackoverflow.com/q/25233629
tags question: http://stackoverflow.com/q/25303448
tags question: http://stackoverflow.com/q/25238748
tags question: http://stackoverflow.com/q/25253776
tags question: http://stackoverflow.com/q/25358272
tags question: http://stackoverflow.com/q/25315624
tags question: http://stackoverflow.com/q/25264350
tags question: http://stackoverflow.com/q/25351919
tags question: http://stackoverflow.com/q/25384052
tags question: http://stackoverflow.com/q/25256927
tags question: http://stackoverflow.com/q/25367987
tags question: http://stackoverflow.com/q/25316432
tags question: http://stackoverflow.com/q/25325879
tags question: http://stackoverflow.com/q/25244300
tags question: http://stackoverflow.com/q/25269511
tags question: http://stackoverflow.com/q/25296193
tags question: http://stackoverflow.com/q/25314082
tags question: http://stackoverflow.com/q/25284570
tags question: http://stackoverflow.com/q/25313695
tags question: http://stackoverflow.com/q/25313839
tags question: http://stackoverflow.com/q/25375188
tags question: http://stackoverflow.com/q/25330987
tags question: http://stackoverflow.com/q/25374512
tags question: http://stackoverflow.com/q/25361011
tags question: http://stackoverflow.com/q/25361096
tags question: http://stackoverflow.com/q/25311826
tags question: http://stackoverflow.com/q/25292879
tags question: http://stackoverflow.com/q/25339396
tags question: http://stackoverflow.com/q/25328084
tags question: http://stackoverflow.com/q/25259825
tags question: http://stackoverflow.com/q/25308590
type: Tag

http://stackoverflow.com/q/25381286
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39594488
has comment: http://stackoverflow.com/comment/39595800
tagged with: click
has comment: http://stackoverflow.com/comment/39635531
has comment: http://stackoverflow.com/comment/39581579
has comment: http://stackoverflow.com/comment/39634541
answer count: 1
favorite count: 0
has body: I AM NOT TRYING TO SUBMIT A FORM USING JAVASCRIPT!!" The above remark is misleading, inappropriate and confused I have a html form that contains several elements (all with unique #id) which when clicked using the mouse correctly submits the form with the action=value pair. &lt;html&gt;&lt;body&gt;&lt;form id="frm-table" name="frm-table" method=get&gt; &lt;!-- the form has an action url to call php script that interprets passed values and serves new dynamic page --&gt; &lt;!-- @20140820 - #id and #name added to form --&gt; &lt;button id="cancel-btn" type="submit" name="action" value="cancel"&gt;&lt;img src="http://foo.localhost/img/cancel16.png" alt="Cancel" title="Cancel" class="btn" name="btn_c" /&gt;&lt;/button&gt; &lt;!-- several other inputs eg type=text and buttons type=submit --&gt; &lt;/form&gt;&lt;/body&gt; I have a js script that captures a document ESC keydown and as example: displays an alert to confirm capture. document.onkeydown = function(evt) { evt = evt || window.event; var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if (evt.keyCode == 27) { if (document.getElementById('cancel-btn') != null) { // alert('Esc key pressed.'); //just to test capturing ESC key - OK // testing suggestion 201408211700 document.getElementById('frm-table').action = 'http://foo.localhost/index.php?page=bg' document.getElementById('frm-table').submit(); //suggestion does not work - form not submitted // document.getElementById('cancel-btn').click(); //original does not work } evt.returnValue=false; } if ((evt.keyCode == 13) &amp;&amp; (node.type=="text")) {return false;} }; When the alert is replaced by a .click() nothing happens. I do not understand why the native click event is not firing. I am aware there is no click event on a button element, however it does accept and action a mouseclick on it. Calling a function to submit the form (by adding a listener event to the button does not work - it submits the form but the posted values do not i…
has comment: http://stackoverflow.com/comment/39591829
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/9855656
downvote count: 1
has comment: http://stackoverflow.com/comment/39634224
has comment: http://stackoverflow.com/comment/39582126
has comment: http://stackoverflow.com/comment/39632069
has title: javascript: a button element is not working on click()
has comment: http://stackoverflow.com/comment/39591445
score: -1
has answer: http://stackoverflow.com/a/25381445
has comment: http://stackoverflow.com/comment/39595012
has comment: http://stackoverflow.com/comment/39593973
type: Question

http://stackoverflow.com/q/25246467
has title: how do you look at the contents of an object in javascript
type: Question
has comment: http://stackoverflow.com/comment/39332274
tagged with: javascript
has comment: http://stackoverflow.com/comment/39332214
has body: I am very new to javascript. When I do a typeof variable name, I get object{}. I need to look at the contents of this object. How would I do that in javascript?
has comment: http://stackoverflow.com/comment/39332293
answer count: 1
has comment: http://stackoverflow.com/comment/39332237
has answer: http://stackoverflow.com/a/25246544
linked to: http://stackoverflow.com/q/85992
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25246544
duplicate of: http://stackoverflow.com/q/85992
score: 0
has comment: http://stackoverflow.com/comment/39332906

http://stackoverflow.com/a/25353286
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25353134
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39529120
has body: So when you get a page via ajax its going to return the entire body, not just what you can see in a browser. so the &lt;!-- html comment is being returned in the string. You need to remove that output altogether by using php comments or your calculation of number &gt; 0 will fail. If you absolutely can't change the PHP output for whatever reason you can strip the response of all characters by doing something like: if (number.replace(/\D/g,'') &gt; 0) { but that's pretty gross. better to clean up your php file.

http://stackoverflow.com/q/25271952
has title: Plugin is called hundred of times in directive
has answer: http://stackoverflow.com/a/25419963
has answer: http://stackoverflow.com/a/25390186
has answer: http://stackoverflow.com/a/25422080
downvote count: 0
answer count: 7
tagged with: javascript
has answer: http://stackoverflow.com/a/25272039
favorite count: 0
has answer: http://stackoverflow.com/a/25336877
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39380809
score: 2
has comment: http://stackoverflow.com/comment/39709079
has body: app.directive('tooltip_plugin_as_example', function() { return { restrict: 'A', link: function(scope, element, attrs) { $(element).tooltip(); console.log("this is called"); } }; }); &lt;div class="someclass"&gt; &lt;ul&gt; &lt;li tooltip_plugin_as_example ng-repeat="item in iCtrl"&gt;{{item.name}}&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; this is called happens hundreds of times when a new tab is clicked and a new page is loaded. I want it to happen just once, ideally, when the last item is loaded. Is it possible? I am thinking of setting interval, and calling this plugin once a second for example, but obviously, that would be a horrible practice...
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39380648
has answer: http://stackoverflow.com/a/25273426
has comment: http://stackoverflow.com/comment/39380052
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/25272683
has comment: http://stackoverflow.com/comment/39380925

http://stackoverflow.com/a/25381764
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/25378682
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25378682
has body: If you want Grunt to wait, you can call this.async inside your task function: grunt.registerTask('prevent', 'watch file and prevent process exit', function (grunt) { var done = this.async(), _fs = require('fs'); _fs.watch(process.cwd(), function (event, filename) { console.log(event, filename) }); }); See the this.async doc here.

http://stackoverflow.com/comment/39507956
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25340572
has text: i replaced my url with your URL in fiddle but it doesn't work.
type: AnswerComment

http://stackoverflow.com/comment/102597812
comment on: http://stackoverflow.com/a/51395131
score: 0
type: AnswerComment
type: Comment
has text: I was having an issue which freezes the button when scrolling the screen on mobile. The address bar also disappeared with that. Only if I scrolled to the top, things get back to work again. So, your solution solved this issue. I didn't have included height 100% in my `main.css` file. Thanks! The exception was just I didn't need the overflow.

http://stackoverflow.com/comment/39443317
has text: The java script which should call the C function is at the location of /var/lib/cloud9/demo In this location I have made a folder called gpio which has the Test executable file. Actually to run this c file directly from console i used to type ./Test. Now I want to call this function from javascript. plz check my 3 lines of code added: var spawn = require('child_process').spawn; var ls = spawn("gpio/Test.exe", {stdio: "inherit"}); ls.on("exit", function(status) { console.log("Done"); })
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25291369
type: AnswerComment

http://stackoverflow.com/q/25348831
type: UnansweredQuestion
tagged with: handlebars.js
has body: I'm having some trouble rendering a handlebars template with some data. The variable placeholders are replaced with "0", instead of the variables value. I've logged the JS object going into the the compiled handlebars template, it all seems fine. The template itself renders fine, it's just the variables that don't work. tpl: function(){ var template_id = "#tpl-" + this.partial, partials_elem = $('&lt;div&gt;' + partials + '&lt;/div&gt;'); return Handlebars.compile($(template_id, partials_elem).html()); }, and this.$el.html(this.tpl(this.data)).appendTo(this.holder); where this.data = {first_name: "test"} (I've hardcoded that in there as well, console.log one line before this.tpl(this.data) gives me this value as well) the handlebars template looks like this: &lt;div id="tpl-test"&gt; {{first_name}} &lt;/div&gt; I'm using RequireJS, Backbone and Handlebars. I hope someone can help me out! Thanks, Rik EDIT: Solved by changing this.$el.html(this.tpl(this.data)).appendTo(this.holder); to: var tpl = (this.tpl())(this.data || {}); this.$el.html(tpl).appendTo(this.holder);
tagged with: requirejs
has title: Backbone handlebars variables return 0 (zero)
type: Question
linked to: http://stackoverflow.com/q/24192234
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25349224
has comment: http://stackoverflow.com/comment/39529484
tagged with: templates
tagged with: backbone.js

http://stackoverflow.com/q/25288098
possible better answer: http://stackoverflow.com/a/25288196
has title: Removing div opacity and applying pointer events in styles with jQuery
has comment: http://stackoverflow.com/comment/39409205
type: Question
has comment: http://stackoverflow.com/comment/39409128
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has body: I need a div to lose its styling when any radio button has been selected. Its current styling is: #packages-and-payment{ opacity: 0.4; pointer-events:none; } I need the opacity to be removed and the pointer events to work again. I have been trying this in jQuery: $(function() { if ( $('input:radio:checked').length &gt; 0 ) { $( '#packages-and-payment' ).css( "opacity", "0" ); $( '#packages-and-payment' ).css( "pointer-events", "" ); } }); But its not working? What am I doing wrong or is there a better solution? I need the opacity to be removed so becomes fully visible. EDIT Here is a fiddle: http://jsfiddle.net/t9edq74u/
upvote count: 1
has answer: http://stackoverflow.com/a/25288196
downvote count: 1
accepted answer: http://stackoverflow.com/a/25288189
favorite count: 0
has comment: http://stackoverflow.com/comment/39409130
has answer: http://stackoverflow.com/a/25288210
tagged with: css
has answer: http://stackoverflow.com/a/25288189
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39409191

http://stackoverflow.com/q/25363384
type: UnansweredQuestion
has body: I have a html template that is being used for multiple projects. In that template I have two places where I can set the content. The layout is something similar to this: Navbar from TEMPLATE other TEMPLATE stuff CONTENT can be set here CONTENT can also be set here My question is is it possible to use the same angular app in both #content1 and #content2? Can the ng-app="main" be used twice? If something like this isn't possible to do I can add an ng-app attribute to the template but would rather not have to do this as, as I said, the template is used for multiple projects a lot of which won't be using angular. Edit: Just to clarify, I'm using a tal template from zope. In that template I have two fill slots, I would like to use the same angular app in both fill slots without having to change the original tal template if possible.
answer count: 0
downvote count: 0
score: 1
type: Question
has title: Initiating same angularjs app in two places
tagged with: zope
tagged with: javascript
has comment: http://stackoverflow.com/comment/39549202
has comment: http://stackoverflow.com/comment/39549688
upvote count: 1
tagged with: templates
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/39349282
score: 1
type: AnswerComment
has text: Thanks for the answer but the jsfiddle it doesn't work with firefox, think i could tweak it a little bit to make it work?
type: Comment
comment on: http://stackoverflow.com/a/25234221

http://stackoverflow.com/comment/39424656
comment on: http://stackoverflow.com/a/25249473
type: AnswerComment
score: 0
type: Comment
has text: So put this line inside the `toggleStatus` method. I'm still confused about what you're trying to do.

http://stackoverflow.com/q/25347315
has answer: http://stackoverflow.com/a/57527965
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/53130463
has answer: http://stackoverflow.com/a/26767131
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/53571402
upvote count: 59
possible better answer: http://stackoverflow.com/a/26767131
has comment: http://stackoverflow.com/comment/39518808
type: Question
score: 59
has answer: http://stackoverflow.com/a/40134791
has answer: http://stackoverflow.com/a/25347431
has title: semantic-ui dropdown menu do not work
has answer: http://stackoverflow.com/a/28268975
accepted answer: http://stackoverflow.com/a/25347431
downvote count: 0
answer count: 7
has body: I have been trying to build a menu using Semantic-UI. I can't get the dropdown menus to work at all. I took a copy of the page Menu examples and pulled out everything except the tiered menu and placed it in a separate file. Only the dropdown menu will not function, though there are no errors. Can anyone tell me what I have missed? Friends Browse Messages More Edit Profile Choose Language Account Settings Search Add Remove
tagged with: javascript
favorite count: 0
tagged with: semantic-ui

http://stackoverflow.com/a/25315008
answers question: http://stackoverflow.com/q/25314611
has body: That's because your JavaScript variable states will not be saved across pages. Everything in helpers.js starts over from the top, without any knowledge of previous page loads or other pages in the browser, every time you load the page. If you want to pass values across pages, use sessionStorage (for modern browsers) or use cookies. If you are using a desktop application you can use a database framework like NeDB. The syntax is similar to Mongo and it saves to a .db file.
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/25314611

http://stackoverflow.com/q/25350807
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: heatmap
score: 4
has body: i want to create a heatmap layer over a 100 meters radius and so i want to generate random lat-long values in that specific radius and so want to replace it with var taxiData = [ {location: new google.maps.LatLng(41.8819, -87.6278),weight: 2}, {location: new google.maps.LatLng(41.8820, -87.6279),weight: 1}, new google.maps.LatLng(41.8821, -87.6280), {location: new google.maps.LatLng(41.8822, -87.6281),weight: 2}, {location: new google.maps.LatLng(41.8823, -87.6282),weight: 5}, {location: new google.maps.LatLng(41.8824, -87.6283),weight: 3}, ]; please help
has title: how to generate random Lat-lng values with known center and radius in javascript?
has answer: http://stackoverflow.com/a/28699123
type: Question
tagged with: javascript
upvote count: 4
answer count: 1

http://stackoverflow.com/a/42949522
type: Answer
answers question: http://stackoverflow.com/q/25265410
has body: Damn! This is an old post but still remains unanswered? Anyway, for those who have visited this page and scrolling for an answer, One way in which you can handle this is, $(document).ready(function () { // Hide the model or a div; whatever you are using $(".modal").hide(); //listen for the submit button click $("#myForm").submit(function (event) { $(".modal").show(); // set a timeout to hide the gif setTimeout(function () { $('.modal').hide(); }, 2500); }); }); That is, adding a timeout. Not the best way though!.
score: 0

http://stackoverflow.com/a/25255550
type: Answer
answers question: http://stackoverflow.com/q/25255486
has comment: http://stackoverflow.com/comment/39349697
upvote count: 2
has body: Change your test to the "positive" if ( el.style.display == 'block' ){ And it will work. The default is probably not exactly 'none'. Using jQuery would make that a lot easier, see http://api.jquery.com/toggle/
accepted answer of: http://stackoverflow.com/q/25255486
score: 2
has comment: http://stackoverflow.com/comment/39349712
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39349669

http://stackoverflow.com/a/25303758
downvote count: 0
type: Answer
has body: Instead of setting an onclick attribute on each and every one of these buttons, I'd use a single event listener. Seeing as you added a jQuery tag, this code should do the trick: $('table').on('click', '.btn', function() {//replace table selector with an id selector, if you are targetting a specific table var row = $(this).closest('tr'), cells = row.find('td'), btnCell = $(this).parent(); //set to work, you have the cells, the entire row, and the cell containing the button. }); fiddle If you want to do the same in vanillaJS: document.querySelector('table').addEventListener('click', function(e) {//same applies here: querySelector('#tableID') would be preferable var target = (e = e || window.event).target || e.srcElement; if (target.tagName.toLowerCase() === 'input' &amp;&amp; target.className.match(/\bbtn\b/)) { var btnCell = target.parentNode, row = (function(node) { while (node.tagName.toLowerCase() !== 'tr') node = node.parentNode; return node }(btnCell)), cells = row.cells; //set to work, you have the button-containing cell, the row and all of the cells } }, false); This technique is called event delegation, google it in case you're not familiar with the idea behind it.
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25303556
accepted answer of: http://stackoverflow.com/q/25303556
type: AcceptedAnswer

http://stackoverflow.com/q/25265771
accepted answer: http://stackoverflow.com/a/25266123
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39368349
tagged with: bluebird
has comment: http://stackoverflow.com/comment/39368385
has title: Catching Errors Inside Multiple .all() Calls
type: Question
has comment: http://stackoverflow.com/comment/39368873
has body: I've been wrapping my head around promises trying to implement a simple working example that matches what I'm trying to do in my application. I've got it 85% down, I'm just not sure if this would actually catch errors if it were to happen inside the subsequent .all() calls. I thought about using a .catch() to grab the errors, but various examples seemed to use .done() instead. Am I catching all the errors that could happen in this example? var Promise = require('bluebird'); var UUID = require('node-uuid'); var fs = Promise.promisifyAll(require('fs')); var innerArray = function() { return [ { type: "thing", id: UUID.v4() }, { type: "thang", id: UUID.v4() }, { type: "thing", id: UUID.v4() }, { type: "thang", id: UUID.v4() } ]; }; var outerArray = [ innerArray(), innerArray(), innerArray(), innerArray() ]; fs.readdirAsync('dump') .then(function(files) { return files.map(function(file) { return fs.unlinkAsync('dump/' + file); }); }) .then(function(stuff) { return Promise.all(outerArray.map(function(inArr) { return Promise.all(inArr.map(function(item, itemIndex) { return fs.writeFileAsync( 'dump/' + item.id, JSON.stringify(item)); })); })); }).done(function(donezo) { console.log('Done!'); }, function(e) { throw e; }); Sorry to post a code dump and ask "does this work?" The code works, I'm just unsure of if it would catch an error if it were to happen at some point in the flow.
tagged with: javascript
has answer: http://stackoverflow.com/a/25266123
score: 0
answer count: 1
tagged with: promise

http://stackoverflow.com/a/25235802
type: Answer
has body: you can use the jquery to submit form when change on dropdown value .......... .........
answers question: http://stackoverflow.com/q/25234289
score: 0

http://stackoverflow.com/a/25336159
accepted answer of: http://stackoverflow.com/q/25336136
has body: ES5’s strict mode prevents this! Just put a 'use strict' statement at the top of any function or source file: 'use strict'; function foo() { var x = 5 // Forgot the comma! y = 6; // Fails in strict mode as an implicit global } foo(); Linters should also check for this, and you should use both a linter and strict mode, ideally. I recommend JSHint.
has comment: http://stackoverflow.com/comment/39499981
has comment: http://stackoverflow.com/comment/39499707
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39500218
has comment: http://stackoverflow.com/comment/39499698
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39499703
answers question: http://stackoverflow.com/q/25336136
upvote count: 3
has comment: http://stackoverflow.com/comment/39500118
downvote count: 1

http://stackoverflow.com/a/25319098
score: 0
has comment: http://stackoverflow.com/comment/39467167
type: Answer
has body: There are no columns in JSON. It's a document format not a table format. That means that every entry ("row") in an array can have any fields. Field names in one array entry can be completely different from the previous or any other. So in that sense, no, such a function does not exist. You would have to write it yourself.
answers question: http://stackoverflow.com/q/25319038

http://stackoverflow.com/a/25276756
upvote count: 1
has body: I use jQuery Touch Punch myself. Check it out: jQuery Touch-Punch I use it on my ipad for sortable lists and it responds well to scrolling.
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25266095

http://stackoverflow.com/a/25272028
accepted answer of: http://stackoverflow.com/q/25271661
upvote count: 1
type: AcceptedAnswer
has body: You'd absolutely have the same issues with Angular. Probably even worse, as Angular's DOM manipulations give you plenty of opportunities to mess up memory management with detached DOMs. As you get into writing custom directives, make sure you're using the $destroy event to clean up any references to the DOM; this is the first thing I look for with leaks in Angular. $scope.$on('$destroy', function() { // Nullify any references that might hold onto a DOM tree. $someCachedElement = null; $someOtherThing = null; // Make sure you're unsubscribing from any custom services you've written that // might also be referencing your directive elements. someService.remove($scope); // Maybe you used a jQuery plugin on $el. Hopefully it has a destroy method. $el.somePlugin('destroy'); }); But in general, this is the same advice I'd give for a traditional SPA; any component / module / class that interfaces with the DOM should have teardowns that do this type of thing. And ideally, tests proving that the teardowns always fire when you expect them to. :)
type: Answer
has comment: http://stackoverflow.com/comment/39602917
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25271661

http://stackoverflow.com/comment/39441007
comment on: http://stackoverflow.com/a/25304674
score: 0
type: Comment
has text: just check because in your action... public JsonResult getFoodDetails(int userId)...if userid from ajax is null or empty... then it will create problem or just use "?" with int as i have used in my answer...@AijuThomasKurian
type: AnswerComment

http://stackoverflow.com/a/25263698
has comment: http://stackoverflow.com/comment/39364130
type: AcceptedAnswer
has body: Here's a JSFiddle I have used your Plunker to create a jstree using AngularJS. Your code var app = angular.module('jsTreeApp', ['jstree']); will result to an error since the jstree plugin is not an Angular module. So I removed it. You are correct that you need to use a directive to render the tree. I also modified your data in order for it to render correctly. See example data: $scope.treeData = { "data": [{ "text": "Basics", "state": "open", "children": [ { "text": "login", "state": "closed", "children": [ "login", { "text": "results", "state": "open" } ] }, { "text": "Basics", "state": "closed", "children": [ "login", "something", { "text": "results", "state": "closed" } ] }] }, { "text": "All", "state": "closed", "children": [{ "text": "AddCustomer", "state": "closed", "children": [ "login", "Add", { "text": "results", "state": "closed" } ] }] }] }
accepted answer of: http://stackoverflow.com/q/25261430
has comment: http://stackoverflow.com/comment/39364296
answers question: http://stackoverflow.com/q/25261430
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/39369098
has comment: http://stackoverflow.com/comment/39364229

identifier
tag name: identifier
type: Tag
tags question: http://stackoverflow.com/q/25293176

http://stackoverflow.com/comment/39816627
score: 0
type: AnswerComment
has text: thanks a lot for this issue, next step is to remove binary content
type: Comment
comment on: http://stackoverflow.com/a/25436441

http://stackoverflow.com/a/25231981
answers question: http://stackoverflow.com/q/25231455
has body: +[] -&gt; 0 //Because + converts all other javascript types to numbers !+[] -&gt; true //Because ! converts 0 to true ![] -&gt; false //Empty array is true !![] -&gt; true //Because ![] is false (!+[] + !![] + !![] + !![] + []) -&gt; true+true+true+true+""="4" + converts Boolean value to 1 if it is true, and 0 if it is false.` And this is a string value,because Number+Empty object creates a string, because an Empty Object can't convert to Number it converts to a String. And as we know Number+String-&gt;String. As a result: (!+[] + !![] + !![] + !![] + []) is the same as "4" In the same way (!+[] + !![] + !![] + !![] + !![] + !![] + !![]) -&gt; true+true+true+true+true+true+true = 7 //this is a Number, because Boolean value converts to a Number: either 0 or 1 And finally "4"+7=47
score: 0
type: Answer

http://stackoverflow.com/comment/39569405
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25346121
has text: Hi,Lanny,thank you support. http://community.createjs.com/discussions/createjs/2335-set-bitmap-invisible-while-clicked-with-creatjs
type: AnswerComment

http://stackoverflow.com/comment/39411880
type: AnswerComment
type: Comment
has text: I Edited my question. but i found out some facts. when go to another page, the log showed that "resetting plugin due to page load". I thought this is the main issue.
comment on: http://stackoverflow.com/a/25287312
score: 0

http://stackoverflow.com/comment/39487876
type: AnswerComment
has text: Hi, thanks for the help already. I mover the first line inseide the function and now the console has no errors but its still not working.
comment on: http://stackoverflow.com/a/25329782
type: Comment
score: 0

http://stackoverflow.com/a/26026377
answers question: http://stackoverflow.com/q/25319388
score: 0
has body: After quite a bit of investigation, I resolved several problems with the above. First the affix and affix-top class change is necessary to allow the side-nav to be positioned int eh correct spot for when the page loads versus when the user is scrolling. affix-top on page load: removes the postion: fixed; property from your element so that it start in normal document flow and doesn't cover up your header content affix on scroll: add the position: fixed; property to your element when scrolling In order for this to work properly you have to use something similar to the above selector. A technique called 'chaining' which allows you to target multiple elements, id's, and classes to find a unique element. In this case, it says that i'm looking for a ul that has the classes scrspy and affix. The target must have all three attributes for it to be selected. Taking all of this together, the above selector is telling my scrollspy element that when the user is scrolling, it's top position should be 1.85 rem. This is to create a bit of space between the first list item in the menu and the top of the screen. Since the affix class isn't applied when the user it either 1) at the top of the page or 2) when the page first loads, this style won't apply and the object will return to normal document flow.
type: Answer

http://stackoverflow.com/comment/39594242
type: Comment
type: QuestionComment
has text: What character do you think gets sent when you hit the backspace key on your keyboard? Answer: the backspace char. It's not a printable character so it can't be rendered to a screen/console. How any specific program deals with it is app specific. A text editor removes the adjacent character to the left. A web browser will ignore it when it encounters it in markup as it does any other non-printable char.
score: 4
comment on: http://stackoverflow.com/q/25387672

http://stackoverflow.com/q/25352194
possible better answer: http://stackoverflow.com/a/25352221
has answer: http://stackoverflow.com/a/25352227
type: Question
has answer: http://stackoverflow.com/a/25352221
tagged with: javascript
has answer: http://stackoverflow.com/a/25352224
has title: How to register click using class and get the id of the clicked item in jquery?
score: 0
answer count: 3
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25352224
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: im developing a webpage there i need to register a click in jquery using the items class and then get the id of that object. Example: html: jquery: $(".exampleclass").click(function(){ Function to get the id });

http://stackoverflow.com/q/25323388
tagged with: javascript
score: 0
answer count: 1
has body: What would the reasons be for a link failing in a 400 error when being clicked. The link also works in the other following situations Clicked open in new tab Clicked open in new window Clicked open in incognito or private I've taken apart the requests, and when requesting each request path on its own, each URL appears to work. The click link is invoked by Javascript on the front-end and makes requests to Java Spring back-end to push data to a RDb. Could this be a header issue? I cannot release the links or the code for this unfortunately due to its confidential nature, but can provide any publicly available information for debugging.
has answer: http://stackoverflow.com/a/25330188
type: UnansweredQuestion
tagged with: spring
tagged with: java
tagged with: http
type: Question
has title: Link (with redirects) opens in incognito or when open in new tab, or new page is explicitly declared. Doesn't work when just clicked

http://stackoverflow.com/comment/39518216
has text: I tried doing `return names.join(" ");` using ` ` instead of a comma (,) but it did not append a break in line it showed the text as ' '. What am I missing here, if i want to add a line break?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25345574

http://stackoverflow.com/a/25319132
answers question: http://stackoverflow.com/q/25301018
accepted answer of: http://stackoverflow.com/q/25301018
has body: Haha to answer my own question. Short answer: you have to just add the scope of email in manifest file Long answer: I had to use the google plus api. Google has deprecated OpenID 2.0 and now using Google Plus sign in and api according to https://developers.google.com/accounts/docs/OpenID2. So I mentioned above that I was not getting the email address on the call to Google Plus using xhr method = "GET, url='h t tps://www.googleapis.com/plus/v1/people/me'. So the response was only showing basic things like name, gender, image etc, but no email. In order to get the email, you must add an email token in the manifest file as in the example "permissions": ["identity", ..., ], "oauth2": { // client_id below is specifc to the application key. Follow the // documentation to obtain one for your app. "client_id": xyz, "scopes": ["https://www.googleapis.com/auth/plus.login", "https://www.googleapis.com/auth/userinfo.email"] **&lt;-this one** } .... Now in your response when ypou call xhr method = "GET, url='h t t ps://www.googleapis.com/plus/v1/people/me', you will get basic user info plus the email
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/comment/39563993
type: Comment
has text: I can confirm @ArtOfCode answer. I use numeraljs from bower (it comes with a minified version as well) and I just tested your code, and it works good!
score: 0
comment on: http://stackoverflow.com/q/25371381
type: QuestionComment

http://stackoverflow.com/q/25292474
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25293538
type: Question
tagged with: d3.js
linked to: http://stackoverflow.com/q/23792791
has answer: http://stackoverflow.com/a/25298887
upvote count: 2
answer count: 2
possible better answer: http://stackoverflow.com/a/25298887
has answer: http://stackoverflow.com/a/25293538
has title: Custom sort tsv-generated table in D3
tagged with: javascript
has body: Any idea how to create a custom-sortable table in D3.js with data from a TSV file? User can select which column(or columns) to sort by. Here's my .js to create the table: d3.tsv("data/score.tsv", function(error, data) { data.forEach(function(d) { d.Name = d.Name; d.Id = d.Id; d.Score = d.Score; }); function tabulate(data, columns) { var table = d3.select("#scoreTable").append("table"), thead = table.append("thead"), tbody = table.append("tbody"); // append the header row thead.append("tr") .selectAll("th") .data(columns) .enter() .append("th") .text(function(column) { return column; }); // create a row for each object in the data var rows = tbody.selectAll("tr") .data(data) .enter() .append("tr"); // create a cell in each row for each column var cells = rows.selectAll("td") .data(function(row) { return columns.map(function(column) { return { column: column, value: row[column] }; }); }) .enter() .append("td") .html(function(d) { return d.value; }); return table; } // render the table var peopleTable = tabulate(data, ["Name", "Id", "Final Score"]); }); But I'm pretty much stuck from here. I tried looking at: D3.js trying to implement sortable svg table and: http://bl.ocks.org/mbostock/3719724 But I'm not quite sure how to translate them to what I need. Would really appreciate any help. Thanks.
type: AnsweredQuestion
score: 2

http://stackoverflow.com/comment/39434110
type: AnswerComment
has text: Hi. It appears onclick event only takes a line of code. Thanks for your help! I was wondering if you know how to pass a parameter to the button, which will be sent afterwards for server side operations?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25281862

http://stackoverflow.com/comment/39307479
has text: I think you are absolutely right. It's a public site for tracking shipments: http://www.shipmentlink.com/servlet/TDB1_CargoTracking.do It requires that you enter a bill of lading #, then press Submit. Then you get another page where there is a link to a particular container. That leads you to the tracking page which is my goal to obtain. But its the same on, for example, www.google.com, to enter a search term then press Search Google. You can do this through parameters in the query strong on google, but not on above site. Have already contacted them, they said "it was a good idea".
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25233328

http://stackoverflow.com/q/25337503
upvote count: 1
has title: Jquery convert object to string
downvote count: 5
has comment: http://stackoverflow.com/comment/39502088
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/39502053
tagged with: javascript
tagged with: jquery
has body: How to convert object into a string inside the Jquery? Here is my code: &lt;script type="text/javascript"&gt; $(document).ready(function(){ var str = $(this).find("text"); alert(str); } }); &lt;/script Result of alert(str) is object Object. It will not display the text element. What's the problem with my code? Thanks
has comment: http://stackoverflow.com/comment/39502125
favorite count: 0
has comment: http://stackoverflow.com/comment/39502048
has answer: http://stackoverflow.com/a/25337707
type: UnansweredQuestion
score: -4

http://stackoverflow.com/a/25374072
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25320051
score: 2
has body: I have found answer on my question and answered in this topic Click on random link via node.js and webdriver Example of code (thanks to Nguyen Vu Hoang) driver.findElements(webdriver.By.tagName("a")).then(function(elems){ elems.forEach(function (elem) { elem.getText().then(function(textValue){ console.log(textValue); }); }); });
answers question: http://stackoverflow.com/q/25320051
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/q/25386073
has comment: http://stackoverflow.com/comment/39591159
has comment: http://stackoverflow.com/comment/39591224
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39591197
has comment: http://stackoverflow.com/comment/39591340
has title: How to list plugins in IE using JavaScript?
linked to: http://stackoverflow.com/q/917148
has comment: http://stackoverflow.com/comment/39591460
downvote count: 2
upvote count: 1
type: Question
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39591305
has answer: http://stackoverflow.com/a/25386480
has body: I have searched a lot but only found outdated sources on how to list the plugins used in Internet explorer client side using Javascript. Does anyone know of a code that works and identifies the plugins? This is a website that detects plugins on IE https://panopticlick.eff.org/index.php?action=log&amp;js=yes I am using this code below for other browsers: navigator.plugins.refresh(false); var numPlugins = navigator.plugins.length; var a = ''; for (var i = 0; i &lt; numPlugins; i++) { var plugin = navigator.plugins[i]; if (plugin) { a += plugin.name + plugin.filename; } }
answer count: 1

http://stackoverflow.com/a/25278213
has body: You can use the EmberData EmbeddedRecordsMixin http://emberjs.com/api/data/classes/DS.EmbeddedRecordsMixin.html and set choices to be embedded.
accepted answer of: http://stackoverflow.com/q/25233259
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25233259

http://stackoverflow.com/comment/39415867
type: Comment
has text: Sorry, I have more questions - how about .each() function? I want to bind a click event on each td tag, and I failed again..
type: AnswerComment
comment on: http://stackoverflow.com/a/25290594
score: 0

http://stackoverflow.com/a/25383907
type: Answer
answers question: http://stackoverflow.com/q/25382976
score: 1
upvote count: 1
has body: Use splice() to do this: var arraySentences = $('#first').html().split('.'); var numberOfSentences = arraySentences.length - 1; // because of blank after last period var numberOfSentencesWeWantInSecond = 4; var remainderOfSentences = numberOfSentences - numberOfSentencesWeWantInSecond; var membersOfFirst = arraySentences.splice(0, remainderOfSentences); $('#first').html(membersOfFirst.join('. ')); $('#second').html(arraySentences.join('. ')); // the leftover sentences Here is an example - http://jsfiddle.net/rzgpu11w/
downvote count: 0

http://stackoverflow.com/q/25377383
has comment: http://stackoverflow.com/comment/39840622
has answer: http://stackoverflow.com/a/54884756
has answer: http://stackoverflow.com/a/59951237
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/16870007
has answer: http://stackoverflow.com/a/43319919
has body: I want to close pop up on click of back button for mobile. I implemented this using onhashchange: window.onhashchange = function (event) { }; In this case, if pop up is opened multiple times then on click of back button, it opens and closes the modal pop up. But, I want modal pop up to close on first back and navigate to prev page on next back. I also tried using onbeforeunload, but it will show another alert to leave or stay on the page. $(window).bind('beforeunload', function(e) { return false; }); What is the best way to close the pop up on back button and redirect to prev page on next back?
tagged with: twitter-bootstrap
type: Question
has answer: http://stackoverflow.com/a/60058646
has title: Close pop up on back button
has answer: http://stackoverflow.com/a/25464754
possible better answer: http://stackoverflow.com/a/33948372
has comment: http://stackoverflow.com/comment/53425272
has answer: http://stackoverflow.com/a/70616196
linked to: http://stackoverflow.com/q/23685304
has answer: http://stackoverflow.com/a/33948372
score: 27
answer count: 13
has comment: http://stackoverflow.com/comment/39837387
has answer: http://stackoverflow.com/a/40033585
has answer: http://stackoverflow.com/a/25563098
upvote count: 27
has answer: http://stackoverflow.com/a/54969370
has answer: http://stackoverflow.com/a/77969816
has comment: http://stackoverflow.com/comment/49166555
has answer: http://stackoverflow.com/a/73771583
linked to: http://stackoverflow.com/q/75970812
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25518178
favorite count: 0
accepted answer: http://stackoverflow.com/a/25464754

http://stackoverflow.com/comment/39570445
comment on: http://stackoverflow.com/q/25375030
has text: @CarlMarkham Have you discovered `console.dir`?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39595468
has text: @MateuszUrbański Can you make a fiddle reproducing your problem ?
comment on: http://stackoverflow.com/q/25380029
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/comment/39473363
has text: @bhargavg, ah right, sorry. The path is... mate, you just solved my question! - I was editing in the platforms/ios/www directory! I should have been editing in the root www directory!
type: QuestionComment
comment on: http://stackoverflow.com/q/25322420
score: 0
type: Comment

http://stackoverflow.com/comment/39451306
type: Comment
comment on: http://stackoverflow.com/q/25310454
type: QuestionComment
score: 0
has text: Instead of e.stopPropagation() try `e.preventDefault()`. If this method is called, the default action of the event will not be triggered. [Source](http://api.jquery.com/event.preventDefault/)

http://stackoverflow.com/comment/39592483
comment on: http://stackoverflow.com/a/25386731
score: 1
type: AnswerComment
type: Comment
has text: Ha, no. I didn't even notice that. I meant it makes no sense to evaluate `fired == false` as it is always set to false prior to the condition

http://stackoverflow.com/comment/39402076
comment on: http://stackoverflow.com/q/25283312
score: 0
has text: can anyone help pls..
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39578265
type: AnswerComment
score: 1
type: Comment
has text: @Pizzy213codes: (You might also want to regularly check up on the **[changelog](https://github.com/angular/angular.js/blob/master/CHANGELOG.md)** to see what has changed and what new features are available (or in beta).)
comment on: http://stackoverflow.com/a/25368976

http://stackoverflow.com/a/25293394
answers question: http://stackoverflow.com/q/25293085
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has body: The easiest way is to put all available options into a structure which you can then access using selected. example: $('.user_type, #user_type').on('change', function () { selected = $(this).find('option:selected').val() show = selected != 0 ? true : false; $("#id_type").toggle(show); var options = { 'natural': ["V", "E", "P"], 'company': ["J", "G"], 'personal': ["V", "E"] }; // Empty the select first $('.id_type, #id_type').empty(); // Are there options available for this selection? if (options[selected]) { // Append each available option for (var i = 0; i &lt; options[selected].length; i++) { var opt = options[selected][i]; $('#id_type').append('&lt;option value="' +opt + '"&gt;'+opt+'&lt;/option&gt;'); } } }); working jsfiddle demo
type: Answer
accepted answer of: http://stackoverflow.com/q/25293085

http://stackoverflow.com/comment/39400272
comment on: http://stackoverflow.com/a/25283220
type: Comment
has text: Names are in alphabetic order, numbers are not in order: http://jsfiddle.net/xugnadz8/1/ (same code but different way of login so you can actually see what the array looks like).
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39395186
comment on: http://stackoverflow.com/a/25268679
type: Comment
has text: it's not resolve problem, then spaces inside text "Hello World!"
type: AnswerComment
score: 0

http://stackoverflow.com/q/25284778
has body: Suppose I have a text file that I want to convert into json file. Precisely, I want to convert each line $line to "$line":"someid" . Is there a proper way to do that using bash script langage or javascript. For example I want to convert text into json would output {{"I want to":"1"},{"convert","2"},{"text into":"3"},{"json":"4"}}
upvote count: 2
score: 0
downvote count: 2
accepted answer: http://stackoverflow.com/a/25285047
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: converting plain text into json
tagged with: bash
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25285047
favorite count: 0

http://stackoverflow.com/q/25350239
tagged with: javascript
tagged with: jquery
has body: I currently have the following form action in my view: "/attacks?attack_type=punch&amp;target_id=6&amp;target_name=Frieza+henchman&amp;target_type=NonPlayerCharacter" I want to render this in my Javascript as JSON so I can send it via websockets. I want it to look like this: var attacks = { attack_type: "punch" target_id: 6 target_name: "Frieza henchman" target_type: "NonPlayerCharacter" } Is there a gem which converts form actions into JSON ob
has comment: http://stackoverflow.com/comment/39524027
score: 0
has comment: http://stackoverflow.com/comment/39524618
has comment: http://stackoverflow.com/comment/39525422
has title: Is there a gem which converts form actions into JSON objects?
type: UnansweredQuestion
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/39523846
has comment: http://stackoverflow.com/comment/39524376
answer count: 0
has comment: http://stackoverflow.com/comment/39524003
tagged with: http://stackoverflow.com/tag/json
type: Question

http://stackoverflow.com/comment/39398939
score: 0
has text: Yes, Edmx. I had a property in a partial class file . But I don't see how I can get the value of my json string on my new 'parameter' field . Because as I said before, the "second form" is generated and the parameter field is the json string of all inputs of my generates inputs
comment on: http://stackoverflow.com/q/25281577
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39329133
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25244245
score: 0
has text: Isn't better to ask your question on [Math site on Stack Exchange network](http://www.math.stackexchange.com)?

http://stackoverflow.com/a/25318876
has comment: http://stackoverflow.com/comment/39499609
has comment: http://stackoverflow.com/comment/39499752
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39491631
score: 6
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25318743
has comment: http://stackoverflow.com/comment/39466840
answers question: http://stackoverflow.com/q/25318743
has body: render_to_response has an optional argument that you can use just for that, it's called context. It has to be a dictionary. render_to_response('maps.html', {'name': username}) You can use the value of username in your template with {{ name }}. Check the Django Tutorial for a sophisticated example project.
upvote count: 6

http://stackoverflow.com/a/25275429
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39386326
answers question: http://stackoverflow.com/q/25275364
type: Answer
score: 2
downvote count: 0
has body: Here you go: var str = 'pig latin is cool', strArr = []; str.split(' ').forEach(function (piece, index, arr) { piece = piece.slice(1) + piece[0] + 'ay'; strArr.push(piece); }); alert(strArr.join(' ')); Demo: http://jsfiddle.net/6fdx2mcs/
upvote count: 2
has comment: http://stackoverflow.com/comment/39386287
accepted answer of: http://stackoverflow.com/q/25275364

http://stackoverflow.com/q/25355882
tagged with: jquery
has comment: http://stackoverflow.com/comment/39534075
favorite count: 0
tagged with: ajax
tagged with: ruby
has comment: http://stackoverflow.com/comment/39533970
has body: I've spent almost my entire day trying to figure out how to solve this dilemma but unfortunately a majority of the solutions I've found are related to an outdated Rails version that still allowed "render" to be used in assets. Here's what I'm trying to do: My view finds each "Trip" entry and displays each as a thumbnail on the page. When the user clicks on each thumbnail, I would like the additional details (and also associations, each trip has a has_many: weeks) to be rendered in the Div below those thumbnails (replacing the previous content). I can't seem to get Ajax to work and after several hours of attempting finally learned that "render" can't be used in assets. I would sincerely appreciate any help and along with potential solutions if someone could provide a possible reference guide for Ajax with Rails 4 that would be fantastic because I can't seem to find one. Here's my code: View - index.html.erb <% Trip.find_each do |trip| %> <%= link_to image_tag("http://placehold.it/350x350", :border => 0), :class => 'thumbnail', :url=>'/trips/selected_trip/params', :remote => true %> <%= trip.name %> <% end %> Controller - trips.controller.rb class TripsController < ApplicationController before_filter :authenticate_user! after_action :verify_authorized def index @trips = Trip.all authorize Trip end def new @trip = Trip.new authorize Trip end def create @trip = Trip.new(trip_params) authorize Trip if @trip.save flash[:notice] = "New trip has been created." redirect_to @trip else #Fill me in end end def edit @trip = Trip.find(params[:id]) authorize Trip end def update @trip = Trip.find(params[:id]) authorize Trip @trip.update(trip_params) flash[:notice] = "Trip has been updated." redirect_to @trip end def show @trip = Trip.find(params[:id]) authorize Trip end def destroy @trip = Trip.find(params[:id]) authorize Trip @trip.destroy flash[:notice] = "Trip has been deleted." redirect_to trips_path end def selected_trip @trip = Trip.find(params[:id]) @trip.name respond_to do …
has answer: http://stackoverflow.com/a/25355976
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25355976
upvote count: 3
linked to: http://stackoverflow.com/q/8370399
has comment: http://stackoverflow.com/comment/39534270
type: Question
has comment: http://stackoverflow.com/comment/39534331
score: 3
tagged with: javascript
has comment: http://stackoverflow.com/comment/39533934
has title: Dynamically Change Div Content in Rails 4.1.4
has comment: http://stackoverflow.com/comment/39534055
tagged with: ruby-on-rails-4
has comment: http://stackoverflow.com/comment/39533957
linked to: http://stackoverflow.com/q/18843185
answer count: 1
downvote count: 0

codehighlighter
type: Tag
tag name: codehighlighter
tags question: http://stackoverflow.com/q/25231306

http://stackoverflow.com/comment/39368048
type: Comment
comment on: http://stackoverflow.com/q/25265557
has text: in your jsFiddle you have access.type = 'checkbox'; this code. You can add ID attribute and make it checked true or false based on Dropdown selection. like access.id='test';access.checked='true'; (HTH)
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39383380
type: QuestionComment
comment on: http://stackoverflow.com/q/25273879
score: 2
has text: You'll want to use something like PHP to grab the source for your first.
type: Comment

http://stackoverflow.com/comment/39375737
type: QuestionComment
has text: i guess there is no problem with the code may be the browser decorations are excluded in ie and taken in firefox
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25269334

http://stackoverflow.com/a/25319252
upvote count: 41
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47940754
has comment: http://stackoverflow.com/comment/63281401
type: Answer
score: 41
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25319193
has body: I think I got it. I just had to tell the render function to only operate on "display" types: { "data":"created_at", "name":"date", "visible":true, "title":"Date Created", "render": function(data, type, full, meta){ if(type == "display"){ var date = new Date(data); var options = {year: "numeric", month: "long", day: "numeric"}; return date.toLocaleDateString('en-US', options); } return data; } },
answers question: http://stackoverflow.com/q/25319193

http://stackoverflow.com/comment/39530426
type: AnswerComment
has text: Thank you! That is very helpful. However I still have a single list to select from. I'm trying to figure out how to use checkboxes instead.
score: 0
comment on: http://stackoverflow.com/a/25353914
type: Comment

http://stackoverflow.com/q/25374280
has comment: http://stackoverflow.com/comment/39569879
has answer: http://stackoverflow.com/a/25374334
answer count: 1
has body: Is there anyway to change properties of webkit through Javascript? For Example document.getElementById('playBar').style['webkitAnimationDuration'] = '50s'; document.getElementById('playBar').style.webkitAnimationDuration = '4s'; I've tried these codes but none seem work in changing the CSS Code once I run the javascript. Everything else in the code runs except for the webkit stuff in CSS, here's the code in CSS I'm trying to change. #playBar { width: 1px; height: 12px; background: white; float:left; -webkit-animation: mymove; /* Chrome, Safari, Opera */ -webkit-animation-duration: 40s; /* Chrome, Safari, Opera */ animation: mymove infinite; animation-duration: 0s; } /* Chrome, Safari, Opera */ @-webkit-keyframes mymove { from {width: 0%;} to {width: 100%;} } @keyframes mymove { from {width: 0%;} to {width: 100%;} }
favorite count: 0
has title: Controlling WebKit through Javascript?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
linked to: http://stackoverflow.com/q/25359439
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39569278
upvote count: 0
duplicate of: http://stackoverflow.com/q/25359439
tagged with: javascript
score: -1
tagged with: webkit

http://stackoverflow.com/comment/39359404
score: 0
type: Comment
has text: This causes the same result like `"thisismytextsample "`
comment on: http://stackoverflow.com/a/25261131
type: AnswerComment

http://stackoverflow.com/a/25278041
has body: add this to your css:- .ui-tabs-nav li:last-child { border-radius:4px 0px 0px 4px; } .ui-tabs-nav li:first-child { border-radius:0px 4px 4px 0px; } Demo
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39392647
type: Answer
accepted answer of: http://stackoverflow.com/q/25277945
has comment: http://stackoverflow.com/comment/39392321
answers question: http://stackoverflow.com/q/25277945
score: 1
has comment: http://stackoverflow.com/comment/39392250
upvote count: 1

http://stackoverflow.com/a/25304376
has body: I Got This var arr= [{ values: "Number of pips" }, { values: 4 }, { values: 4 }, { values: 4 }, { values: 5 }, { values: 2 }, { values: 6 }, { values: 6 }, { values: 5 }]; var uniqs = {}; for(var i = 0; i &lt; arr.length; i++) { uniqs[arr[i].values] = (uniqs[arr[i].values] || 0) + 1; } var max = { val: arr[0], count: 1 }; for(var u in uniqs) { if(max.count &lt; uniqs[u]) { max = { val: u, count: uniqs[u] }; } } alert(max.val); DEMO
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25304109
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25304109
has comment: http://stackoverflow.com/comment/39439694
type: Answer

http://stackoverflow.com/q/25382768
answer count: 3
has answer: http://stackoverflow.com/a/25382835
possible better answer: http://stackoverflow.com/a/25382878
has answer: http://stackoverflow.com/a/25382878
tagged with: ajax
has body: So I have this code to POST data with PHP and AJAX without redirecting page, I'm using the same script on the login page. The login page works like a charm but the other pages don't. The only diffeence between these is that login php script page uses if (empty($_POST) === false) {} and the other pages use if (isset($_POST['save-settings'])) {}. I don't know what do to.. Here below is the script I'm using. HTML BUTTON &lt;input id="save-settings" class="submit" type="submit" name="save-settings" value="Save" onclick="return false;" /&gt; JS SCRIPT $(document).ready(function() { $("#save-settings").click(function() { var name = $("#webname").val(); var charset = $("#webchar").val(); var meta = $("#webmeta").val(); var description = $("#webdesc").val(); var startsite = $("#webstartsite").val(); var starturl = $("#webstartsiteurl").val(); var footer = $("#webfooter").val(); $.post("../lib/action.php", { name: name, charset: charset, meta: meta, description: description, startsite: startsite, starturl: starturl, footer: footer }, function(data) { $("#gy-main-notification-bar").hide().html("&lt;h1&gt;!&lt;/h1&gt;&lt;h2&gt;" + data + "&lt;/h2&gt;").slideDown(500); setTimeout(function() { $("#gy-main-notification-bar").slideUp(500) }, 2500); }); }); }); PHP SCRIPT if(isset($_POST['save-settings'])) { $updatesettings = "UPDATE `settings` SET `name`='".escape($_POST['webname'])."', `charset`='".escape($_POST['webchar'])."', `meta`='".escape($_POST['webmeta'])."', `description`='".escape($_POST['webdesc'])."', `startsite`='".escape($_POST['webstartsite'])."', `starturl`='".escape($_POST['webstartsiteurl'])."', `footer`='".escape($_POST['webfooter'])."' WHERE `id`= 1"; if ($update_settings = $db_connect-&gt;query($updatesettings)) {} echo 'Success!'; } I don't really want to change the isset to empty in the script due the fact that I have all my "onclick" script in one action.php file. When I remove onclick="return:false;" from input it works.. I'm so confused I appriciate any …
has title: Sending form with PHP through AJAX with no page refresh
tagged with: mysqli
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39584493
type: Question
has answer: http://stackoverflow.com/a/25382987
accepted answer: http://stackoverflow.com/a/25382835
tagged with: javascript
score: 0

http://stackoverflow.com/q/25230357
linked to: http://stackoverflow.com/q/473562
has answer: http://stackoverflow.com/a/25230435
favorite count: 0
has title: Need a javascript the cheks the checkbox if it 'checked'
has answer: http://stackoverflow.com/a/25230419
type: UnansweredQuestion
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
duplicate of: http://stackoverflow.com/q/473562
upvote count: 1
type: Question
tagged with: javascript
score: -1
answer count: 2
has comment: http://stackoverflow.com/comment/39301259
has body: I have this: All I need is that when I check the checkbox apply a tag to the text. Sorry for my bad english

http://stackoverflow.com/comment/39500427
score: 1
comment on: http://stackoverflow.com/q/25336409
type: Comment
type: QuestionComment
has text: @LieRyan: I don't think it is desirable to load data from some "random" proxy when being on a HTTPS site. Think about man-in-the-middle attacks.

http://stackoverflow.com/a/25355081
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25354988
has body: You can generate CSS on server that will have links to both regular size and double-sized images in background-image property. This CSS can easily be different for every page by including it in &lt;style&gt; tag and referencing classes/ids that only exist on this page. This will deal with traffic issue, since majority of modern browsers don't load pictures for other DPIs. Other solution (though worse) will be not just set cookie, but load images with JavaScript. This will solve the initial first page issue, but slow down the page rendering a little.

http://stackoverflow.com/q/25265336
answer count: 1
downvote count: 0
favorite count: 0
has title: jQuery mobile - Splitting up pages to different files
has comment: http://stackoverflow.com/comment/39367673
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25303055
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39433411
accepted answer: http://stackoverflow.com/a/25303055
has comment: http://stackoverflow.com/comment/39434629
type: Question
has body: I am developing a web app based on jQuery and jQuery mobile. I want to show different pages, but since the corresponding html-markup might become quite large I would like to split up the html into different files, i.e.: Hello World What can I do to import my markup where it says <!-- import markup for page<x> -->? Is there any way to achieve that? I tried using but this messes the entire page up! Since the web app should be packed as a native app for smartphones later php is not an option.
has comment: http://stackoverflow.com/comment/39367188
has comment: http://stackoverflow.com/comment/39433591
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39367436
linked to: http://stackoverflow.com/q/25301621

http://stackoverflow.com/comment/129125876
has text: @Ruzihm spaces is the only thing it doesn't work with. If you know you are going from Java to JS then you just handle that one special case yourself.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25298843
type: Comment

http://stackoverflow.com/comment/39462367
type: Comment
has text: @runTarm just `| searchText`
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25316555

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/25334276
tags question: http://stackoverflow.com/q/25381907
tags question: http://stackoverflow.com/q/25277496
tags question: http://stackoverflow.com/q/25301085
tags question: http://stackoverflow.com/q/25253773
tags question: http://stackoverflow.com/q/25357455
tags question: http://stackoverflow.com/q/25275435
tags question: http://stackoverflow.com/q/25355882
tags question: http://stackoverflow.com/q/25375147
tags question: http://stackoverflow.com/q/25319017
tags question: http://stackoverflow.com/q/25246949
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/25348778

http://stackoverflow.com/comment/39378565
comment on: http://stackoverflow.com/q/25267916
has text: Much better, voting to reopen!
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25234269
has comment: http://stackoverflow.com/comment/39310667
tagged with: php
has comment: http://stackoverflow.com/comment/39310157
answer count: 0
score: 0
has body: Edit: I'll just use the attribute multiply, my problem is that is not supported in IE9 or earlier, but meh, that's the way it's going to be Thanks everyone I'm inserting data to a database, and for every entry I can have an unknown number of photos uploaded (maybe max 4) for that entry. My question is: When I select a file in this form I want to make another input file appear to upload another file &lt;form action="" method="post" enctype="multipart/form-data"&gt; &lt;input type="file" name="photos[]"&gt;&lt;br&gt; &lt;!-- ######## more data entries ######## --&gt; &lt;input type="submit" name="submit"&gt; &lt;/form&gt; I tried using jQuery like this: &lt;form action="" method="post" enctype="multipart/form-data"&gt; &lt;input type="file" name="fotos[]"&gt;&lt;br&gt; &lt;div id="placeholder"&gt;&lt;/div&gt; &lt;script&gt; $('input[type=file]').change(function(){ $('#placeholder').html('&lt;input type="file" name="fotos[]"&gt;&lt;br&gt;'); }); &lt;/script&gt; &lt;input type="submit" name="submit"&gt; &lt;/form&gt; but it only works for the first input Is there another way to do this? i know there is multiply='multiply' but I'm not sure if it's well supported Thanks in advance PS: I don't care much what language to use as I know a little about everything, just go slowly on me :)
tagged with: file
has comment: http://stackoverflow.com/comment/39309594
type: Question
has title: Closed - How can I create a new input file when the first input file has a file selected?
tagged with: upload
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39310207
type: UnansweredQuestion

http://stackoverflow.com/a/25291768
score: 1
has body: On img click change the src attribute of the img tag and using a counter would help more rather checking the previous image source. HTML : &lt;img src="http://www.clipartbest.com/cliparts/RiA/66K/RiA66KbMT.png" id="imgClickAndChange" onclick="changeImage()" usemap="#SUB15" /&gt; JS : var counter = 1; imgClickAndChange.onclick = function(){ if(counter == 0){ document.getElementById("imgClickAndChange").src = "http://www.clipartbest.com/cliparts/RiA/66K/RiA66KbMT.png"; counter++; } else if(counter == 1){ document.getElementById("imgClickAndChange").src = "http://www.wpclipart.com/education/animal_numbers/animal_number_2.png"; counter++; } else if(counter == 2){ document.getElementById("imgClickAndChange").src = "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Number_3_in_yellow_rounded_square.svg/512px-Number_3_in_yellow_rounded_square.svg.png"; counter = 0; } }; jsFiddle
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25291730
answers question: http://stackoverflow.com/q/25291730
type: Answer
upvote count: 2
downvote count: 1

http://stackoverflow.com/comment/39442182
score: 0
has text: You are doing *var middle = m.length - (1 / 2);* (look at the parenthesis). Division operator has precedence over minus operator.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25305640

http://stackoverflow.com/comment/39381823
comment on: http://stackoverflow.com/a/25273051
type: AnswerComment
score: 0
has text: I like this solution, it seems simple, however my problem is that in my real life example the content appears on a very dynamic page where those values would change from page to page unfortunately. i.e. sometimes it will be [20] and another might be [25].
type: Comment

http://stackoverflow.com/comment/39312004
comment on: http://stackoverflow.com/a/25235181
type: AnswerComment
score: 0
has text: "Could not complete your request. See error the below!" and the error says "OK"
type: Comment

http://stackoverflow.com/comment/39503088
comment on: http://stackoverflow.com/q/25337374
score: 0
type: Comment
has text: http://demos.jquerymobile.com/1.2.0/docs/pages/page-scripting.html
type: QuestionComment

http://stackoverflow.com/comment/39388249
type: Comment
has text: Expanding in the console after pausing with the debugger tells me that it's a `NodeList`, though: `[item: function] length: 0 __proto__: NodeList`. Or am I reading it wrong?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25276498

http://stackoverflow.com/q/25250261
type: Question
has comment: http://stackoverflow.com/comment/39351697
has title: jQM Fail to get height and width on initial load
tagged with: jquery-mobile
has comment: http://stackoverflow.com/comment/39353041
tagged with: javascript
score: 0
tagged with: jquery
type: UnansweredQuestion
has body: The jQM width() and height() return 0 with DIV ID. My CSS making the DIV BG red just to make sure the div have full 100% width and height. It does show red in full screen. I try to get height and width on "pagebeforeshow" page event, but return 0. If I navigate to another page and return to "userMainPage", the height and width will show correct number. Just initial load it will return 0. Please point out my error on why initial load give me 0 for width and height. Thank you. My HTML: Left Panel Welcome Right Panel Promotions Restaurants Slide 1 Here Slide 2 Here Slide 3 Here My JS: $(document).on('pagebeforeshow', '#userMainPage', function () { var height = $('#userMPContent').height(); var width = $('#userMPContent').width(); $('.swiper-container').css('width', width); $('.swiper-container').css('height', height); $('.swiper-slide').css('width', width); $('.swiper-slide').css('height', height); console.log('Height: ' + height); console.log('Width: ' + width); var mySwiper = $('.swiper-container').swiper({ //Your options here: mode: 'horizontal', autoResize: true, loop: false //etc.. }); }); and my CSS: #userMPContent { background-color: red; }
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/39342091

http://stackoverflow.com/q/25363854
has answer: http://stackoverflow.com/a/25368964
has answer: http://stackoverflow.com/a/25386655
type: Question
has title: Initial loading spinner for AngularJS
has body: I want to show a spinner on the first load of my application like: https://devart.withgoogle.com/ I've attempted to do this via the Services module like so: angular.module('InitialLoad', []) .config(function ($httpProvider) { $httpProvider.responseInterceptors.push('myHttpInterceptor'); var spinnerFunction = function (data, headersGetter) { $('#loading').fadeIn(); return data; }; $httpProvider.defaults.transformRequest.push(spinnerFunction); }) .factory('myHttpInterceptor', function ($q, $window) { return function (promise) { return promise.then(function (response) { $('#loading').fadeOut(function(){ $(this).remove(); }); return response; }, function (response) { $('#loading').fadeOut(function(){ $(this).remove(); }); return $q.reject(response); }); }; }); But there are a number of things wrong with this... first of which is that this doesn't listen for the first load it listens to EVERY request. It also doesn't show and hide the loading as elegant as the way it's been done on DevArt, and I'm using jQuery to hide and show the loading spinner instead of using Angular Animate. Can anyone help? To clarify this is for the INITIAL app load! And not for showing a spinner on subsequent requests. I use this for that: https://github.com/chieffancypants/angular-loading-bar but I want to show a splash for the app start up which is different.
tagged with: javascript
answer count: 2
linked to: http://stackoverflow.com/q/17838708
upvote count: 7
has comment: http://stackoverflow.com/comment/39548836
linked to: http://stackoverflow.com/q/16778140
has comment: http://stackoverflow.com/comment/39548624
has comment: http://stackoverflow.com/comment/39548926
possible better answer: http://stackoverflow.com/a/25368964
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25386655
type: AnsweredQuestion
downvote count: 0
score: 7

http://stackoverflow.com/q/25370128
type: Question
has answer: http://stackoverflow.com/a/25370245
has comment: http://stackoverflow.com/comment/39561322
answer count: 1
score: 0
has comment: http://stackoverflow.com/comment/39561751
accepted answer: http://stackoverflow.com/a/25370245
has comment: http://stackoverflow.com/comment/39561082
has comment: http://stackoverflow.com/comment/39561013
has body: I have a set of classes ranges used for classification of dataset. dataset: [ 0.44531, 0.79456, 1.47574, 4.53429] //the classes ranges min1 = 0.44531 max1 = 1.23355 min2 = 1.23355 max2 = 4.53429 If I use math.round() or .toFixed() to round the ranges some data will be thrown outside of the ranges of min1 and max2 Is there a way to round to two decimals and be sure that no data could be outside?
tagged with: javascript
has title: rounding to two decimals for classification
has comment: http://stackoverflow.com/comment/39561770
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39561566
has comment: http://stackoverflow.com/comment/39560983

http://stackoverflow.com/q/25244284
has answer: http://stackoverflow.com/a/25244610
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25244610
has body: Hi Guys the problem is simple but I can't resolve it - it happen only in FIREFOX here is code: $.ajax({ type: "POST", url: validUrl, data: serializedForm, beforeSend: function(x) { if(x &amp;&amp; x.overrideMimeType) { x.overrideMimeType(jsonMimeType); } }, dataType: "json", success: function(resp){ console.log(resp); var arr = jQuery.parseJSON(resp); } }); console.log give such answer: ["emailAddress.used", "register.confirmRulesError"] I have error in: var arr = jQuery.parseJSON(resp); Full error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data This happens only in FireFox and I can't find solution. Response header is: Content-Type application/json;charset=UTF-8 Any ideas how to solve this ?
score: 0
tagged with: firefox
answer count: 1
tagged with: jquery
has title: jQuery JSON SyntaxError: JSON.parse only on FIREFOX

http://stackoverflow.com/q/25382590
tagged with: javascript
score: 0
answer count: 3
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/39585398
possible better answer: http://stackoverflow.com/a/25382810
has answer: http://stackoverflow.com/a/25383155
has answer: http://stackoverflow.com/a/25382810
has answer: http://stackoverflow.com/a/25382663
tagged with: http://stackoverflow.com/tag/html
has body: Original fiddle example Failed example for dynamically created dialog I got this script to load AJAX content into a jQuery UI dialog whose class is named .open_dia in the fiddle examples. The problem is that I have the .open_dia dynamically loaded into the page in a (window).bind(“load”, function(){} event , so I want to know how to change this line from var $link = $(this).one('click', function(){.... to something to the effect of var $link = $('.area').one('click','.open_dia', function() { so that I can bind the event to the dynamically created element .open_dia to open the dialog. Any help would be appreciated. Here's the original code: $(document).ready(function() { var $loading = $(' '); $('.open_dia').each(function() { var $dialog = $(' ') .append($loading.clone()); var $link = $(this).one('click', function() { $dialog .load($link.attr('href') + ' #content') .dialog({ title: $link.attr('title'), width: 500, height: 300 }); $link.click(function() { $dialog.dialog('open'); return false; }); return false; }); }); }); Failed Code: $(document).ready(function(){ $('button').one('click',function(){ $(this).next('.area').append('Click'); }); var $loading = $(' '); $('.open_dia').each(function() { var $dialog = $(' ') .append($loading.clone()); var $link = $('.area').one('click','.open_dia', function() { $dialog .load($link.attr('href') + ' #content') .dialog({ title: $link.attr('title'), width: 500, height: 300 }); $link.click(function() { $dialog.dialog('open'); return false; }); return false; }); }); }); Example HTML: Append open_dia
has comment: http://stackoverflow.com/comment/39584085
type: AnsweredQuestion
has title: Bind a click event to a dynamically created Dialog in jQuery
type: Question
accepted answer: http://stackoverflow.com/a/25383155
tagged with: jquery-ui

http://stackoverflow.com/q/25302410
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25322731
accepted answer: http://stackoverflow.com/a/25322731
has body: I'm making a website which is responsive so I'm working with datatables since it is responsive I want to change the datatable appearance in different @media screens. What I want to do is when I'm in desktop version the table will be in a normal state and for tablet form I want it to be in FIXED COLUMNS and when in mobile version I want it to be like Responsive Table like so. What is best approach for this? Do I need to create multiple table or just use a script? Please let me know.
upvote count: 2
has title: How to dynamically change datatable using jquery?
answer count: 3
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25304262
favorite count: 0
has answer: http://stackoverflow.com/a/25306700
tagged with: datatable
score: 2
downvote count: 0
linked to: http://stackoverflow.com/q/13882559
possible better answer: http://stackoverflow.com/a/25304262

http://stackoverflow.com/q/25320512
type: AnsweredQuestion
has title: console.log printing statements in the wrong order for learnyounode node.js tutorial
has comment: http://stackoverflow.com/comment/39469978
score: 4
type: Question
has comment: http://stackoverflow.com/comment/39469782
answer count: 1
has comment: http://stackoverflow.com/comment/39469886
has comment: http://stackoverflow.com/comment/39469995
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25320778
favorite count: 0
has comment: http://stackoverflow.com/comment/39469756
has comment: http://stackoverflow.com/comment/39469725
has answer: http://stackoverflow.com/a/25320778
upvote count: 4
tagged with: node.js
downvote count: 0
has body: I'm making a GET request, storing the data, and then noting the response is over. I have one console.log statement for when I'm done receiving the data and another for when the program has finished. See below: var a = 1 var b = 10e9 http.get(process.argv[2], function(response){ response.pipe(bl()) response.on('end', function(){ console.log("Finished receiving data") }) }) while(a != b){ a++ } console.log("Program has finished") In this case, I would expect the order of the print statements to be Finished receiving data Program has finished because I would expect the end of the response to occur before the while loop terminates. However, regardless of whether that loop is 1 to 2 or 1 to 100000000000, I always get Program has finished Finished receiving data Why are the print statements happening in this order?
has comment: http://stackoverflow.com/comment/39469701
tagged with: http

jquery-selectors
tags question: http://stackoverflow.com/q/25252230
type: Tag
tags question: http://stackoverflow.com/q/25317207
tags question: http://stackoverflow.com/q/25272952
tags question: http://stackoverflow.com/q/25289373
tags question: http://stackoverflow.com/q/25315518
tags question: http://stackoverflow.com/q/25277125
tags question: http://stackoverflow.com/q/25270452
tags question: http://stackoverflow.com/q/25242955
tags question: http://stackoverflow.com/q/25375877
tag name: jquery-selectors
tags question: http://stackoverflow.com/q/25320091

http://stackoverflow.com/comment/39346698
type: Comment
has text: Why you need to remove the ? you may need to show it again when loading another credit code. in this case you will just add `no-js` class to html `$('html').addClass('no-js');` without the need to re-create spinner again
type: AnswerComment
comment on: http://stackoverflow.com/a/25253600
score: 0

http://stackoverflow.com/comment/40199818
comment on: http://stackoverflow.com/a/25715573
type: AnswerComment
has text: There's no evidence that anyone is using JSP pages here.
score: 0
type: Comment

http://stackoverflow.com/comment/39504760
comment on: http://stackoverflow.com/a/25336837
type: Comment
has text: Thanks but what's the difference between using a data attribute and using the id?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39391565
has text: I think 5MB is very low for a web app. You should store the $() result to avoid multiple query.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25278568
score: 0

http://stackoverflow.com/comment/39642179
comment on: http://stackoverflow.com/q/25347441
score: 0
type: Comment
type: QuestionComment
has text: How about https://docs.djangoproject.com/en/dev/topics/http/file-uploads/ ?

http://stackoverflow.com/comment/39531893
score: 0
comment on: http://stackoverflow.com/q/25354730
type: QuestionComment
type: Comment
has text: Looks like it jumpes up a line when it types the spaces, but the solution, hm...

http://stackoverflow.com/q/25358168
type: Question
has comment: http://stackoverflow.com/comment/39538169
has answer: http://stackoverflow.com/a/25358277
has title: OnChange event not triggered
tagged with: javascript
has comment: http://stackoverflow.com/comment/39538550
linked to: http://stackoverflow.com/q/18340100
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/3874885
has comment: http://stackoverflow.com/comment/39538080
has body: I was trying to achieve to convert to uppercase while user type by attaching the following function on key up. function ChangeCharCase(evt,obj,upper) { if(obj.value != obj.value.toUpperCase()) obj.value = obj.value.toUpperCase(); return true; } That seems to be working fine until I attach the on change event to the input text, and figured out , the on change event is not triggered at all on IE 11 and chrome . On Firefox, it seems to be okay. You can check the case here. http://jsfiddle.net/zt8oqaw5/4/ You would see , the onchange event will never be triggered on the first input text on the browsers mentioned above. Does anybody know why? How can I achieve the character case conversion properly ? I can't set the css here because I do want the value to be changed actually, not just for the display.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25358234
has comment: http://stackoverflow.com/comment/39538198
has comment: http://stackoverflow.com/comment/39538229
has comment: http://stackoverflow.com/comment/39538306
has comment: http://stackoverflow.com/comment/39538297

http://stackoverflow.com/comment/39429659
type: Comment
has text: I understand it's a mess....deadline tomorrow and I'm in a rush. Thanks...getting rid of the colon and pushing in the value for tempcounter worked
score: 0
comment on: http://stackoverflow.com/a/25298795
type: AnswerComment

http://stackoverflow.com/a/25381445
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39582629
answers question: http://stackoverflow.com/q/25381286
has comment: http://stackoverflow.com/comment/39582890
downvote count: 0
has body: That is because the &lt;button&gt; does not have an onclick handler on it, so it won't be triggered. Instead of document.getElementById('cancel-btn').click(); you can just do document.forms[0].reset(); which will also reset the form. Unless the button that is called cancel-btn actually has to submit the form in which case you need: document.forms[0].submit();
has comment: http://stackoverflow.com/comment/39582226

http://stackoverflow.com/comment/39388923
comment on: http://stackoverflow.com/q/25276820
has text: Please show us the relevant code snippets. Thank you.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25360137
has body: You are trying to call the API without asking the user to login first. Instead, remove the FB.api line in your code and replace it with the below: FB.login(function(){ FB.api('/me', 'get', {fields: 'last_name'}, function (response ) { console.log(response); }); }); Ideally, you should call the above login code when a "Login" button is pressed, e.g.: Login to Facebook (Remember to wrap the FB.login() function in the doLogin() function.)
type: Answer
has comment: http://stackoverflow.com/comment/39617269
answers question: http://stackoverflow.com/q/25359006
has comment: http://stackoverflow.com/comment/39617222
score: 0
has comment: http://stackoverflow.com/comment/39626168

http://stackoverflow.com/comment/39371426
comment on: http://stackoverflow.com/a/25253736
type: AnswerComment
score: 0
type: Comment
has text: I've updated a bit here real fast. Got the first few boxes tweaked right. http://jsfiddle.net/qv6wga6L/6/ Honestly a plugin, if one exists would be better, which is why I upvoted @cgatian's post below. You could get custom code to work, but a plugin most likely already figureed this out.

http://stackoverflow.com/q/25327447
has body: I am tying to get value from an image (not src value) which is being clicked. I have tried val() , text() and html() with no luck. What is the correct way to do that ? $("img[id*='silmex']").click(function(){ alert($(this).html()); }); &lt;img id="silmex" value="265" src="./x.png" \&gt; &lt;img id="silmex" value="845" src="./x.png" \&gt; &lt;img id="silmex" value="698" src="./x.png" \&gt;
has title: How to get the value from image tag?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25327518
has comment: http://stackoverflow.com/comment/39482657
downvote count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/25327532
has comment: http://stackoverflow.com/comment/39482577
has comment: http://stackoverflow.com/comment/39482576
type: Question
has comment: http://stackoverflow.com/comment/39482583
has answer: http://stackoverflow.com/a/25327518
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/39482734
answer count: 3
has answer: http://stackoverflow.com/a/25327487
has comment: http://stackoverflow.com/comment/39482676
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25327532
favorite count: 0

http://stackoverflow.com/comment/39527983
has text: What do you want in the .js file? Where is this file located? What does "enter code here" mean?
score: 1
comment on: http://stackoverflow.com/q/25352662
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39310043
score: 1
has text: _"`concat` is a prototype of `String`."_ - No it isn't, it's a method of the `String` prototype and as such is available to all `String` instances. `scrollY` is simply a property of the `window` object. (Note that `window` has a lowercase `w`.) It may help you to read [the MDN article "Working with objects"](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25234525

http://stackoverflow.com/a/25338044
accepted answer of: http://stackoverflow.com/q/25337794
answers question: http://stackoverflow.com/q/25337794
type: AcceptedAnswer
score: 0
has body: Your function currently applies on each .progressBar. I would have said that each progress bar would then have the value of the last item but from what you're saying it's not. That part needs more investigation. That being said, what you need is to store the pairs { progressBarId, value }. &lt;td&gt; &lt;div class="progressBar" id="progressBar${i}"&gt;&lt;/div&gt; &lt;input id="progressBar${i}_value" type="hidden" value="${goal.goal_progress_value}"/&gt; &lt;/td&gt; (${i} is obviously a counter) Then, before the closing &lt;/body&gt; tag you'll have something which will build your progress bar elements. It should retrieve the values of each progress bars and apply it to the corresponding DOM element. It might look like: $(document).ready(function() { $(".progressBar").each(function() { var value = $("#" + this.id + "_value").val(); $(this).progressbar({ value :value }); }); }); Keep in mind that JS code should be separated from HTML code.
type: Answer

http://stackoverflow.com/q/25247125
has answer: http://stackoverflow.com/a/25247231
accepted answer: http://stackoverflow.com/a/25247231
has title: Load javascript only for specific domain?
has comment: http://stackoverflow.com/comment/39333632
downvote count: 1
has body: I want the javascript loaded only on the domain that I specify, while if it is loaded by another domain, the page will be directed to the domain that I specify. for example, I have a page in domain mydomain.com with some javascript there, then someone copy that javascript from my page and load it in hisdomain.com. Because I have set the script to function only in the domain mydomain.com, so the script will not work in hisdomain.com. Besides, it would be better if hisdomain.com redirected to mydomain.com. I want to use this method to avoid theft and cloning scripts by people who are not responsible. Thank you!
has answer: http://stackoverflow.com/a/42053377
favorite count: 0
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39333667
has comment: http://stackoverflow.com/comment/39334235
possible better answer: http://stackoverflow.com/a/42053377
type: Question
upvote count: 2
linked to: http://stackoverflow.com/q/194397
answer count: 2
has comment: http://stackoverflow.com/comment/39333633
tagged with: javascript

http://stackoverflow.com/q/25370763
accepted answer: http://stackoverflow.com/a/25370826
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25370826
has comment: http://stackoverflow.com/comment/39562264
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39562344
score: 0
has title: window.innerWidth in JavaScript
answer count: 1
tagged with: resolution
has body: here's my code: Slider content var divPos = 50; var direction = "L"; function preparepage() { document.getElementById("slider").style.position = "absolute"; document.getElementById("slider").style.left = divPos + "px"; document.getElementById("slider").style.top = "50px"; animateDiv = setInterval(beginAnimate,50); } function beginAnimate () { if (direction == "L") { divPos+=50; if (divPos == 1300) { direction = "R"; } } else if (direction == "R"){ divPos-=50; if (divPos == 150) { direction = "L"; } } document.getElementById("slider").style.left = divPos + "px"; } window.onload = function () { setTimeout(preparepage,200); }; I want #slider to go from left to right and when it reaches certain point to go back. My code works fine, but I tried it this way: if (direction == "L") { divPos+=50; if (divPos == window.innerWidth - 300) { direction = "R"; } } and it goes left for ever. Why is that happening? What can I do to make it go back at certain point, no what what screen resolution is?

http://stackoverflow.com/q/25335203
favorite count: 0
has answer: http://stackoverflow.com/a/25335284
answer count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39498308
has answer: http://stackoverflow.com/a/25335349
upvote count: 6
has body: I have a question about how to perform an asynchronous task in a while-loop until some condition is met. This is more of a theoretical question but I can see how this could be an issue in some scenarios. I'll try demonstrate the problem at an example (I'm using JavaScript here, but you can use any language): I could have a device and I want to hold my application until that device has reached a specific state. If the method with which I can getrieve with state of the device is synchronouse, the code could look like this: // Hold until the desired state is reached var state = false; while (!state) { state = device.getStateSync(); } // [...] continue the program My question now is: How can I transform this code when all I get from the device is a asynchronous getState function? The code should work no matter how long the execution time of the call is and should keep in mind that I'm working on limited memory and stack size. // [...] This would call the async function in a loop and crash the program while (!state) { // [...] something device.getStateAsync(function(newState) { state = newState; }); // [...] something else } This one post that I found has a recursive solution (http://blog.victorquinn.com/javascript-promise-while-loop). While this is a nice solution, at some point it will run into stack-size problems, if the loop is called too often. Right now I have the gut feeling that there might be no solution. Do you know of any way to do this? Or do you know how to prove that there is no way to do it? Feel free to include more complex concepts like Threads, Promises or Futures. Please bear in mind, that this is a theoretical question and the example is for a situation where I have no way of changing the framework (or device) I am working with. Thanks for every response and idea! Pedro
has comment: http://stackoverflow.com/comment/39498212
score: 6
type: Question
tagged with: synchronous
tagged with: javascript
tagged with: theory
has answer: http://stackoverflow.com/a/25335358
has title: Asynchronous function in a while-loop
downvote count: 0
has answer: http://stackoverflow.com/a/42716924
has answer: http://stackoverflow.com/a/25335392
tagged with: asynchronous
tagged with: callback

http://stackoverflow.com/comment/39328369
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25244493
has text: Have you tried setting `#info-pop-title`'s z-index value to 2? Do you mean on-top of as in "covering up" or "appearing before"?

http://stackoverflow.com/q/25269511
has title: How do you apply a blurry background using CSS/SVG/Canvas/whatever else works when background is repeated?
linked to: http://stackoverflow.com/q/20039765
has comment: http://stackoverflow.com/comment/39375102
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25276032
tagged with: css
tagged with: http://stackoverflow.com/tag/svg
score: 1
has body: I'm trying to figure out how to add a transparent content element with a blurred background in HTML, CSS, JS, and whatever else necessary. The problem comes with compatibility, and with the fact that I'm using a repeated background. You see all kinds of ways of getting the effect below, where the foreground is blurred over a not-repeated image background. You can use a copy of the image with the blur photoshopped in. You can also do it in newer browsers using CSS Filters or SVG. The issue is, the only way I can find of getting this effect with a repeated background uses CSS features with compatibility issues, like CSS Filters or CSS Regions, which really aren't compatible with anything. SVG, depending on how you use it, can be buggy or reasonably compatible. I'm trying to get the effect below, with a repeated background behind the same transparent, blurred content element. How can I do this, while Not needing to have blurred versions of the background image (there are quite a few of them) Being able to repeat the background Expecting compatibility with just about all modern browsers, including IE back to at least IE8 Not needing to line up the content element with the repeated background (thought of that hack already, but it defeats the purpose and versatility of the repeated background) I can't help thinking there's something I missed. Thanks ahead of time.
upvote count: 1
has comment: http://stackoverflow.com/comment/39375039
type: Question
tagged with: javascript

http://stackoverflow.com/q/25279113
has comment: http://stackoverflow.com/comment/39392455
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25279515
type: UnansweredQuestion
tagged with: datepicker
linked to: http://stackoverflow.com/q/12218203
has body: I have a datepicker input like below that getting the date function onclick event, i want to prevent the user from entering old date, how to manage that? any modification that i can do ? or there are any other datepickers that do the job? &lt;input type="text" placeholder="mm/dd/yyyy" name="SelectedDate" id="SelectedDate" onclick="GetDate(this);"&gt; this is the calender im using here
has answer: http://stackoverflow.com/a/25279283
has comment: http://stackoverflow.com/comment/39392869
has comment: http://stackoverflow.com/comment/39392883
type: Question
has comment: http://stackoverflow.com/comment/39392738
has comment: http://stackoverflow.com/comment/39392805
has answer: http://stackoverflow.com/a/25279397
has title: Validate datepicker not to enter old date
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39401537
score: 0
type: Comment
has text: The only reference to the DoStuff Method is in the function declaration. The anonymous function seems to call it implicitly somehow. I assumed this was a basic javascript thing, but I'm beginning to suspect something more complicated is going on...
type: AnswerComment
comment on: http://stackoverflow.com/a/25283914

http://stackoverflow.com/q/25258025
upvote count: 1
possible better answer: http://stackoverflow.com/a/25258067
has comment: http://stackoverflow.com/comment/39355102
has body: I have a html code like this: What can I do when I click on a div with "tiltleclass" class the divs between this div till next div with "tiltleclass" class toggle? In my program this structure is in many pages so I can't get new classes to them. Is there a way in jquery to do this?
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25258110
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39354092
tagged with: css
favorite count: 0
has answer: http://stackoverflow.com/a/25258067
type: AnsweredQuestion
has title: how create a new div parent for some divs via jquery?
score: 1
has answer: http://stackoverflow.com/a/25258110

http://stackoverflow.com/comment/39593134
score: 0
type: AnswerComment
has text: @taseenb Agreed. Fixed it. I normally do it that way but I wanted to win the Answers race here.
type: Comment
comment on: http://stackoverflow.com/a/25386117

http://stackoverflow.com/a/25301058
has body: Usually, popups are blocked when they get opened asynchronously and NOT by a user action (such as button click). To walk around the popup blocker, i suggest using the following: html: &lt;input type="button" id="btn_tw" value="Share on Twitter" /&gt; js: document.getElementById('btn_tw').addEventListener('click', function(){ window.open('http://twitter.com/share?url='+ URL +'&amp;text='+ TEXT, 'sharer', 'toolbar=0,status=0,width=626,height=436'); }); (URL is the url you want to share, TEXT is the post caption) in this way, you use the feature manually, even without the twitter javascript sdk included. hope that helps, and bypasses the popup blocker.
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25300699
score: 1

http://stackoverflow.com/comment/39372856
comment on: http://stackoverflow.com/a/25268337
has text: Question is not tagged for jquery.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25286284
type: AnsweredQuestion
score: 1
has title: How do you request a named module with requirejs
upvote count: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25286908
answer count: 1
downvote count: 0
has body: I think I'm just missing something simple but I've been struggling with requirejs (v2.1.14). Say I have a module defined with a name (perhaps from the r.js optimizer): i.e. // mymodule.js define("modname", ['dep1', 'dep2', 'dep3'], function(){ ... }); If I try to require that module elsewhere it doesn't work. I've tried using require(['../path/to/file/mymodule'], function(mod){ // mod is undefined here. } which results in mod being undefined, and require(['modname'], function(mod){...} which errors looks for a file named modname.js in the current directory. As soon as I remove the module name part of the define statement from the output then it works fantastically. define(['dep1', 'dep2', 'dep3'], function(mod){ // mod is defined and good here } Am I missing some fundamental piece of requiring named modules??
favorite count: 0
tagged with: requirejs
has answer: http://stackoverflow.com/a/25286908

http://stackoverflow.com/q/25312753
has body: I have an array of objects. I am trying to find duplicated objects and then remove both instances of that object. Right now I am using this method: function checkForDups(data){ for(var i = 0; i &lt; data.length; i++){ for(var j = i+1; j &lt; data.length; j++){ if(data[j].number === data[i].number){ data.splice(j,1); data.splice(i,1); } } } return data; } I believe problem is that it only checks for duplicates that have an index that greater than the current position it is checking. This means objects that are "behind" it in the array are not checked for duplication. Currently I run the array through this function a few times to get the desired results. However, this is obviously extremely inefficient. How could I achieve my desired results more efficiently?
has answer: http://stackoverflow.com/a/25313035
tagged with: arrays
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39455283
answer count: 3
has title: How to remove both instances of duplicated objects in an array
has answer: http://stackoverflow.com/a/25315505
accepted answer: http://stackoverflow.com/a/25313035
upvote count: 2
possible better answer: http://stackoverflow.com/a/25313225
has answer: http://stackoverflow.com/a/25313225
tagged with: object
type: AnsweredQuestion
type: Question
score: 2

http://stackoverflow.com/comment/39426722
comment on: http://stackoverflow.com/a/25254435
type: Comment
has text: Ah, I went with a solution very similiar to this. It would've been nice to do this via CSS and a single div, but this definitely works. Thanks!
score: 0
type: AnswerComment

http://stackoverflow.com/q/25294225
has title: Firefox outline:none on input text is not working
score: 1
type: Question
tagged with: firefox
answer count: 1
tagged with: javascript
has body: outline:none works in Safari,Chrome, but not in Firefox html: &lt;input type='text'&gt; css: input:focus { outline: none; } I tried input, textarea {outline:none;} input:active, textarea:active {outline:none;} *:focus {outline:none;} and input:focus { outline: none !important;} But failed, see feedle: http://jsfiddle.net/kotapaulta/sfycojn3/ How could I remove blue border in input text in Firefox on focus (version 31.0)?
upvote count: 1
favorite count: 0
downvote count: 0
has answer: http://stackoverflow.com/a/25294295
accepted answer: http://stackoverflow.com/a/25294295
type: AnsweredQuestion

connection
tags question: http://stackoverflow.com/q/25235747
type: Tag
tag name: connection
tags question: http://stackoverflow.com/q/25342056

http://stackoverflow.com/comment/39421188
score: 0
comment on: http://stackoverflow.com/q/25294176
type: Comment
type: QuestionComment
has text: `Cells: ...` should be `Cells = ...`. You aren't setting the variable.

http://stackoverflow.com/q/25311720
tagged with: datepicker
has answer: http://stackoverflow.com/a/25311819
type: AnsweredQuestion
score: 3
has title: How to change buttonImage dynamically for single instance?
upvote count: 3
type: Question
tagged with: jquery-ui
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25311819
answer count: 1
favorite count: 0
has body: We are creating multiple instances of datepicker, when selecting particular date from one datepicker that time we need to change the buttonImage of that datepicker instance only not all. Please refer below code $('.FixedDates').datepicker({ showOn: "button", buttonImage: "images/HM-Cal-Icon.png", buttonImageOnly: true }); $('.AddDate').click(function () { $('.HMDatePicker').append('&lt;br&gt;&lt;input type="text" class="FixedDates"&gt;'); $('.FixedDates').datepicker({ showOn: "button", buttonImage: "images/HM-Cal-Icon.png", buttonImageOnly: true }); }); How to change the buttonImage of current datepicker instead of multiple instance of datepicker like $('.FixedDates').datepicker("option", "buttonImage", 'CalendarBlank.jpg'); above code will change the buttonImage for all instance of datepickers. i want to change the current instance of datepicker buttonImage which one actually clicked. Please find below fiddle link.. http://jsfiddle.net/KN4az/1/

http://stackoverflow.com/comment/39513926
type: QuestionComment
has text: I suppose, perhaps doing all the population and then appending once is much lighter weight then updating multiple fields separately that already exist.
comment on: http://stackoverflow.com/q/25344509
score: 0
type: Comment

http://stackoverflow.com/q/25283084
tagged with: image
has comment: http://stackoverflow.com/comment/39399737
answer count: 2
has body: The website I am working on is for taking football bookings, but I have a section on the website that features upcoming fixtures, and to cut out somebody having to change the code after every game I wanted to implement a fixture image that automatically changes depending on the date I.E so that it changes itself after the date of the match. I have played around and I cannot see what I am missing... here is what I did: http://jsfiddle.net/gLffJ/180/ I expect this to be stoke. &lt;img id="fix1" src="http://www.ausdenclarkbookings.co.uk/image/chels.png" alt="Fixture1" width="75%" onload="fix1(this)" /&gt; function fix1(img) { if (img.src.indexOf('default')==-1) return; // already changed var d = new Date(); var Today = d.getDate(); var Month = d.getMonth(); if ((Month === 8 &amp;&amp; Today &gt;= 1) || (Month === 9 &amp;&amp; Today &lt;= 13)) { "http://www.ausdenclarkbookings.co.uk/image/stokefix.png"; } else if ((Month === 9 &amp;&amp; Today &gt;= 14) || (Month === 9 &amp;&amp; Today &lt;= 27)) { "http://www.ausdenclarkbookings.co.uk/image/cpalfix.png"; } else if ((Month === 9 &amp;&amp; Today &gt;= 28) || (Month === 10 &amp;&amp; Today &lt;= 18)) { "http://www.ausdenclarkbookings.co.uk/image/newc.png"; } alert(src); img.src=src; } Any help would be much appreciated! Thanks
downvote count: 0
has comment: http://stackoverflow.com/comment/39399915
favorite count: 0
has answer: http://stackoverflow.com/a/25283359
has comment: http://stackoverflow.com/comment/39399819
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39399779
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39400089
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/25283359
type: Question
possible better answer: http://stackoverflow.com/a/25283511
tagged with: jsfiddle
has answer: http://stackoverflow.com/a/25283511
has title: Attempting to automatically have an image change depending on the date
tagged with: javascript

http://stackoverflow.com/comment/39340131
comment on: http://stackoverflow.com/a/25249417
type: AnswerComment
score: 0
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/59122/discussion-between-astrocb-and-user1471980).
type: Comment

http://stackoverflow.com/q/25353109
has body: When I'm getting a message from popup I want to execute a script, simply: chrome.runtime.onMessage.addListener(function(message, sender, response) { chrome.tabs.executeScript({file: "content.js"}); }); My problem: content.js needs the data from message. How do I pass it?
linked to: http://stackoverflow.com/q/17567624
tagged with: google-chrome-extension
duplicate of: http://stackoverflow.com/q/17567624
type: Question
score: 0
has title: How do I pass parameter to a `chrome.tabs.executeScript` in a chrome extension?
answer count: 1
has answer: http://stackoverflow.com/a/25353321
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/39434080
has text: Every time you do something clear your browser cache
comment on: http://stackoverflow.com/a/25300157
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/q/25283964
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25284504
has title: JavaScript CSS - Menu
has comment: http://stackoverflow.com/comment/39401706
answer count: 2
has body: Hello I need help with my menu if it shows more than 10 on dropdown menu in my exaple below.I want that when I click on ... button (see in example) show the other six languages. I am not good at javascript. Here is the example of the menu where ... is I want on click to show the other Language. HTML code Language Arabic Brazilian Dutch English French German Greek Indonesian Malay ... Romanian Spanish Swedish Thai Turkish Vietnamese Example url with css http://jsfiddle.net/6pxaE/10/ Or with javascript example and all menu show the example that's I want to be the ... http://myseacheck.besaba.com/ScrollDown.htm
favorite count: 0
score: -1
has comment: http://stackoverflow.com/comment/39401699
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39402115
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25284243
upvote count: 1
type: Question

http://stackoverflow.com/comment/39573613
has text: @Radwan `return variable`?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25376679

http://stackoverflow.com/comment/39449006
type: Comment
type: QuestionComment
has text: What does your `Map<String , Map<String , String>> states` contain? Could you be more explicit( maybe show us possible values for this map) and what values you expect to be in your states combo box as auto populated based on selected country?
comment on: http://stackoverflow.com/q/25303420
score: 0

http://stackoverflow.com/comment/39378144
type: QuestionComment
type: Comment
has text: @Mathew Take a look at my answer
comment on: http://stackoverflow.com/q/25256187
score: 0

http://stackoverflow.com/comment/39494364
type: QuestionComment
comment on: http://stackoverflow.com/q/25333287
score: 1
has text: Note #1 `$("#container").scrollTop()` (you're missing the parenthesis)
type: Comment

http://stackoverflow.com/q/25310265
has comment: http://stackoverflow.com/comment/39450581
has title: Changing JQuery function into AngularJS
has comment: http://stackoverflow.com/comment/39450442
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/39452492
accepted answer: http://stackoverflow.com/a/25310631
has comment: http://stackoverflow.com/comment/39450347
possible better answer: http://stackoverflow.com/a/25314684
has answer: http://stackoverflow.com/a/25314684
type: AnsweredQuestion
score: 2
downvote count: 0
tagged with: javascript
has body: I am changing a user list/table I made with Razor and JQuery into AngularJS. One of the features of this table was the ability to show/hide additional user details. The table had two sets of tr with the second one being display:none but would slide down/be visible when its above tr was clicked to show details. Example (Original) Working Example I tried to apply the code onto my AngularJS but it does not seem to work for some reason (no errors either) Original Code (skeleton) @Html.DisplayFor(modelItem => item.name) @Html.DisplayFor(modelItem => item.email) // ect... @Html.DisplayFor(other stuff) New AngularJS Code {{actors.name}} {{actors.email}} // ect... {{actors.otherThings}} JQuery (Original had td[colspan=12] instead of td[colspan=6]) CSS /* Removes padding from interactive rows */ .table > tbody > tr > td.nopadding { padding: 0px; } I am still new to AngularJS so maybe I am missing something simple, but I just want to be able to expand show/hide the additional tr. Not sure why it does not work for my Angular code. AngularJS var app = angular.module("app", ['ngRoute', 'ngResource']); app.config(function ($routeProvider) { $routeProvider .when('/', { templateUrl: '/pages/home.html', controller: 'HomeController' }) .when('/home', { templateUrl: '/pages/home.html', controller: 'HomeController' }) .when('/unknown', { templateUrl: '/pages/unknown.html', controller: 'UnknownController' }) .otherwise({ templateUrl: '/pages/home.html', controller: 'HomeController' }); }); app.factory('userService', function ($http) { var userService = {}; userService.getUsers = function () { return $http({ url: '/API/APITest', method: "GET" }) } return userService; }); app.controller('HomeController', function ($scope, userService, $resource, $http) { $scope.orderByField = 'name'; $scope.reverseSort = false; $scope.ordering = "(ascending)"; $scope.orderByFieldFunction = function (value) { $scope.reverseSort = !$scope.reverseSort; $scope.orderByField = value; if ($scope.reverseSort === …
tagged with: jquery
linked to: http://stackoverflow.com/q/14994391
favorite count: 0
has answer: http://stackoverflow.com/a/25310631
tagged with: angularjs
type: Question
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25343885
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/39513076
has title: Angular $location.path() and URL parameters
has body: I'm struggling with Angular $location service... I am trying to redirect a user to this URL : "/test/0/0", and my route.js is configured with : $routeProvider .when ('/test/:param1/:param2',{ // Behavior here }) When I simply do $location.path('/test/0/0'); Angular seems not understand this path and can't associate it with the one I configured in the routes. I have read about the $location service : I have tried $location.search(), .url(), but none of them works. Any ideas would be welcome!
type: Question
answer count: 2
tagged with: location
has answer: http://stackoverflow.com/a/25344439
tagged with: javascript
tagged with: angularjs
tagged with: path
has answer: http://stackoverflow.com/a/25345720

http://stackoverflow.com/comment/39593684
type: QuestionComment
comment on: http://stackoverflow.com/q/25387405
has text: This is wrong if you're trying to select something by its ID. `.not("." + id)` It should then be: `.not("#" + id)`. Also, IDs should be unique.
score: 0
type: Comment

http://stackoverflow.com/a/25347650
type: Answer
has comment: http://stackoverflow.com/comment/39519226
answers question: http://stackoverflow.com/q/25347578
score: 0
has body: You don't need jQuery for that. Just set the width and height property of your image to the values you want it to be: &lt;img src="myimage.jpg" id="varimage" width="100" height="200"&gt; .... var img = getElementById("varimage"); img.height = 400; img.width = 200; and jQuery (as that's what you asked for): $("#varimage").width(400); $("#varimage").height(200);

http://stackoverflow.com/comment/39537620
type: Comment
comment on: http://stackoverflow.com/q/25357876
has text: I've checked your fiddle the problem is you are getting this error.. `Uncaught SyntaxError: Unexpected token ILLEGAL` Get rid of that...
score: 0
type: QuestionComment

http://stackoverflow.com/q/25262738
tagged with: http://stackoverflow.com/tag/html
has title: Show HTML instead of browser alert
has body: I've got the following script for a game: $(function() { $("#sortable").sortable({ opacity: 0.6, cursor: 'move', update: function() { var winningString = "g01,g02,g03,g04,g05,g06,g07,g08,g09,g010,g011,g012,g013,g014,g015,g016"; var currentString = ''; $('#sortable li').each(function() { var imageId = $(this).attr("id"); currentString += imageId.replace("recordArr_", "") + ","; }); currentString = currentString.substr(0, (currentString.length) - 1); if (currentString == winningString) { alert("Congratulations! You have completed the challenge."); } console.log(currentString); } }); }); Now what I'd like to do is to show HTML message instead of the browser alert. But I can't figure how to change it with the alert part of the script, at least without getting an error. ... adding $( "#message2" ).dialog(); gave TypeError...dialog is not a function The HTML message: Congratulations! You have completed the challenge. Have the following scripts in my : jquery.ui.core.js jquery.ui.widget.js jquery.ui.mouse.js jquery.ui.sortable.js Appreciate any help.
has answer: http://stackoverflow.com/a/25263163
type: AnsweredQuestion
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/25262802
type: Question
has answer: http://stackoverflow.com/a/25263812
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25262802
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/25263812

http://stackoverflow.com/comment/39522884
comment on: http://stackoverflow.com/q/25349205
score: 0
type: Comment
type: QuestionComment
has text: Thanks Regent! Worked perfectly!

http://stackoverflow.com/comment/39548988
comment on: http://stackoverflow.com/a/25364046
score: 0
type: Comment
has text: I'm coding like this because I need this to work for other elements with, of course, differing IDs. The common structure is that the select element is in a div that is location directly below the input div.
type: AnswerComment

http://stackoverflow.com/comment/39459113
type: QuestionComment
score: 1
has text: `Reference $ is not defined` means it can't find jQuery at the time of execution. Is that your only error?
comment on: http://stackoverflow.com/q/25314440
type: Comment

http://stackoverflow.com/comment/39540139
has text: I have added this after the FB.init function
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25359006

http://stackoverflow.com/a/25289371
has body: Yes. jQuery's load() method has a complete callback function as a parameter: .load( url [, data ] [, complete ] ) complete A callback function that is executed when the request completes. Thanks to this we can create a recursive function which calls itself once complete (or in this case, after 5 seconds): function loadContent(selector, path) { $(selector).load(path, function() { setTimeout( loadContent(selector, path), 5000 ); }); } loadContent('#div-id', '/something.php'); What I've done here is move your content loading logic into a new function called loadContent, which accepts a selector and a path as its parameters. This function then triggers load() on the passed in selector, loading the passed in path. When the content has loaded a setTimeout function kicks in to trigger our loadContent function once again after 5000 millisecond (5 seconds). Triggering loadContent() to begin with will fire our function off immediately, meaning you will not have to wait 5 seconds before the content first loads.
downvote count: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25289314
score: 3
answers question: http://stackoverflow.com/q/25289314
upvote count: 3

http://stackoverflow.com/comment/39473214
has text: Thanks @Satpal you are right! Could you please write it as a answer?
comment on: http://stackoverflow.com/q/25322389
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25243840
has comment: http://stackoverflow.com/comment/39328392
type: Answer
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/39327761
has body: The addClass and removeClass functions require strings, to know what classes you are talking about. A string is declared by putting quotes around the text. Because those are missing, it now thinks those are variables, which they aren't. Added to that, you were missing a dot before removeClass. Try this: $(this).children('span').removeClass("glyphicon glyphicon-plus glyph-plus-toggle").addClass("glyphicon glyphicon-minus glyph-minus-toggle"); Edit: I changed it, and it works: See the fiddle The problem was your use of .children(). I changed it with .find(). Taken from this page: The .children() method differs from .find() in that .children() only travels a single level down the DOM tree while .find() can traverse down multiple levels to select descendant elements (grandchildren, etc.) as well. Since the elements you were looking for aren't direct children, they didn't get selected.
has comment: http://stackoverflow.com/comment/39327282
answers question: http://stackoverflow.com/q/25243792
accepted answer of: http://stackoverflow.com/q/25243792
type: AcceptedAnswer
score: 4
has comment: http://stackoverflow.com/comment/39328049
has comment: http://stackoverflow.com/comment/39327943

http://stackoverflow.com/comment/41147994
type: QuestionComment
has text: You need to tell us what library you use for the pop-up.
score: 1
type: Comment
comment on: http://stackoverflow.com/q/25286016

http://stackoverflow.com/a/25242385
answers question: http://stackoverflow.com/q/25242221
score: 0
has body: You don't need the class either. Please check this fiddle. - http://jsfiddle.net/Lu7dn1yg/ HTML JS function swipe(imgelem) { var src = imgelem.src; window.open(src); }
type: Answer

http://stackoverflow.com/q/25288971
type: AnsweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25289424
has comment: http://stackoverflow.com/comment/39410768
has body: I need to download externally, once user clicks on the pdf link. it has to be downloaded automatically, it should not show in the new window. Below is my code function SaveToDisk_1(fileURL) { if (!window.ActiveXObject) { //alert("hi"); var save = document.createElement('a'); save.href = fileURL; save.target = '_blank'; save.download = fileURL; var evt = document.createEvent('MouseEvents'); evt.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 0, null); save.dispatchEvent(evt); alert('test') (window.URL || window.webkitURL).revokeObjectURL(save.href); } } Save this page Please help me to resolve the issue, when i remove the "alert" i m not able to download the file in Mozila.
score: 0
accepted answer: http://stackoverflow.com/a/25289424
answer count: 1
has comment: http://stackoverflow.com/comment/39411276
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39412080
has title: Download all the external links such as ( pdf/images) has to be downloaded automatically

http://stackoverflow.com/comment/39329211
type: Comment
has text: I thought that data() would take all data-attributes and put them into an object? http://api.jquery.com/data/
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25244619

http://stackoverflow.com/comment/39497908
type: QuestionComment
type: Comment
has text: Is this *Google Pro*?
score: 0
comment on: http://stackoverflow.com/q/25335229

http://stackoverflow.com/a/25237124
has comment: http://stackoverflow.com/comment/39315043
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25237080
type: Answer
answers question: http://stackoverflow.com/q/25237080
upvote count: 4
downvote count: 0
has body: Remove the preceded + from alert and try, alert(actualadddate + 'aaaaaaaaa'); Live working demo Note that, in your example you are using .date class to access the attribute if your page has more than 1 element having same class then it will not give you the accurate date. So, be carefull in that case or use unique id to get the attribute.
score: 4

http://stackoverflow.com/comment/39667997
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25366688
type: Comment

http://stackoverflow.com/comment/39414756
comment on: http://stackoverflow.com/q/25288307
score: 0
has text: @Artjom: Good catch - the I changed the "got here" to "time before" and "and here" to "time after. I'll make the appropriate edits...
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25332200
has body: I have an array items like so: items.sort(function(a,b) { }); a &amp; b have the following properties: a.suggested (true, false, undefined) a.meta.member_count (int .. 1 or more, undefined. I would like to sort items as follows: all items that are not suggested. Either false or undefined member_count, highest # first, Then show any suggested === true Is sort the right way to go about this? How can I make this happen in the sort function?
answer count: 1
type: UnansweredQuestion
downvote count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/25333457
has title: How to .sort based on multiple conditions
score: -1
type: Question
tagged with: javascript
tagged with: sorting
favorite count: 0

http://stackoverflow.com/q/25377611
has body: I have plotted svg rectangles in the following manner and I am trying to add a click event to it in the following way.But, the code is not working. Where am I going wrong? var enterElements = svgContainer.selectAll("rect") .data(series).enter().append("rect") .attr("x", function(d, i){ return xPosLoop[i]; }) .attr("height", function(d,i){ return elementHeight[i]; }) .attr("y", function(d, i){ return yPosLoop[i]; }) .attr("width", function(d,i){ return elementWidth[i]; }) .attr("rx", 7) .attr("fill", function(d, i){ return color[i]; }) .addEventListener('click', rect_click) .attr("stroke", "#006ec5") .attr("stroke-width", 1); function rect_click(event) { console.log('I was clicked'); }
has answer: http://stackoverflow.com/a/25378037
accepted answer: http://stackoverflow.com/a/25378037
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
type: Question
tagged with: addeventlistener
has title: SVG rectangle click eventlistener
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/25359697
type: Question
has title: How to add object property in map
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has body: I tried to add property in map loop But it seems I updated on a copy not the object itself. MY_ARRAY.map(function(d){ d.size = DO_SEOMTHING });
has comment: http://stackoverflow.com/comment/39540899
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25359705
has answer: http://stackoverflow.com/a/25359742

http://stackoverflow.com/q/25331316
answer count: 1
linked to: http://stackoverflow.com/q/14560999
tagged with: angularjs
type: UnansweredQuestion
tagged with: haversine
tagged with: coordinates
type: Question
tagged with: object
has title: Haversine formula not working correctly
tagged with: javascript
has answer: http://stackoverflow.com/a/25338151
has body: This is my code for the Haversine formula based off of this and the answer of this question: $scope.getCoordDistance = function (myLat, myLon, locLat, locLon) { var lat2 = 41.894993; var lon2 = -88.459239; var lat1 = $scope.locLat; var lon1 = $scope.locLon; var R = 3959; var x1 = lat1 - lat2; var dLat = x1 * Math.PI / 180; var x2 = lon1 - lon2; var dLon = x2 * Math.PI / 180; var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * Math.sin(dLon / 2) * Math.sin(dLon / 2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); d = R * c; return d; } I tested this with 3 different locations an they are all way off, the first location says its 14790.7 miles away when it is actually 44.1 miles away, every location is off by a different amount. Some are off by a small amount, others a very large amount. Is something wrong with my math here? If not, why wont this code work correctly? Here is a link to a plunk with my full project: http://plnkr.co/edit/nRQc7Ym0lsaK6jQwd626?p=preview Thanks in advanced for any help!!!
score: 0

http://stackoverflow.com/q/25320796
tagged with: jquery
has body: I have this a href tag that was place inside a p tag. There are 2 a hred inside the p tag. I want to change the position of the other one. Like placing it below the id=nav. I want to do this using jquery because it cant be done manually on wordpress login. I am customizing my wordpress login page. Register | Forgot Password Is it possible to remove the other a href tag and place it somewhere else via jquery?
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has answer: http://stackoverflow.com/a/25320874
upvote count: 0
has comment: http://stackoverflow.com/comment/39470307
type: UnansweredQuestion
tagged with: wordpress
type: Question
has comment: http://stackoverflow.com/comment/39470341
has comment: http://stackoverflow.com/comment/39470290
score: -1
has title: Position a tag using jquery
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39470413

w3c
type: Tag
tag name: w3c
tags question: http://stackoverflow.com/q/25377755

http://stackoverflow.com/a/25348427
answers question: http://stackoverflow.com/q/25348385
has comment: http://stackoverflow.com/comment/39524411
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39527807
upvote count: 2
type: Answer
has body: Have you tried this approach: $('option').each(function() { var text = $(this).text(); $(this).after(text); $(this).remove(); }); I can't test it right now but it should do the job. Let me know how it goes. OR You can try this way: $('option').html(function(index, html) return html.replace(/&lt;option[^&gt;]*&gt;([^&lt;]+)&lt;\/option&gt;/g, "$1"); }); Good luck!
accepted answer of: http://stackoverflow.com/q/25348385
score: 2

http://stackoverflow.com/a/26116165
downvote count: 0
has body: You added onChange in a wrong place. it should be not in schema but in form. check this one http://plnkr.co/edit/h02XKqF3Vc6eefTOEN8m?p=preview $scope.form = [ "name", "student", { key: "email", onChange: function(modelValue, form) { console.log("email changed"); console.debug(modelValue); console.debug(form); } }, "title", { type: "submit", title: "Save" } ]; Though for email field event is not triggered until you enter valid value. not sure if it should work like that. You're also missing angular-schema-form tag because this question is related to that particular library. BR
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25336417

http://stackoverflow.com/comment/39513860
has text: Um.. with your updated question *and in the future* -- that just ain't gunna happen. If you limit yourself to a handful of restricted property names, you could play games with creating an subscriber/publisher pattern and then use the ES5 getters/setters to push changes out -- but dang. No.
type: Comment
comment on: http://stackoverflow.com/q/25344430
type: QuestionComment
score: 0

http://stackoverflow.com/a/26222847
score: 1
upvote count: 1
downvote count: 0
has body: Adding https://atmospherejs.com/meteorhacks/fast-render 'magically' solves this. However, please read the note on necessary security measures: https://meteorhacks.com/fast-render/security-measures/
answers question: http://stackoverflow.com/q/25338169
type: Answer
has comment: http://stackoverflow.com/comment/41189646

http://stackoverflow.com/comment/39513743
type: Comment
has text: I see, just to note that the String object itself is a typeof and instance of Function: String instanceof Function. But a string literal such as "string" is not. Hence, we can actually call method too on String: String.method and it will work.
type: AnswerComment
comment on: http://stackoverflow.com/a/25344225
score: 0

http://stackoverflow.com/q/25352308
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39527411
type: UnansweredQuestion
has title: setTimeout js function working only once
has comment: http://stackoverflow.com/comment/39527348
has body: The setTimeout() function runs only once. It is supposed to refresh every 100ms. but the youtube tutorial uses setTimeout. why is it not working in mine? is it not possible to use setTimeout for this application Stop Watch Click to start Timer Start Reset
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39527401
upvote count: 0
tagged with: javascript
score: -1
linked to: http://stackoverflow.com/q/25350521
has answer: http://stackoverflow.com/a/25352363
duplicate of: http://stackoverflow.com/q/25350521

http://stackoverflow.com/a/25361080
has body: you can use onclick event of JS with locatio.href like this &lt;div onclick="location.href='php_files/category_template.php?x=&lt;?php echo $link[$j];?&gt;';"&gt; &lt;?php echo $title[$j];?&gt; &lt;/div&gt;
accepted answer of: http://stackoverflow.com/q/25361035
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25361035

google-chrome-extension
tags question: http://stackoverflow.com/q/25254205
tags question: http://stackoverflow.com/q/25303616
tags question: http://stackoverflow.com/q/25297296
tags question: http://stackoverflow.com/q/25321163
tags question: http://stackoverflow.com/q/25302477
tags question: http://stackoverflow.com/q/25365190
tags question: http://stackoverflow.com/q/25357582
tag name: google-chrome-extension
tags question: http://stackoverflow.com/q/25231516
tags question: http://stackoverflow.com/q/25304920
tags question: http://stackoverflow.com/q/25311384
tags question: http://stackoverflow.com/q/25370377
tags question: http://stackoverflow.com/q/25333765
tags question: http://stackoverflow.com/q/25297923
tags question: http://stackoverflow.com/q/25353109
tags question: http://stackoverflow.com/q/25372515
tags question: http://stackoverflow.com/q/25271967
tags question: http://stackoverflow.com/q/25324643
tags question: http://stackoverflow.com/q/25287453
tags question: http://stackoverflow.com/q/25261592
tags question: http://stackoverflow.com/q/25279253
tags question: http://stackoverflow.com/q/25376022
type: Tag
tags question: http://stackoverflow.com/q/25324839
tags question: http://stackoverflow.com/q/25258328
tags question: http://stackoverflow.com/q/25375085
tags question: http://stackoverflow.com/q/25269703
tags question: http://stackoverflow.com/q/25356271
tags question: http://stackoverflow.com/q/25343013
tags question: http://stackoverflow.com/q/25232324
tags question: http://stackoverflow.com/q/25268020
tags question: http://stackoverflow.com/q/25319656
tags question: http://stackoverflow.com/q/25385863
tags question: http://stackoverflow.com/q/25276509
tags question: http://stackoverflow.com/q/25337644
tags question: http://stackoverflow.com/q/25234414
tags question: http://stackoverflow.com/q/25347198
tags question: http://stackoverflow.com/q/25373763
tags question: http://stackoverflow.com/q/25385320
tags question: http://stackoverflow.com/q/25253883
tags question: http://stackoverflow.com/q/25353186
tags question: http://stackoverflow.com/q/25268936
tags question: http://stackoverflow.com/q/25231400
tags question: http://stackoverflow.com/q/25303039
tags question: http://stackoverflow.com/q/25328972
tags question: http://stackoverflow.com/q/25264327
tags question: http://stackoverflow.com/q/25252367
tags question: http://stackoverflow.com/q/25324526
tags question: http://stackoverflow.com/q/25336142
tags question: http://stackoverflow.com/q/25335478
tags question: http://stackoverflow.com/q/25362783
tags question: http://stackoverflow.com/q/25354649

http://stackoverflow.com/comment/39420467
has text: What do you need to do once you find it?
score: 3
comment on: http://stackoverflow.com/q/25294100
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25360904
has answer: http://stackoverflow.com/a/25361362
tagged with: php
has body: I'm trying to update the user votes into database. This below ajax codes returns correct rating datas. But, I'm unable to get the alert data on another page. In my car_user_rating.php page I have tried this echo $post_rating = $_POST['performance_rating'];. But it doesn't get the performance_rating data value. I have checked my console. It returns the rating values (4). I'm confused why it doesn't get the data value? ajax request $(function () { $('#form').on('submit', function (e) { performance_rating = $('input:radio[name=rating]:checked').val(); e.preventDefault(); $.ajax({ type: 'POST', url: "&lt;?=CAR_USER_RATINGS?&gt;", data: { performance_rating: performance_rating }, success : function(data){ alert(performance_rating) }, }); }); });
answer count: 4
has title: unable to get the data value of ajax on another page
score: 1
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
upvote count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25361024
has answer: http://stackoverflow.com/a/25361064
has answer: http://stackoverflow.com/a/25360978

http://stackoverflow.com/comment/41546806
comment on: http://stackoverflow.com/q/25332482
has text: I am on Windows with mSysGit. Is there any other way? I put the `grunt` tasks into a separate `grunt/` folder, as suggested by `load-grunt-config`. No subfolders, just the `grunt/` folder.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25367445
has answer: http://stackoverflow.com/a/25369642
tagged with: wordpress
type: Question
has body: I'm lazy loading pages in Wordpress using Ajax. Everything is working fine apart from my accordion buttons. If you access the page directly it works fine, but if you come from another page and the accordion page is lazy loaded the buttons wont' be active, though the content will be present in the source. Using Javascript, is it possible to initialize this button? I can't post the link although I've included a screenshot of the source that handles it. The Accordion Unexpanded Expanded I am completely new to JS, I'm really not sure how I can handle this. Does anyone have any insight? EDIT: I've since written this &lt;script&gt; jQuery(function($) { $('omsc-accordion').click(function() { $('.omsc-accordion').addClass('.omsc-toggle omsc-expanded'); }) }); &lt;/script&gt; But it does nothing. Shold this be working? I'm brand new to jQuery
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Ajax lazy loading, accordion button not activated
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/74221643
type: UnansweredQuestion

http://stackoverflow.com/q/25323657
type: Question
has title: call function of 'undefined' object
tagged with: javascript
tagged with: jquery
score: 0
has body: I got a JS question, I can't seem to be able to call a method. I'm using this dragger script: http://skidding.github.io/dragdealer/ To use it I gotta define it like this: new Dragdealer('just-a-slider', { animationCallback: function(x, y) { $('#just-a-slider .value').text(Math.round(x * 100)); } }); The documentation says: setValue(x, y, snap=false) Set the value of a Dragdealer instance programatically. The 3rd parameter allows to snap the handle directly to the desired value, without any sliding transition. I tried: var dragdealer_instance = new Dragdealer('just-a-slider', { animationCallback: function(x, y) { $('#just-a-slider .value').text(Math.round(x * 100)); } }); dragdealer_instance.setValue(10, 1); but it says that the dragdealer_instance is undefined.. how can I call that function?
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39475613
has comment: http://stackoverflow.com/comment/39475512

http://stackoverflow.com/comment/39499357
type: Comment
comment on: http://stackoverflow.com/a/25335970
has text: Well but it's even without a loop.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25259098
has body: I'm trying to create some custom elements without Polymer like the below code. demo-element.html Any good solution to minify those html components? I always use UglifyJS in NodeJS to minify js files by the way.
type: Question
tagged with: shadow-dom
has answer: http://stackoverflow.com/a/25269227
upvote count: 2
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39357512
tagged with: web-component
has title: How to minify html, css and js of custom elements?
score: 2
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/51991172
score: 7
type: AnswerComment
has text: I also think that you should add a complete working code ;)
type: Comment
comment on: http://stackoverflow.com/a/28151305

http://stackoverflow.com/q/25277172
upvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39400796
has comment: http://stackoverflow.com/comment/39390518
favorite count: 0
tagged with: angularjs
tagged with: token
has comment: http://stackoverflow.com/comment/39389481
answer count: 0
downvote count: 0
type: UnansweredQuestion
tagged with: authentication
type: Question
has body: I have a problem with authentication using JWT. On the most website, when I check remember-me option, the token may be stored in localStroage, or cookie. This is easy. If I don't check remember-me option and logged in, I will lose the logged-in status when I close the browser. This is not a problem either. But when I just open new tab or reload current tab (without clicking Logout button), I am still logged in. For second case, how can it be possible if I use only sessionStorage or variable in javascript. I read many answers in this site, but couldn't get what I need. I thought using xsrf token or timestamp on token. Or Is there any way to detect browser closing and remove cookie? (like callback function). Thank you for reading.
tagged with: cookies
score: 1
has title: Token-based authentication with angularjs

http://stackoverflow.com/a/25319931
score: 1
upvote count: 1
downvote count: 0
has body: $( "#optionTagID" ).val(); jQuery docs Gives you the value of the selected option. You can check if this is the desired value and then hide the element accordingly.
answers question: http://stackoverflow.com/q/25319814
type: Answer
has comment: http://stackoverflow.com/comment/39490233

http://stackoverflow.com/comment/39308953
has text: Isn't this all what you need `for (i = 0; i < events.length; i++) { console.log(events[i].color); }`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25233844
score: 1

http://stackoverflow.com/comment/39511229
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25342683
score: 0
has text: @kirk : please check the edit...meanwhile...How can check the time distribution of events that are taking place in my function....i tried using chrome timeline...honestly it went over my head

http://stackoverflow.com/comment/39551833
score: 0
type: AnswerComment
type: Comment
has text: What do you mean you prevent to re-submit? Is the submit not working now?
comment on: http://stackoverflow.com/a/25364272

http://stackoverflow.com/a/25236211
has body: There is good news and bad news. The good news is that most of the complexity in schemes such as Reed-Solomon is there to support clever means of decoding, which you don't need. With only 5 check bits, http://en.wikipedia.org/wiki/Decoding_methods#Syndrome_decoding will do perfectly well. Essentially you recompute the check bits from the data bits and xor it with the check bits you received. This gives you a bit-pattern which would be zero if there were no errors and otherwise depends only on the pattern of errors and not the data bits. By considering what you want to do for all the error patterns you are prepared to cope with (e.g. all patterns of up to k errors for small k) you can build a look-up table which takes you from the bit-pattern to a bitmap of error locations. The bad news is that these schemes are developed to support large linear codes because larger codes are more efficient. With only 21 bits to work with you won't do as well. With 15 data bits and 21 total bits I would start off with the Hamming code described in http://en.wikipedia.org/wiki/Hamming_code, which has 15 data bits and 21 total bits, and put an arbitrary linear check on the 15 data bits on the extra 21st bit. You can decode this with syndrome decoding.
type: Answer
answers question: http://stackoverflow.com/q/25235734
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/25235734
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39459968
score: 5
type: AnswerComment
comment on: http://stackoverflow.com/a/25315285
type: Comment
has text: @ShahidGhafoor You can't use an ID more than once. That might be your problem.

http://stackoverflow.com/comment/39501469
type: QuestionComment
comment on: http://stackoverflow.com/q/25337081
score: 0
has text: For security reasons, there are some limitations to what you can/can't do with local files, even when the web page is local. These limitations also tend to vary by browser.
type: Comment

http://stackoverflow.com/a/25323458
type: Answer
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25320004
has body: When updating the text elements, you also need to update the data that's bound to them, else nothing will happen. When you create the elements, you're binding the data to the g element that contains the arc segment and text. By then appending path and text, the data is "inherited" to those elements. You're exploiting this fact by referencing d when setting attributes for those elements. Probably the best way to make it work is to use the same pattern on update. That is, instead of updating only the data bound to the path elements as you're doing at the moment, update the data for the g elements. Then you can .select() the descendant path and text elements, which will again inherit the new data to them. Then you can set the attributes in the usual manner. This requires a few changes to your code. In particular, there should be a variable for the g element selection and not just for the paths to make things easier: var g = svg.selectAll("g.arc") .data(pie(data)); g.enter() .append("g").attr("class", "arc"); var path = g.append("path"); The changeFunction code changes as follows: var gnew = g.data(pie(data)); gnew.select("path") .transition() .duration(750) .attrTween("d", arcTween); Now, to update the text, you just need to select it and reset the attributes: gnew.select("text") .attr("transform", function(d) { ... }); Complete demo here.
has comment: http://stackoverflow.com/comment/39496039
answers question: http://stackoverflow.com/q/25320004

http://stackoverflow.com/comment/39402923
comment on: http://stackoverflow.com/q/25277269
score: 0
type: QuestionComment
has text: I thought that might be the case! Native jquery has the ability to add "async:false" to the ajax methods. Any idea how I might be able to to this to the couchapp view function?
type: Comment

http://stackoverflow.com/comment/39561681
has text: CDATA is an XML “feature”, it has no meaning when your content is parsed as HTML. I am not totally sure what you are asking here resp. what result you actually want to achieve – but if you want the “tags” not to be interpreted as such by the browser, then write `<` and `>` as `&lt;` and `&gt;`.
score: 0
comment on: http://stackoverflow.com/q/25370427
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39352730
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25257176
has text: I just change my code from `print json_encode($simMatrix);` to `echo json_encode($simMatrix); return;` Yet I still get a parseerror.

http://stackoverflow.com/comment/39364012
comment on: http://stackoverflow.com/a/25263691
score: 0
type: AnswerComment
type: Comment
has text: @ABFORCE take a brief look my answer is different from TJ's

http://stackoverflow.com/a/25298072
type: Answer
has body: // just some old fashioned java-script to drop data from one element to another! sourceElement.ondragstart = function(ev) { var datastr = "" // pass an object id, or an object as json what ever you need ev.dataTransfer.setData("Text", datastr); } // Allow drops to your target targetElement.ondragover = function(ev) { ev.preventDefault(); } targetElement.ondrop = function(ev) { ev.preventDefault(); datastr = ev.dataTransfer.getData("Text")); // do something cool here with that data! }
has comment: http://stackoverflow.com/comment/39428329
answers question: http://stackoverflow.com/q/25297894
score: 0

http://stackoverflow.com/q/25285864
has title: How to center navbar content after menu collapse?
tagged with: css
possible better answer: http://stackoverflow.com/a/25286154
has answer: http://stackoverflow.com/a/25286154
type: AnsweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/39405641
type: Question
has answer: http://stackoverflow.com/a/25286163
upvote count: 0
score: -2
has answer: http://stackoverflow.com/a/25286032
tagged with: javascript
tagged with: jquery
has body: I am working on a website which needs to have two headers. The second header holds the social icons (facebook, twitter, linkedin, google plus) and next to them I have this heading:"Fast Social Login>>" . Initially, with the css, I pulled them to the right. I am using the 'collapse' and 'navbar-collapse' classes for the heading because I don't want it to be shown on smaller screens. However, when this heading collapses, I want the social icons to be centered on the navbar. Can this be solved with CSS adjustment or do I need to write scripts? HTML: FAST SOCIAL LOGIN>> CSS: .header-bottom-border{ border-width: 0 0 5px 0; border-color: #4c9322; } .social-position{ width: 3em; height: 3em; display:inline-block; margin-left: 10px; margin-top: 10px; vertical-align: middle; }
answer count: 3
has comment: http://stackoverflow.com/comment/39405115
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39405728
favorite count: 0
accepted answer: http://stackoverflow.com/a/25286032
tagged with: twitter-bootstrap

http://stackoverflow.com/q/25322225
has body: I'm developing a service using YouTube Player API. But, I get an error in playing some videos. (almost all videos have no problem) Because this code is complex, I tried playing target video in YouTube official DEMO. I got a same error. Environment: Windows 7 / Chrome 36.0.1985.125 m Error Message: Uncaught TypeError: object is not a function : www-embed-player.js:310 ( https://s.ytimg.com/yts/jsbin/www-embed-player-vfl385XVN/www-embed-player.js ) How to reproduce: Access https://developers.google.com/youtube/youtube_player_demo Display console window of Chrome for debug. Enter "RDHBkza_ZcI" in [Content:][video ID]. (other parameters are default) Push the button [Update player with selected options]. Console display error message and the player start Demo video. (not "RDHBkza_ZcI") If you push the button [Update player with selected options] again, player will start "RDHBkza_ZcI". Question: What is this error? Why happen this problem? Is there solution?
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: youtube-api
tagged with: youtube
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: youtube-javascript-api
has comment: http://stackoverflow.com/comment/39559307
has title: "object is not a function" in YouTube iframe player API
score: 2

http://stackoverflow.com/q/25350625
tagged with: javascript
has comment: http://stackoverflow.com/comment/39524565
has title: How to pick a random property from an object without repeating after multiple calls?
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25350697
possible better answer: http://stackoverflow.com/a/25350918
has comment: http://stackoverflow.com/comment/39524519
has body: I'm trying to pick a random film from an object containing film objects. I need to be able to call the function repeatedly getting distinct results until every film has been used. I have this function, but it doesn't work because the outer function returns with nothing even if the inner function calls itself because the result is not unique. var watchedFilms = []; $scope.watchedFilms = watchedFilms; var getRandomFilm = function(movies) { var moviesLength = Object.keys(movies).length; function doPick() { var pick = pickRandomProperty(movies); var distinct = true; for (var i = 0;i &lt; watchedFilms.length; i += 1) { if (watchedFilms[i]===pick.title) { distinct = false; if (watchedFilms.length === moviesLength) { watchedFilms = []; } } } if (distinct === true) { watchedFilms.push(pick.title); return pick; } if (distinct === false) { console.log(pick.title+' has already been picked'); doPick(); } }; return doPick(); }
type: Question
has answer: http://stackoverflow.com/a/25350918
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39524790
accepted answer: http://stackoverflow.com/a/25350697

http://stackoverflow.com/q/25361426
has comment: http://stackoverflow.com/comment/39544012
answer count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39544071
type: Question
tagged with: javascript
has body: I need to convert XML to Object and Object to XML in java script. (I can use a Json conversion in the middle of the conversion process) But, I want to use my custom tag name and custom attribute name while converting, for example: Person Object: function PersonObject(firstName, lastName) { this.FirstName = firstName; this.LastName = lastName } Convert to XML like this: &lt;person f_name="First Name" l_name="Last Name" /&gt; Something like saving metadata for every property in the object (in C# I did it with writing attribute: [XmlAttribute("f_name")] above the property). I want to do it dynamically and not to give the objects properties those names because I want the continuing code to be readable. So, How can I do it - Convert easily object to XML and vice versa while using custom names of attributes?
score: 0
has title: Java Script - Convert Object to XML and XML to Object while using custom names of attributes
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/xml

http://stackoverflow.com/a/25324152
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25323674
answers question: http://stackoverflow.com/q/25323674
type: Answer
has body: Use this code $("#list").find("li").each(function(){ this.className = "all "+this.innerHTML; }); $("#filter").click(function(){ var class1 = $(".filter1").find(".active").text(); var class2 = $(".filter2").find(".active").text(); $("#list").find("li").addClass("passiv").end().find("."+class1+"."+class2) .removeClass("passiv").addClass("active"); }); $("#reset").click(function(){ $("#list").find("li").addClass("active").removeClass("passiv"); }); I have not optimized this code. You are using dom ready function two times which is actually not required. You can see the fiddle here
upvote count: 1
score: 1

field
tags question: http://stackoverflow.com/q/25389699
tag name: field
type: Tag

http://stackoverflow.com/a/25325073
score: 1
upvote count: 1
has body: You could remove the ng-transclude and do the transclution manually by using the $transclude function like this: $transclude(function (clones) { if ($attrs.menuTitle === undefined) { $attrs.$set('menuTitle', clones.text().trim().split('\n')[0]); } var children = []; angular.forEach(clones, function (el) { // only transclude DOM node that you need here if (el.nodeName === 'PARENT' || el.nodeName === 'CHILD') { children.push(el); } }) $element.find('div').append(children); }); Example Plunker: http://plnkr.co/edit/jLvhzcX0uh1xQTTqtxXu?p=preview
answers question: http://stackoverflow.com/q/25323330
has comment: http://stackoverflow.com/comment/39495301
accepted answer of: http://stackoverflow.com/q/25323330
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25315575
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39460599
possible better answer: http://stackoverflow.com/a/25315728
score: 0
has answer: http://stackoverflow.com/a/25315728
has comment: http://stackoverflow.com/comment/39460559
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39460647
has comment: http://stackoverflow.com/comment/39460473
has body: Why does .mydiv img not get removed in this codeblock? $( document ).on( "click", '.onhover', function() { $('.mydiv img').remove(); var clone = $('.onhover').clone(); $('.mydiv').append(clone); }); Also I should add that each image's src is base64, not sure if that is the problem. EDIT: .onhover html &lt;img class="onhover" src="[binary]...[binary]" style="float:left; height: 100%; position: relative; width: 55px; margin-right: 4px;"&gt;
has comment: http://stackoverflow.com/comment/39460520
has title: Dynamically added element will not delete
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25316110
has comment: http://stackoverflow.com/comment/39461086
has comment: http://stackoverflow.com/comment/39460598
has comment: http://stackoverflow.com/comment/39461014
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25316110

http://stackoverflow.com/comment/39363047
type: Comment
comment on: http://stackoverflow.com/a/25245002
type: AnswerComment
score: 0
has text: http://jsfiddle.net/uvh4ymh9/20/ I correct myself : with a relative wrap, the info-pop-title can stay in fixed positionning it does not matter. The only thing remaining is this "0" in your content which is now 60px from top. If it was wrapped in smething you could either use a negative margin or set it in a fixed position as well. But, if I can ask, why do you have a so twisted layout...?

http://stackoverflow.com/a/25337327
has comment: http://stackoverflow.com/comment/39502160
has comment: http://stackoverflow.com/comment/39502132
has comment: http://stackoverflow.com/comment/39502075
score: 0
has comment: http://stackoverflow.com/comment/39501964
has comment: http://stackoverflow.com/comment/39502112
has comment: http://stackoverflow.com/comment/39502395
has comment: http://stackoverflow.com/comment/39502239
has comment: http://stackoverflow.com/comment/39502022
has body: Just see these issues :- 1.) Use appropriate version of jquery file (which jquery version to use just see in documentation of fancy box) 2.) Avoid using multiple versions of same jquery files or avoid including single js file twice. 3.) Just check the order of js files included,first include jquery file and then fancybox js file. 4.) If you are using many jquery files on a page then use $.noConflict()(in order to avoid conflict between different js files). see complete documentation here:-http://api.jquery.com/jquery.noconflict/
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39501951
accepted answer of: http://stackoverflow.com/q/25337124
type: Answer
answers question: http://stackoverflow.com/q/25337124

http://stackoverflow.com/q/25343698
tagged with: affix
type: AnsweredQuestion
score: 3
downvote count: 0
has body: I have a web application using Bootstrap 3.2 and a menu with the Affix enabled. this works fine in most scenarios except one: I have an image gallery page where images are loaded "on the fly" when the user scrolls down - as soon as any image is added the affix breaks and does not revert the menu to affix-top when scrolling back to the top. See THIS fiddle (don't make the screen to big): Scroll just as much down that the affix is set Scroll back to the top ==> working (yellow margin for MENU ITEM is restored): Then do the following: Scroll to the bottom so some text is added Scroll back up ==> the MENU ITEM keeps beeing affixed and sticks to the top: Does someone know why this is happening or how I can fix it?
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25345348
accepted answer: http://stackoverflow.com/a/25345348
tagged with: jquery
upvote count: 3
answer count: 1
favorite count: 0
has title: Bootstrap Affix not working after loading more content to page
tagged with: twitter-bootstrap
tagged with: css

http://stackoverflow.com/a/25312328
has comment: http://stackoverflow.com/comment/39459814
answers question: http://stackoverflow.com/q/25312209
has comment: http://stackoverflow.com/comment/39459506
has body: Your problem is that the images aren't loaded (and therefore have no dimensions) when you execute the Masonry positioning. The reason it works when you reload is because the images are cached. Try executing when everything has loaded. I would suggest hiding everything until that point, but that's outside the scope of this question. &lt;script&gt; function masonry_init(){ var container = document.querySelector('#masonry'); var masonry = new Masonry(container, { gutter: container.querySelector('.gut_width'), itemSelector: '.item', columnWidth: container.querySelector('.col_width') }); } window.onload = masonry_init; &lt;/script&gt; Sources: I have had this problem myself! :) Also, MDN - GlobalEventHandlers.onload
upvote count: 4
score: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39454826
has comment: http://stackoverflow.com/comment/39459163
has comment: http://stackoverflow.com/comment/39459259
has comment: http://stackoverflow.com/comment/39456706
type: Answer
has comment: http://stackoverflow.com/comment/39455165
has comment: http://stackoverflow.com/comment/39458731
downvote count: 1
accepted answer of: http://stackoverflow.com/q/25312209
has comment: http://stackoverflow.com/comment/39456163
has comment: http://stackoverflow.com/comment/39458984

http://stackoverflow.com/comment/39305857
comment on: http://stackoverflow.com/q/25232447
score: 0
has text: add `hidden-xs` on your navbar that you don't want to be there on small devices. Look at the responsive utilities.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39396010
comment on: http://stackoverflow.com/q/25281090
type: Comment
type: QuestionComment
has text: Have you read Google's recommendation for app structure: https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDzdNvV6pGcuaF4Q9821Es/pub
score: 0

http://stackoverflow.com/comment/39364688
score: 0
has text: Haha you guys above are funny. The two first answers are so beautiful. And no, there is no better question/answer on SO that covers this as succintly.
comment on: http://stackoverflow.com/q/25263948
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39311442
has text: You could try using join: ... `+ \'&redIssuesRemoved=\' + join(removedRedIssues, '&redIssuesRemoved=') + `... so that the array is sent to the controller with something looking like: `saveModifiedIndividualRecord?redIssuesRemoved='No address provided.'&redIssuesRemoved='No telephone number provided.'&...` This is the usual way of sending array values via GET.
comment on: http://stackoverflow.com/q/25234745
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25296467
has comment: http://stackoverflow.com/comment/39435513
has comment: http://stackoverflow.com/comment/39502350
has comment: http://stackoverflow.com/comment/39510217
has comment: http://stackoverflow.com/comment/39439669
type: Answer
accepted answer of: http://stackoverflow.com/q/25296331
has comment: http://stackoverflow.com/comment/39428322
answers question: http://stackoverflow.com/q/25296331
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39426331
has comment: http://stackoverflow.com/comment/39509808
has comment: http://stackoverflow.com/comment/39510708
has body: Okay, I think I understand your question now. Hopefully this fiddle answers it. I took the liberty of rounding each percentage to 10 decimal places. Now, when they are added, they equal 100. The rounding process itself is essential, as some (or all?) of those percentages are repeating decimals, and JavaScript automatically cuts them off and rounds. They will never be 100% accurate. The question is, how close is close enough? JS: function round_number(num, dec) { return Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec); } var v1 = 16658807.49; var v2 = 94182053.40718205; var v3 = 1005668.7204374762; var v4 = 422893.84666449524; var vals = [v1,v2,v3,v4]; var tot = v1 + v2 + v3 + v4; document.getElementById('body').innerHTML += (tot+'&lt;br/&gt;'); for (var v in vals) { vals[v] = (vals[v] / tot) * 100; vals[v] += ' '; vals[v] = round_number(vals[v], 10);//parseFloat(vals[v].substr(0, (vals[v].indexOf('.') + 16)), 10); document.getElementById('body').innerHTML += (vals[v]+'&lt;br/&gt;'); } tot = vals[0] + vals[1] + vals[2] + vals[3]; //tot += ' '; //tot = tot.substr(0, (tot.indexOf('.') + 11)); document.getElementById('body').innerHTML += (tot+'&lt;br/&gt;'); This cuts off any decimal without rounding. JS: var value1 = 16658807.49; var newVal = (value1 / 112269423.46428402144)*100; newVal = newVal + ' '; newVal = newVal.substr(0, newVal.indexOf('.')); This drops only the decimal point itself. JS: var value1 = 16658807.49; var newVal = (value1 / 112269423.46428402144)*100; newVal = newVal + ' '; var newVal_1 = newVal.substr(0, newVal.indexOf('.')); var newVal_2 = newVal.substr((newVal.indexOf('.')+1)); newVal = newVal_1 + newVal_2; To return your stringed number newVal to its integer format, use: newVal = parseInt(newVal ,10);
has comment: http://stackoverflow.com/comment/39508130
has comment: http://stackoverflow.com/comment/39510131
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/25337707
has comment: http://stackoverflow.com/comment/39533334
answers question: http://stackoverflow.com/q/25337503
has body: Your code is not correct. Because text is not an element and also you cannot alert objects. The right code would be: HTML: Hello WOrld jQuery: alert($("div").find("p").text()); JSFIDDLE DEMO
score: 0
has comment: http://stackoverflow.com/comment/39533346
has comment: http://stackoverflow.com/comment/39533359
has comment: http://stackoverflow.com/comment/39533373
type: Answer

http://stackoverflow.com/q/25281403
tagged with: javascript
tagged with: passbook
answer count: 1
has title: Invalid passbook generated in php server
type: UnansweredQuestion
has body: I am trying to create support passbook from ios6 and later. I found an example that works perfectly but when trying to adapt it to my server it generates invalid passbook. The original project is in this url: https://github.com/SimonWaldherr/passkit.php The only change I made was putting him temporary files directory of my server. The certificates have left the same as shown in the example and everything exactly the same. My server is https. What can it be wrong? The url from my test server is: https://hot.es/passkit.php-master/
tagged with: php
tagged with: passkit
score: 0
has answer: http://stackoverflow.com/a/25853705
type: Question
tagged with: ios

http://stackoverflow.com/comment/42481753
score: 0
comment on: http://stackoverflow.com/a/26369373
type: Comment
has text: I've added the featured image to be added to the content description on the rss feed end. The images still don't seem to be loading.
type: AnswerComment

http://stackoverflow.com/a/25260545
has comment: http://stackoverflow.com/comment/39359085
answers question: http://stackoverflow.com/q/25260244
type: Answer
has comment: http://stackoverflow.com/comment/39359464
has comment: http://stackoverflow.com/comment/39360388
score: 0
has body: In Angular you wont need to refresh a template. All that you need to do is to update your model and the UI will be updated accordingly. May be you are using a wrong pattern?

http://stackoverflow.com/comment/39513462
score: 1
comment on: http://stackoverflow.com/q/25329786
type: QuestionComment
has text: @Adam: I do not want to ignore the complex parts, I would like to know all 3 exact answers. This is why I need to **prevent the NaN** and transform the value to a complex number. `Math.sqrt(-9)` should result in `3*i`. Since Javascript does not include calculating with complex numbers, I am searching for an easy solution. Furthermore, operations +-*/ with complex numbers should be possible. I guess we could use vectors here somehow. I have found this online tool http://www.1728.org/cubic.htm - here they use JS to calculate complex, but they **don't deal** with `NaN` as it seems!
type: Comment

http://stackoverflow.com/comment/39367798
has text: You could just redraw the part that got updated and re-use the part that was already drawn. That way, you only render the difference and cache the old info.
score: 0
comment on: http://stackoverflow.com/q/25265472
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25266095
tagged with: touch
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: multi-touch
has title: drag & DROP with scroll for touch devices
has answer: http://stackoverflow.com/a/25276756
type: UnansweredQuestion
downvote count: 1
tagged with: jquery-ui
tagged with: javascript
score: -1
has body: I am looking for a drag &amp; DROP plugin that works on touch devices(I found a few working well). But I have a div with scrollable content inside and this plugins disable scroll. Any ideas how to fix having scroll and drag &amp; DROP in the same div for touch devices?
type: Question

http://stackoverflow.com/comment/39489044
comment on: http://stackoverflow.com/q/25330645
score: 0
type: QuestionComment
type: Comment
has text: Just reset the opacity in the event handler.

http://stackoverflow.com/comment/39394812
type: QuestionComment
has text: @Exception-Thanks but for text like following its not working value=catalog11111111AAAAAAAAA/BBBBBB/DDDD
comment on: http://stackoverflow.com/q/25279920
score: 0
type: Comment

http://stackoverflow.com/q/25281075
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39396007
has body: I am trying to figure out a way of initiating a google distancematrix call where i need to have the result returned before I can carry on with my program execution, using javascript and jquery. Please if anyone can help code sample idea. I have multiple legs for distances. ie: leg 1 start and finish point leg 2 start and finish point leg 3 start and finish point what i am trying to do is calc the travel time between the different legs, so leg 1 finishes driver needs to get to start of leg 2. so doing a call to get the distance between leg 1 finish and leg 2 start. Then moving on to the next calc. I already have the leg distances so, my code is as follows: var driving = 0; calculateDistances(); code to work with the calculatedistances() result here function calculateDistances() { //alert(origin+','+destination); var service = new google.maps.DistanceMatrixService(); service.getDistanceMatrix( { //set origin and destination points origins: [origin],//, origin2], destinations: [destination], travelMode: google.maps.TravelMode.DRIVING, unitSystem: google.maps.UnitSystem.METRIC, avoidHighways: false, avoidTolls: false }, callback); } function callback(response, status) { if (status != google.maps.DistanceMatrixStatus.OK) { alert('Error was: ' + status); } else { var origins = response.originAddresses; var destinations = response.destinationAddresses; var outputDiv = ''; for (var i = 0; i &lt; origins.length; i++) { var results = response.rows[i].elements; //addMarker(origins[i], false); for (var j = 0; j &lt; results.length; j++) { driving = parseFloat(results[j].distance.text); // driving is a script wide variable to hold the return value } } } }
tagged with: google-maps
has answer: http://stackoverflow.com/a/25281434
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: how can i wait for a google distance call to return my result before carrying on
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25281434
score: 1

http://stackoverflow.com/comment/39318164
type: Comment
type: QuestionComment
has text: Do you have a myclass instance for every anchor?
comment on: http://stackoverflow.com/q/25237069
score: 0

http://stackoverflow.com/comment/39330263
comment on: http://stackoverflow.com/q/25245411
type: Comment
type: QuestionComment
has text: You have to get the selected `option` from the select box. You are selecting the select element. Use `$('select[name=job_est]').find(":selected").text();//or .val()` instead of `$('select[name=job_est]');`
score: 2

http://stackoverflow.com/q/25289395
score: 0
has comment: http://stackoverflow.com/comment/39413628
answer count: 1
has comment: http://stackoverflow.com/comment/59373851
accepted answer: http://stackoverflow.com/a/35853911
has comment: http://stackoverflow.com/comment/39411821
has body: I have built a function in javascript to draw to and from set points on the canvas. All of my points work correctly expect c. If I try to draw a line from any point to c it does not work. Javascript var a = {x:0, y:0}; var b = {x:350, y:0}; var c = {x:0, y:350}; var d = {x:350, y:350}; var e = {x:100, y:100}; var f = {x:100, y:250}; var g = {x:250, y:250}; var h = {x:250, y:100}; function drawLine(a, b) { ctx.beginPath(); ctx.moveTo(a.x,a.y); ctx.lineTo(b.x,b.y); ctx.stroke(); } drawLine(d, c); Why do all points work expect c????
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/35853911
has comment: http://stackoverflow.com/comment/39414100
has comment: http://stackoverflow.com/comment/39411979
type: Question
type: AnsweredQuestion
has title: Canvas Draw To is not drawing line
tagged with: javascript
has comment: http://stackoverflow.com/comment/39411694

http://stackoverflow.com/a/25380058
upvote count: 3
score: 3
accepted answer of: http://stackoverflow.com/q/25378479
has comment: http://stackoverflow.com/comment/39582570
answers question: http://stackoverflow.com/q/25378479
type: AcceptedAnswer
downvote count: 0
has body: You could utilize the Chart.addSeriesAsDrilldown (API) method to achieve something like this. For example, your click listener could be: plotOptions: { series: { point: { events: { click: function(e) { $('#container').highcharts() .addSeriesAsDrilldown(this, { data: [1,2,3] }); } } } } } See this JSFiddle for a demonstration.
has comment: http://stackoverflow.com/comment/39582542
type: Answer

http://stackoverflow.com/comment/39363652
type: Comment
comment on: http://stackoverflow.com/q/25263378
score: 0
type: QuestionComment
has text: i mean show your ``CheckOut`` action

http://stackoverflow.com/a/25332770
type: Answer
has comment: http://stackoverflow.com/comment/39502006
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25332180
downvote count: 0
has body: As per OP, please find the fiddle var json = [ {"a":121, "b":212, "c":"0", "d":100}, {"a":121, "b":212, "c":"0", "d":300}, {"a":121, "b":210, "c":"0", "d":200}, {"a":120, "b":210, "c":"0", "d":300} ]; function compare(first, second) { if (first.a &lt; second.a &amp;&amp; first.b &lt; second.b) return -1; if (first.a &gt; second.a &amp;&amp; first.b &gt; second.b) return 1; return 0; } var sorted = json.sort(compare); var length = sorted.length; for (var i = 0; i &lt; length; i+=1) { sorted[i].count = 1; } for (var i = 0; i &lt; sorted.length-1; i+=1) { for(var j = i+1; j &lt; sorted.length; j += 1) { if(sorted[i].a === sorted[j].a) { sorted[i].count += 1; sorted[i].d += sorted[j].d; sorted.splice(j, 1); } } } console.log(JSON.stringify(sorted, ' ', 2)); Output: [ { "a": 121, "b": 212, "c": "0", "d": 400, "count": 2 }, { "a": 121, "b": 210, "c": "0", "d": 200, "count": 1 }, { "a": 120, "b": 210, "c": "0", "d": 300, "count": 1 } ]

http://stackoverflow.com/comment/39437563
comment on: http://stackoverflow.com/a/25303254
type: Comment
score: 0
type: AnswerComment
has text: Apologies. Updated my comment.

http://stackoverflow.com/a/25254274
has comment: http://stackoverflow.com/comment/39348243
score: 0
answers question: http://stackoverflow.com/q/25253892
has body: I take it that you want to check the input from a form input field. You can not do this with a single regex if you check the characters one by one since you will only test the regex against a character. Do you have to use javascript for this ? If it is just client-side validation, you could use the pattern attribute avaiable from HTML5 on input elements. Below an exemple : (Replace the point by you authorized characters if you like) Otherwise, if you want to stick with javascript I think the function should look like this : function LettersOnly(e) { var key = window.event ? e.keyCode : e.which; var keychar = String.fromCharCode(key); if (document.getElementById('inputfield').val.length === 0 &amp;&amp; !isNaN(parseInt(keychar)))) { return false; } var reg = new RegExp("[A-Za-z + ']"); return reg.test(keychar); } document.getElementById('inputfield').val.length === 0 checks if the string from the input field is empty (i.e. we are at the the current character is the first one) Replace or adapt the test if it is for something else than an input field of an HTML form. !isNaN(parseInt(keychar))) checks if it is a number
type: Answer
has comment: http://stackoverflow.com/comment/39366241

http://stackoverflow.com/a/25255179
has comment: http://stackoverflow.com/comment/39349657
has body: I would suggest creating an event to trigger your action (xamountOfFrames). Here is a link to some information that might help http://www.w3schools.com/tags/ref_eventattributes.asp
answers question: http://stackoverflow.com/q/25254668
score: 0
type: Answer

http://stackoverflow.com/comment/39422765
has text: We are working in Woocommerce. Do you know what the click handler would be to trigger the "add to cart" function in Woocommerce?
type: AnswerComment
comment on: http://stackoverflow.com/a/25289866
type: Comment
score: 0

http://stackoverflow.com/q/25301472
tagged with: web-services
has comment: http://stackoverflow.com/comment/39445062
has comment: http://stackoverflow.com/comment/39444256
type: Question
tagged with: highcharts
tagged with: javascript
tagged with: highcharts-ng
score: 0
has answer: http://stackoverflow.com/a/25340712
answer count: 1
has body: I am implemented the high charts in angular js ,It is working fine with hard coded data but it is not working when data came from web service dynamically . In my controller : $scope.months = []; $scope.retail = []; $scope.wholesale = []; $scope.fetchChart = function(){ $scope.chartConfig = { title: { text: "" }, options: { chart: { type: 'column' }, plotOptions: { series: { stacking: '' } }, legend: { layout: 'vertical', align: 'topleft', verticalAlign: 'top', borderWidth: 1 } }, xAxis: { categories: $scope.months }, credits: { enabled: true }, series: [{ name: 'Retail', data: $scope.retail }, { name: 'Wholesale', data: $scope.wholesale } ], loading: false } }; $http.get(http://localhost:8080/abc/pqr/mno/getData).success(function(response) { $scope.data = angular.fromJson(response); $scope.comlete = false; var count=0; for(var i = 0; i &lt; $scope.data.length; i++){ count++; $scope.months.push($scope.data[i].month); $scope.retail.push($scope.data[i].retail); $scope.wholesale.push($scope.data[i].wholesale); if(count == $scope.data.length){ $scope.fetchChart(); $scope.comlete = true; } } $scope.toggleHighCharts = function () { this.chartConfig.useHighStocks = !this.chartConfig.useHighStocks } $scope.$watch("comlete",function(){ alert(JSON.stringify($scope.months)+"---"+JSON.stringify($scope.retail)+"=-=--"+JSON.stringify($scope.wholesale)); },true); $scope.reflow = function () { $scope.$broadcast('highchartsng.reflow'); }; }); $scope.chartTypes = [ {"id": "line", "title": "Line"}, {"id": "spline", "title": "Smooth line"}, {"id": "area", "title": "Area"}, {"id": "areaspline", "title": "Smooth area"}, {"id": "column", "title": "Column"}, {"id": "bar", "title": "Bar"}, {"id": "pie", "title": "Pie"}, {"id": "scatter", "title": "Scatter"} ]; $scope.dashStyles = [ {"id": "Solid", "title": "Solid"}, {"id": "ShortDash", "title": "ShortDash"}, {"id": "ShortDot", "title": "ShortDot"}, {"id": "ShortDashDot", "title": "ShortDashDot"}, {"id": "ShortDashDotDot", "title": "ShortDash…
has comment: http://stackoverflow.com/comment/39438474
has title: How to get column chart in angular using highcharts using dynamic data
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/a/25350014
has comment: http://stackoverflow.com/comment/39539554
answers question: http://stackoverflow.com/q/25349916
score: 1
has comment: http://stackoverflow.com/comment/39539176
type: AcceptedAnswer
downvote count: 0
has body: It seems you don't put your complete code and i can't see a structure to show you error, when this error must be shown? But if you have a button and want to show this error if an empty text area submitted and remove error when user enter an input, so try this: var textspan = document.getElementById('textspan'); $('#txtarea').bind('input propertychange', function() { if($("#txtarea").val().trim().length &gt; 0){ $("#textspan").html(''); } }); $("#Button1").click(function(){ if($("#txtarea").val().trim().length &lt; 1){ $("#textspan").html('you shoud fill text area'); } }); You can see that if user try to submit an empaty textarea, get the error and when add any character to textarea, the error disappear. Check JSFiddle Demo
has comment: http://stackoverflow.com/comment/39539127
type: Answer
accepted answer of: http://stackoverflow.com/q/25349916
upvote count: 1

http://stackoverflow.com/q/25381215
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25381332
type: Question
tagged with: mongodb
has title: How do you return the updated object when updating in mongodb?
downvote count: 0
answer count: 1
tagged with: mongoose
tagged with: javascript
has body: I'm trying to get the objectId back when updating by another field in mongo. The code I have at the moment is: twitterDb.update({'twitterId': t.id},tweetData, {upsert:true}, function(err, twitterDb) { //do stuff here }); note that twitterId is different from the objectId. How do I return the full object so that I can get the objectId? Thanks in advance!
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25381332
upvote count: 1
tagged with: node.js

http://stackoverflow.com/comment/39422234
type: QuestionComment
comment on: http://stackoverflow.com/q/25294899
has text: @user3078675 Make the URL parts as a settings values in your PHP or Javascript. Or try to search for any way to detect the the url of the site or the working page.
score: 0
type: Comment

http://stackoverflow.com/a/39209226
has comment: http://stackoverflow.com/comment/72943460
upvote count: 8
has body: Here is a clean ES6 version: function mapObject(obj, fn) { return Object.keys(obj).reduce( (res, key) =&gt; { res[key] = fn(obj[key]); return res; }, {} ) } function deepMap(obj, fn) { const deepMapper = val =&gt; typeof val === 'object' ? deepMap(val, fn) : fn(val); if (Array.isArray(obj)) { return obj.map(deepMapper); } if (typeof obj === 'object') { return mapObject(obj, deepMapper); } return obj; }
type: Answer
score: 8
answers question: http://stackoverflow.com/q/25333918
downvote count: 0

http://stackoverflow.com/q/25374378
has body: Here's my issue. I'm using checkboxes and lazy load via ajax. However, if you were to check a parent item without expanding it, none of the child nodes have been loaded so they don't get checked. How can I load all child and nested child nodes under a parent, and check them all, when they check the parent? Thanks, and this is what I have so far $(function () { // Create the tree inside the &lt;div id="tree"&gt; element. $("#tree").fancytree({ source: { url: "/Home/GetData", cache: true } , checkbox: true , icons: false , cache: true , lazyLoad: function (event, data) { var node = data.node; data.result = { url: "/Home/GetTreeViewData/" + node.key , data: { mode: "children", parent: node.key } , cache: true }; } , selectMode: 3 , select: function (event, data) { //here's where I need to load the children and any sub children for that node, if it has them, so they can be set to checked } , strings: { loading: "Grabbing places and events…", loadError: "Load error!" }, }) }); Update The reason I need to pull these client side is because this is a treeview that will be loading google map markers. So if I have a structure like Parent1 ->child1-1 ->->child1-1-1 ->child1-2 all of those child nodes load lazy. however, if they were to check the parent node 1, then I'd need to load the markers for all of those child nodes. That's why I'm looking for a way to recursively get all the children. Because it would be really hard to keep track of what markers have/haven't been added, if I don't just load the treeview items and check the boxes. Make sense?
upvote count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/55864869
has answer: http://stackoverflow.com/a/25377943
downvote count: 0
has title: FancyTree load all nested children on select
possible better answer: http://stackoverflow.com/a/25377943
type: Question
tagged with: javascript
score: 4
answer count: 3
has answer: http://stackoverflow.com/a/25384163
accepted answer: http://stackoverflow.com/a/25384163
tagged with: jquery
favorite count: 0
tagged with: fancytree

http://stackoverflow.com/a/25344502
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
has body: C would have to be a function: function extend(obj) { if (typeof obj !== 'object') return obj; Array.prototype.slice.call(arguments, 1).forEach(function (source) { for (var prop in source) { obj[prop] = source[prop]; } }); return obj; }; var A = {}; var B = {}; var C = function () { var _c = {}; return extend(_c, A, B); }; Then call C like: A.a=1; B.b=2; console.log(C()); // { a:1, b:2 }
upvote count: 2
answers question: http://stackoverflow.com/q/25344430
accepted answer of: http://stackoverflow.com/q/25344430

http://stackoverflow.com/comment/39413795
type: Comment
comment on: http://stackoverflow.com/a/25289177
has text: Man, wish i could post a print screen in here. This is my chrome inspect element view: --------------------------------------------------- element.style { width: 742.666666666666666666667px; } -------------------------------------------------------- @media only screen and (orientation: portrait) #favoriteGames ul { margin: 2.93335px; max-width: 340.732422px; } --------------------------- so it seems to not be limiting the width at all. how is that even possible?...
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39526753
has text: the slash divides the left by the right. it's called division.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25351923
score: 1

http://stackoverflow.com/comment/39450143
type: QuestionComment
comment on: http://stackoverflow.com/q/25310062
score: 0
has text: Also, if you are going to be rolling your own, don't use 'append' a million times as it slows the page down. Just use it one time.
type: Comment

http://stackoverflow.com/comment/39595271
type: AnswerComment
score: 1
type: Comment
comment on: http://stackoverflow.com/a/25388077
has text: When a user clicks a div with class .move It should alawys swap with the first child of the parent, in other words It should go where div with id #one was when the page loads. Exept the user clicks the first div, in this case nothing should happen. @guest271314

http://stackoverflow.com/comment/39681586
comment on: http://stackoverflow.com/q/25272020
type: Comment
has text: @gphilip what a great site: http://vanilla-js.com/. thanks for mentioning it. i will have to show it to some people who are always wondering why their jquery is so slow ;)
type: QuestionComment
score: 1

http://stackoverflow.com/comment/39345395
comment on: http://stackoverflow.com/q/25250377
has text: You haven't quite provided enough code to repro your scenario. Could you update the question with more code, perhaps backed by a fiddle? (If I imagine what your code *may* resemble [it works just fine](http://jsfiddle.net/kgm8jhcs/1/): no error message on load.)
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39507023
comment on: http://stackoverflow.com/q/25340197
score: 0
has text: I'm confused, you said you are `interested in the class names that are attached to that element`, but you have `replace: true` flag set. BTW, could you show how you achieve the same with `ng-valid/ng-invalid/ng-model`?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25348088
type: AnsweredQuestion
has title: Removing an added image again
linked to: http://stackoverflow.com/q/203198
has answer: http://stackoverflow.com/a/25348137
accepted answer: http://stackoverflow.com/a/25348244
has body: I'm trying to add the full size image when clicking on the thumbnail. When I change the class to .thumbnail in the second click function it successfully removes the thumbnail. I've tried adding the image with the class .thumbnail instead of .stretch which did work but they didn't disappear after clicking on them again. This code adds the picture but doesn't remove it when clicking on the picture again. $('.thumbnail').click(function(){ $('&lt;img class="stretch" src="_DSC1671.jpg"&gt;').insertAfter('.header'); }); $('.stretch').click(function(){ $(this).remove(); }); This code removes the thumbnail pictures successfully. $('.thumbnail').click(function(){ $(this).remove(); }); This code adds the picture with the same attributes as the original thumbnails, removes the original thumbnails when clicked on them but doesn't remove the added thumbnails. $('.thumbnail').click(function(){ $('&lt;img class="stretch" src="_DSC1671.jpg"&gt;').insertAfter('.header'); }); $('.thumbnail').click(function(){ $(this).remove(); }); So I'm not sure what I'm doing wrong here. Apparently it has to do with the fact that the images are added in retrospective. Thank you in advance for any assistance.
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25348148
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25348244
tagged with: css
possible better answer: http://stackoverflow.com/a/25348137
type: Question

http://stackoverflow.com/q/25251588
tagged with: jquery
answer count: 5
has answer: http://stackoverflow.com/a/25251745
has answer: http://stackoverflow.com/a/53850320
has comment: http://stackoverflow.com/comment/39342124
has comment: http://stackoverflow.com/comment/39342202
tagged with: checkbox
has answer: http://stackoverflow.com/a/25251870
has answer: http://stackoverflow.com/a/25252074
accepted answer: http://stackoverflow.com/a/25251870
type: AnsweredQuestion
has body: How can I make a checkbox always be checked, with Jquery 1.4.2 ? This is my html output from the struts application: &lt;input type="checkbox" name="helloThere" value="on"&gt; I tried: $(document).ready(function() { $('#helloThere').attr('checked', 'checked'); }); JSFIDDLE http://jsfiddle.net/96p4zg9w/ this shows the current code, I would need the checkbox to load checked. The props property is not available in JQUERY 1.4.2
tagged with: struts
has comment: http://stackoverflow.com/comment/39342285
has title: jquery how to make checkbox always checked
possible better answer: http://stackoverflow.com/a/25251745
type: Question
has answer: http://stackoverflow.com/a/72358972
score: 0
tagged with: jsp
tagged with: javascript

http://stackoverflow.com/q/25259085
upvote count: 0
has body: When I draw a line, it is drawn and appears fine, but when I draw a new line again, the last thing I drew disappears. It's like resetting after I draw a new line again. Here's my code: function draw() { var teethImage = new Image(); teethImage.onload = function () { }; teethImage.src = "images/teeth.png"; ctx.drawImage(teethImage, 1, 1); ctx.lineTo(currX, currY); ctx.strokeStyle = x; ctx.lineWidth = y; ctx.stroke(); } What's wrong in my code?
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39356077
favorite count: 0
has answer: http://stackoverflow.com/a/25260551
has answer: http://stackoverflow.com/a/25260612
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39357557
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39356718
possible better answer: http://stackoverflow.com/a/25260612
tagged with: drawimage
has comment: http://stackoverflow.com/comment/39356368
downvote count: 1
type: Question
has title: drawImage() doesn't work properly
accepted answer: http://stackoverflow.com/a/25260551
answer count: 2

http://stackoverflow.com/q/25248439
tagged with: meteor
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/31401395
has title: Meteor JS - $sort not working when new post added
score: 2
has comment: http://stackoverflow.com/comment/39340622
downvote count: 0
type: Question
upvote count: 2
tagged with: mongodb
tagged with: javascript
tagged with: sorting
has comment: http://stackoverflow.com/comment/39336338
has comment: http://stackoverflow.com/comment/39344466
has comment: http://stackoverflow.com/comment/39336639
answer count: 1
has body: I have a collection of posts, each have an ISO timestamp (ex: "2014-08-11T16:34:39.334Z"). I'd like to sort the posts by timestamp descending. When I load the page the first time, everything works fine. Posts are ordered by timestamp descending. However, when I add a new post, the new post gets appended to the end of the list, instead of appearing at the top, as it should (since its timestamp is the most recent). I have the $sort setup on my router to sort by timestamp descending "-1". The template is definitely "reacting" by adding the new post, but not in the right order. router.js this.route('profile',{ path:'/profile', waitOn:function(){ Session.set('profile',this.params.username); return Meteor.subscribe('postsByOwner',this.params.username); }, data:{ user:function(){ var username = Session.get("profile"); var user = Meteor.users.findOne({username:username}); if(user){ return user; } }, posts:function(){ return Posts.find({},{$sort:{timestamp:-1}}); } } }); profile.html &lt;template name="profile"&gt; {{#if user}} {{&gt; profileCard user}} {{/if}} {{#if posts.count}} {{&gt; postsList}} {{else}} No posts! {{/if}} &lt;/template&gt; methods.js savePost: function(fields) { var user = Meteor.user(); if (!user) throw new Meteor.Error(401, "You need to login to post!"); var d = new Date(); var timestamp = d.toISOString(); var post = _.extend(_.pick(fields, 'title', 'description'), { owner: user._id, timestamp : timestamp }); postId = Posts.insert(post); }

http://stackoverflow.com/comment/39489063
has text: @FelixKling huh. Learn something new everyday. Thanks :P
type: Comment
comment on: http://stackoverflow.com/a/25330174
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39462214
has text: @LukasKolletzki: please create a jsfiddle with your situation
score: 0
comment on: http://stackoverflow.com/a/25285454
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25259910
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25260340
has title: Pick specific elements from array
tagged with: tween
has body: I hava an array with 17 images. I want to pick every image from the array and put it on the stage but there should be a specific manner to do this. After I picked the first image I need the nith one so this should look like this: var myarray = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]; // these are the indexes for the 17 images The order to pick the elemets looks like this : [0,9,1,10,2,11,3,12,4,13,5,14,6,15,7,16,8]; I need to use them in a Tween , this is the function where I am doing this but I do not have the oder I mentioned above. var pick_images = function(lights_arr,iterator,f) { if(iterator &lt; lights_arr.length) { iterator = iterator +1; } createjs.Tween.get(lieghts_arr[iterator]).to({alpha:0},200).wait(0).to({alpha:1},200).wait(100).call([f,lights_arr,f]); pick_images(arr, i,pick_images); I know that if I take the lights_arr.length and divide it by 2, round it up I have allways the second image like 9,10,11 or 12. For this I need after every loop to substract two elemets ( images ) I used. Do you know how can I do this to work in my function ?
accepted answer: http://stackoverflow.com/a/25260022
has answer: http://stackoverflow.com/a/25260011
type: Question
tagged with: math
has answer: http://stackoverflow.com/a/25260112
score: 0
linked to: http://stackoverflow.com/q/3746725
tagged with: arrays
tagged with: javascript
tagged with: createjs
has answer: http://stackoverflow.com/a/25260022
has answer: http://stackoverflow.com/a/25260340
has comment: http://stackoverflow.com/comment/39357355
answer count: 4

timer
tag name: timer
tags question: http://stackoverflow.com/q/25245518
tags question: http://stackoverflow.com/q/25300230
type: Tag
tags question: http://stackoverflow.com/q/25300923
tags question: http://stackoverflow.com/q/25308169
tags question: http://stackoverflow.com/q/25271951
tags question: http://stackoverflow.com/q/25242761
tags question: http://stackoverflow.com/q/25368930
tags question: http://stackoverflow.com/q/25324846

http://stackoverflow.com/q/25306378
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
answer count: 0
type: UnansweredQuestion
downvote count: 0
score: 1
has title: Flash SWF Banner rotating issue
type: Question
tagged with: banner
tagged with: flash
tagged with: javascript
has body: I am having problems with my code in letting my three SWF banners to rotate through, currently it just shows one banner on each page refresh where as I want it to go through all three SWF banners one after the other on the page. Current code below: Any help would be great, thank you!
upvote count: 1

http://stackoverflow.com/comment/39441307
comment on: http://stackoverflow.com/a/25304674
score: 0
type: Comment
has text: @AijuThomasKurian...just apply breakpoint below "Flist" according to my answer and see it has proper list or not???
type: AnswerComment

http://stackoverflow.com/q/25371945
tagged with: javascript
tagged with: ckeditor
tagged with: inline-editing
score: 0
has body: I can make a TD inline editable with CKEditor by using this: CKEDITOR.dtd.$editable.td = 1 CKEDITOR.inline('td_id'); It works in FireFox and Chrome. In IE10 the toolbar appears when I click the TD, but the text cursor doesn't. So it's not possible to edit. I know TD is not supported by CKEditor. Any hacks anyone?
answer count: 1
has title: Inline editing TD with CKEditor in IE10
has answer: http://stackoverflow.com/a/25487118
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25487118
type: Question

http://stackoverflow.com/comment/95109488
type: AnswerComment
has text: I guess it depends on where you start counting from - but given the stated assumptions - this pulls out those parts of the expression that should be performed first. I.e. the most deeply nested expressions.
comment on: http://stackoverflow.com/a/54027102
type: Comment
score: 0

http://stackoverflow.com/q/25298203
accepted answer: http://stackoverflow.com/a/25299900
type: Question
tagged with: angularjs-service
answer count: 1
tagged with: javascript
score: 0
has body: I have a App module that has many component modules that are injected into the App module. The App module has a provider that I would like to use inside of the component modules, but I am receiving an injector error: Error: $injector:modulerr Module Error Here is what I am trying var App = angular.module('App', [ 'ngRoute', 'Blog', 'Media', 'Pages', ]); App.provider('Core', function() { this.baseDirectory = '/test'; this.$get = function() { var baseDirectory = this.baseDirectory; } }); App.config(['$routeProvider', 'CoreProvider', function($routeProvider, CoreProvider) { $routeProvider .when(CoreProvider.baseDirectory + '/admin', { templateUrl: baseUrl + '/backend/scripts/angular/index.html' }) .otherwise({ template: "" }); }]); All of the above code works, its when I try to use the CoreProvider inside of another module, such as Blog (has been injected into App module) var Blog = angular.module('Blog', ['ngRoute']); Blog.config(['$routeProvider', 'CoreProvider', function($routeProvider, CoreProvider) { $routeProvider .when(CoreProvider.baseDirectory + '/admin/blog', { templateUrl: CoreProvider.baseDirectory + '/blog/blog.html', controller: 'BlogController' }); }]); I receive the error Error: $injector:modulerr Module Error and the Angular docs state that this error occurs when a module fails to load due to an exception. Why can't I use CoreProvider inside of my Blog module?
has comment: http://stackoverflow.com/comment/39428718
has comment: http://stackoverflow.com/comment/39428689
has title: AngularJS why can't I use share a provider with another module?
has answer: http://stackoverflow.com/a/25299900
tagged with: angularjs
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39428736

http://stackoverflow.com/comment/39404491
type: AnswerComment
comment on: http://stackoverflow.com/a/25276055
type: Comment
has text: @Celine Then please, consider accepting my answer if it was of any help.
score: 0

http://stackoverflow.com/q/25360455
tagged with: jquery
answer count: 3
has answer: http://stackoverflow.com/a/25360511
has body: I am novice in Jquery. I want change label text when input box is changed. I have input box with name email. When input box is changed I want to set label text to: Send copy to my mail: mail@example.com Send copy to my mail I have this Jquery code: $(function () { $("#email").keyup(function () { var email = $("#email").val(); $("label[for='sendCopy']").val('Send copy to my mail: ' + email); }); }); but when keyup function is triggered label is changed right, but inner input is deleted. Send copy to my mail mail@example.com I hope you understand my problem.
has answer: http://stackoverflow.com/a/25360530
has title: Jquery change label text with inner input
favorite count: 0
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25360511
possible better answer: http://stackoverflow.com/a/25360527
has comment: http://stackoverflow.com/comment/39542273
has answer: http://stackoverflow.com/a/25360527
type: Question
score: 5
upvote count: 5
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39468531
type: Comment
type: QuestionComment
has text: Have you tried using an IDE? Pretty much anything but IDLE, whether it's PyCharm or emacs tags-mode, is going to have some "find definition" routine full of complex regexps and heuristics far better than what you're going to hack up in a couple minutes.
score: 0
comment on: http://stackoverflow.com/q/25319196

http://stackoverflow.com/q/25343563
type: AnsweredQuestion
has title: HTML Upload Form Resetting After innerHTML change
score: 1
accepted answer: http://stackoverflow.com/a/25343612
has answer: http://stackoverflow.com/a/25343601
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/25343601
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has body: I have an upload form With javascript After i choose a file and then click the button, I get console result: 1 0 Or if i choose multiple files and click button I get console result result: 5 0 It appears that the form is resetting whenever I make a change to the innerHTML. is being reset. Workaround to this?
has answer: http://stackoverflow.com/a/25343612
favorite count: 0
upvote count: 1

http://stackoverflow.com/a/25357214
has body: There is a RunTime event for Application "ViewDeactivated". Give the view name in ObjectName.You could Invoke a DataValidationManager rule set from there and throw an error if user should NOT navigate out of the view. If this does not work, you will need to write eScript at Application level. On the Application_PreNavigate event, check for Application().ActiveViewName() and do the validation here and RaiseErrorText. Or invoke the DVM from here. The PreNavigate event should work because it is triggered before the View is unloaded.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25351621

http://stackoverflow.com/q/25353557
type: AnsweredQuestion
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: three.js
has body: I am trying to understand this: The first Three.js example with a spinning 3D cube spins faster and faster every time it is re-initialized. The code has an init function that sets up the scene and an animate function that starts the animation loop. If I repeatedly call init and animate, I expect the cube to reset completely but instead the cube is spinning faster and faster every time it it re-initialized. Why is this happening? Isn't the object being properly re-initialized? Is it a feature of three.js or JavaScript? Here is a JS Fiddle that shows the what I'm talking about. I have set it up to re-initialize every two seconds: http://jsfiddle.net/1hq2esLr/ (tested in Firefox and Chrome) Here is the full code: var camera, scene, renderer, geometry, material, mesh; function init() { scene = new THREE.Scene(); camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 10000 ); camera.position.z = 1000; geometry = new THREE.BoxGeometry( 200, 200, 200 ); material = new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true } ); mesh = new THREE.Mesh( geometry, material ); scene.add( mesh ); renderer = new THREE.WebGLRenderer(); renderer.setSize( window.innerWidth, window.innerHeight ); // render-aread is just a &lt;div id="render-area"&gt;&lt;/div&gt; var renderarea = document.getElementById('render-area'); // Remove all existing nodes. while (renderarea.firstChild) { renderarea.removeChild(renderarea.firstChild); } renderarea.appendChild( renderer.domElement ); } function animate() { requestAnimationFrame( animate ); render(); } function render() { mesh.rotation.x += 0.01; mesh.rotation.y += 0.02; renderer.render( scene, camera ); } // Calling this function repeatedly increases the speed of the spinning cube. // Global variable problem? function start() { init(); animate(); }
has answer: http://stackoverflow.com/a/25353621
has title: Three.js 3D cube spins faster and faster when re-initializing
upvote count: 1
accepted answer: http://stackoverflow.com/a/25353621

http://stackoverflow.com/a/25367400
accepted answer of: http://stackoverflow.com/q/25364405
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25364405
score: 1
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39581649
has body: After performing a .remove() your record should be removed from your grid automatically. But -- if you want to reload the store after your save then just add a save listener to your store and fire .load() : listeners: { save: function(store, batch, data) { store.load(); } } http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.data.Store-event-save

http://stackoverflow.com/a/25325921
has body: Any JS/jQuery code should be wrapped in pagecreate event. It is equivalent to .ready(), however, it is emitted on page fragments upon creating them and only once per page. Moreover, this event can be delegated to be bound to specific pages based on their id or any other selector. $(document).on("pagecreate", ".selector", function () { /* code */ });
accepted answer of: http://stackoverflow.com/q/25311856
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39479901
answers question: http://stackoverflow.com/q/25311856
upvote count: 1

http://stackoverflow.com/q/25349961
tagged with: http://stackoverflow.com/tag/html
has body: I am currently trying to display images dynamically based on two values being returned from the database I am querying. These values are: imageName = img1 fileType = jpg I have a simple version which pulls out the correct data displaying the image and fileType correctly using a php echo command. However, when I try adding the same variables to a html img tag it doesn't work? I am wanting the end result to be something like the following: echo " &lt;img src=\"images/profile/" . $info['imageName'] . "." . $info['fileType'] . \" width=\"100\" height=\"100\"&gt;\n"; Any known how I could achieve this?
has answer: http://stackoverflow.com/a/25349992
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25350006
type: Question
has answer: http://stackoverflow.com/a/25350010
possible better answer: http://stackoverflow.com/a/25349992
tagged with: javascript
has answer: http://stackoverflow.com/a/25350006
has title: Dynamic image display based up on two values from database
score: 0
answer count: 3

http://stackoverflow.com/a/25336203
upvote count: 1
score: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25335870
has body: If prototype is shared between all instances, how a prototype property works? An object's Prototype is only accessed when resolving property names to get property values. When assigning to a property, only the object itself is checked. &gt; function Foo() {} &gt; &gt; Foo.prototype.property = 1; &gt; &gt; var a = new Foo(); var b = new Foo(); &gt; &gt; a.property = 50; &gt; &gt; console.log(b.property) // why this line shows 1? That line shows 1 because when doing the assignment: a.property = 50; the object a is checked for a property named property and, since it doesn't have one, it's added and initialised with a value of 50. Then when you do: console.log(b.property) // why this line shows 1? The object b doesn't have a property property so it's Prototype is checked and the property is found there with a value of 1, so that is returned. If it's not shared, what's the difference between a prototype property and a constructor property in memory? Your term "constructor property" should really be "instance property". Properties on the prototype are only accessed when getting a value, then are never accessed when setting a value. How this two different ways works in memory? They are separate things, in one case you have created a property on the constructor's prototype and in the other a property on the object itself. How it "works in memory" is up to the browser author and really of no concern. Which one uses more memory and why? That's irrelevant really. Even if there was a difference, it would be tiny and insignificant in the scheme of things. When I create a method in prototype it makes sense to me that it is shared between all instances, I think I'll have only one method loaded in memory, but I can't understand how a property works. "Methods" are just properties too. You access them by reading the value, the same as reading the value of any property on an Object or its Prototype chain. But when you assign to an Object property, it is placed directly on …

http://stackoverflow.com/comment/40370312
type: AnswerComment
comment on: http://stackoverflow.com/a/25808323
score: 0
type: Comment
has text: Take a closer look. The Windows Phone 8.1 is also using JavaScript. The JavaScript is being loaded through a browser control. This is how is was done in WP8. WP8.1 JavaScript apps do basically the same thing but just hide c# the browser code.

http://stackoverflow.com/a/25357814
has comment: http://stackoverflow.com/comment/39537425
answers question: http://stackoverflow.com/q/25357724
score: 1
has body: Change your script section: Enjoy ;)
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39542423
has comment: http://stackoverflow.com/comment/39538196
accepted answer of: http://stackoverflow.com/q/25357724
has comment: http://stackoverflow.com/comment/39537545
has comment: http://stackoverflow.com/comment/39537505

http://stackoverflow.com/q/25311856
linked to: http://stackoverflow.com/q/20457195
possible better answer: http://stackoverflow.com/a/25314055
has comment: http://stackoverflow.com/comment/39459029
tagged with: jquery-mobile
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/39458571
score: 2
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/39453681
favorite count: 0
has comment: http://stackoverflow.com/comment/39459347
has answer: http://stackoverflow.com/a/25325921
tagged with: coldfusion
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/25314055
accepted answer: http://stackoverflow.com/a/25325921
has body: I have a page that is using jQuery 1.11.1, the jQuery Validation plugin 1.12.1, jQuery Mobile 1.4.2, and ColdFusion 9.0.1. (I think the ColdFusion part is irrelevant to my issue though.) On this page I have a form that submits to itself for server-side validation. Initially, on the first load of the page, the form and validation all work as I expect. If the form is submitted with valid input it also works as I expect. If, however, the form is submitted with invalid input then I attempt to expand the collapsed collapsible in order to show the validation error message. This part does not work - the collapsible is not expanded and the following JavaScript error is thrown: cannot call methods on collapsible prior to initialization; attempted to call method 'expand' Once I receive this error then other features stop working as well. For example, the Cancel button can no longer collapse the collapsible. The validation messages no longer have my custom UI and fall-back to defaults, etc. I'm assuming the I need to somehow bind/delay my attempt to expand the collapsible to something when the page reloads but what? Below is a self-contained example of my issue (written in CFML). Notice on the first load that you can expand the collapsible and collapse the collapsible using the Cancel button. Also notice the UI if you attempt to submit the form without entering any text. Then enter some text and submit the form. Upon reload you will see that the collapsible is not expanded initially. You will also see that the Cancel button no longer collapses the collapsible and that the UI of the validation messages has fallen back to defaults. Test Example Header Show Info Here Some additional information here... CC form submitted. Form text = [ #form.ccname# ] EFT form submitted. Form text = [ #form.eftname# ] Choose one of the payment methods below. Credit Card Payment cc info here Text: Cancel EFT Payment eft info here Text: Cancel Close Processing your payment. Please be patient and do …
has comment: http://stackoverflow.com/comment/39456287
has comment: http://stackoverflow.com/comment/39459979
has comment: http://stackoverflow.com/comment/39459310
type: Question
has title: How to handle jQuery error after form is submitted to itself
has comment: http://stackoverflow.com/comment/39459214

http://stackoverflow.com/comment/39525255
comment on: http://stackoverflow.com/a/25350639
has text: @user3324788 I tried something similar (running a main method from a JSP), and it worked. Can you edit your question with the full code of the JSP with the changes I suggested? Perhaps you have some syntax error somewhere.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39436466
score: 0
comment on: http://stackoverflow.com/a/25302441
type: AnswerComment
has text: He didn't tagged jQuery means just javascript only.
type: Comment

http://stackoverflow.com/q/25378854
type: AnsweredQuestion
tagged with: c#
has title: Bundled Javascript, how do I inspect that bundles have loaded correctly on the browser, and check the contents
has comment: http://stackoverflow.com/comment/39577426
score: 1
has comment: http://stackoverflow.com/comment/39577520
has body: I am working on Bundling js files using .NET 4.5 bundling System.Web.Optimization; on WebForms. I have managed to add files to BundleTable successfully, however they don't seem to appear on web page itself. I am able to see bundle specified in Sources Tab on Google Chrome but it is empty, and scripts are failing to load. I must be missing something here, how do I inspect that bundles have loaded correctly on the browser, and check the contents. Not that I think it matters, but to prevent avalanche of downvotes. Global.ascx protected void Application_Start(object sender, EventArgs e) { BundleConfig.RegisterBundles(BundleTable.Bundles); } BundleConfig.cs namespace OnTheMoveOffline.Framework.App_Start { public class BundleConfig { public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/OnTheMoveWebFiles/bundles/development").Include("~/OnTheMoveWebFiles/js/*.js")); var resolver = new BundleResolver(bundles); List&lt;string&gt; cont = resolver.GetBundleContents("~/OnTheMoveWebFiles/bundles/development").ToList(); Debugger.Break(); } } } Master &lt;%: System.Web.Optimization.Scripts.Render("~/bundles/development") %&gt;
type: Question
upvote count: 1
tagged with: bundling-and-minification
answer count: 1
tagged with: javascript
tagged with: .net-4.5
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/25378986
accepted answer: http://stackoverflow.com/a/25378986
has comment: http://stackoverflow.com/comment/39577476
downvote count: 0

http://stackoverflow.com/comment/39593768
type: Comment
comment on: http://stackoverflow.com/q/25386613
type: QuestionComment
score: 0
has text: I see no need for a `complete` option within `remote`. This is something the plugin handles internally.

http://stackoverflow.com/a/25273853
score: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39383573
downvote count: 0
has comment: http://stackoverflow.com/comment/39383528
answers question: http://stackoverflow.com/q/25273764
type: Answer
accepted answer of: http://stackoverflow.com/q/25273764
upvote count: 2
has comment: http://stackoverflow.com/comment/39383485
has body: var $content = $('#content'); var intervalId = setInterval(function(){ if(!$content.is(':empty')){ //do stuff clearInterval(intervalId); } }, 1000); Just note that elements that contains only text nodes considered to be non empty by the spec:
has comment: http://stackoverflow.com/comment/39383416

http://stackoverflow.com/q/25232982
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: backbone.js
has title: Backbone Fetch Related Models
accepted answer: http://stackoverflow.com/a/25236715
type: AnsweredQuestion
has body: I'm working on a Backbone app, but everything I've read so far is either about displaying a list of items (a TODO list for example) or a single item. Right now I have users, each user has a list of skills (pretty much like any game). I can easily get all users or a single user, the same for the skills but what if I want to get all the skills for a given user? How would I do that? I thought about just adding a property to the users with a new instance of a collection, something like this: var Users = Backbone.Model.extend({ skills: new Skills({ user: this }) }); var Skills = Backbone.Collection.extend({ model: Skill, url: '/someUrl', initialize: function (options) { // fetch all skills from an user this.fetch({ data: { user: options.user.get('id') } }); } }); But I don't have much experience with Backbone and I don't really like the idea of that, also the request would look something like /someUrl?user=1 which I'd rather avoid, /someUrl/user/1 would be much better. I've also noticed BackboneRelational but I haven't really tried it, it seems a bit of an overkill for my problem, but maybe I'm wrong. What approach should I take to fetch all of my users skills? Thanks in advance.
upvote count: 1
type: Question
score: 1
has answer: http://stackoverflow.com/a/25236715

http://stackoverflow.com/a/25319475
type: Answer
score: 6
answers question: http://stackoverflow.com/q/25319457
downvote count: 0
has body: When you delete 88, the 56 following it moves up one position, and your loop skips it (it just does i++). You need to be careful when updating an array while iterating over it. You could iterate the array backwards in this case (start at the end, do i--). Depending on how splice is implemented, this could even be a bit faster (potentially fewer array elements are getting copied around).
upvote count: 6

http://stackoverflow.com/comment/72784657
has text: I've found that polymer ^1.5 doesn't populate the `event.model.xxx` variable even though the documentation clearly states it should. I found the iterating variable tucked in private api `event.model._config.xxx`
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/28187332

http://stackoverflow.com/comment/39330469
type: AnswerComment
has text: OK. What need I is a fiddle with a lot more data to test. For sure a cache will sort the problem, but that cache needs to be a little more complex than that, that your propose. If you want me to make it work as fast as it can, and I'm confident I can make big speed changes, put more html table data in the fiddle, and i'll work some magic.
type: Comment
comment on: http://stackoverflow.com/a/25243379
score: 0

http://stackoverflow.com/comment/39412919
type: Comment
type: QuestionComment
has text: Have you checked for errors in the developer console?
score: 1
comment on: http://stackoverflow.com/q/25290017

http://stackoverflow.com/a/31064831
accepted answer of: http://stackoverflow.com/q/25304457
answers question: http://stackoverflow.com/q/25304457
has body: I found a way to do this. Please check my blog here. I encoded the ByteArray to a BASE64 string and passed it to the node.js server. I can't send data as binary to the server. BUt converting it to BAse64 worked for me. I have documented what i have done in here.
score: 1
upvote count: 2
type: AcceptedAnswer
downvote count: 1
type: Answer

http://stackoverflow.com/comment/72432625
comment on: http://stackoverflow.com/q/25314979
has text: I asked this question a long time ago and looking back at it I'm not sure it's that valuable. If your method is short, with an obvious name, and in a meaningful object/namespace there should not be a lot of confusion about what it's doing. A traditional clue for side-effects has been that a method takes an argument but does not return anything. However if the language always returns the last expression that logic can't be used. So you should rely on a name that clearly shows action `function doSomethingDangerous`.
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/a/25390364
downvote count: 0
answers question: http://stackoverflow.com/q/25383855
type: Answer
has comment: http://stackoverflow.com/comment/39648974
score: 1
upvote count: 1
has body: To echo one of Xan's comments above, Chrome App windows are not browser windows. As they have no cookies or history of any kind, they are inherently incognito. Caching is for performance, so the HTML processor probably does caching, but I would think that caching isn't much of a privacy issue.
has comment: http://stackoverflow.com/comment/39603627

http://stackoverflow.com/q/25384970
answer count: 1
tagged with: url
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25385016
has body: The issue is simple - i have a set hidden blocks with information that are only available when user clicks on certain link on the page. This link's href is calling a javascript (javascript:selBlock('P2', 'P1', 'P3', 'P4');) which shows and hids several blocks with corresponding IDs. I need to specify a link that will open up the page and run the specified javascript function with predefined parametres. I need to do that exactly inside the url and without any changes to the code that this page is using (which i have no access to). Here is an example: The page has a block which shows 1-room flats (their images, costsm params and etc.) or 2-room flats or 3-room flats depending on which link was used. There is a campaign (AdWords) that has 3 campaigns one per each flat type. All of them are leading to the same page. I need to specify an url for each of the campaign links that will lead to the page and run javascript that corresponds to 1 or 2 or 3 room flats info block, so that user will get exactly what he is looking for without the need to do additional clicks. As i said - i have no access to the page's code and page's owner refuses to do any changes to it's code, yet he demands from me the exact functionality i've written above. Any advices on how to do that? Or info on why this should not/cannot be done?
type: Question
has title: How to specify an url with a javascript function in it?
tagged with: hyperlink
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39470440
score: 0
has text: Glad I was not the only one asking this question lol
comment on: http://stackoverflow.com/q/25320795
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39337111
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25240755
has text: @AshutoshVerma - where does `fileService.uploadDocument()` come from? Can you point me to some documentation for that because I want to know if it already can make a promise for you.

http://stackoverflow.com/comment/39453201
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25311317
has text: How to set time of mouseenter ?

http://stackoverflow.com/q/25367230
upvote count: 18
has comment: http://stackoverflow.com/comment/39555201
possible better answer: http://stackoverflow.com/a/41704389
type: Question
linked to: http://stackoverflow.com/q/15802100
has comment: http://stackoverflow.com/comment/39555557
tagged with: javascript
has comment: http://stackoverflow.com/comment/39556108
tagged with: jquery
has comment: http://stackoverflow.com/comment/39555579
has comment: http://stackoverflow.com/comment/39555462
has body: For a web application I'm building privacy is very important and so is the format users input their data. To help with this I have inserted a jquery library that will help mask the fields http://igorescobar.github.io/jQuery-Mask-Plugin/ However, I seem to be having trouble masking social security numbers. For instance, the format is coming through nicely 567-78-7890, but I can't seem to figure out how to mask or hide those first four numbers... like *--7890. My html is just an input field &lt;input class='social' /&gt; and with this plugin I have tried masking it as $('.social').mask('000-00-0000'); This is just providing formatting $('.newsocial').mask('xxx-xx-0000'); This will just replace the numbers they have entered with x's. I have also set up a jsFiddle to help http://jsfiddle.net/w2sccqwy/1/ Any help would be wonderful! P.S. I cannot use a password field because the last four numbers have to be shown to the user and I cannot have more than one field. This is a company requirement. I cannot change a company requirement as much as I want to.
has answer: http://stackoverflow.com/a/44809603
has answer: http://stackoverflow.com/a/60424501
has answer: http://stackoverflow.com/a/79475238
has comment: http://stackoverflow.com/comment/39555794
has comment: http://stackoverflow.com/comment/39555324
has answer: http://stackoverflow.com/a/25367615
has comment: http://stackoverflow.com/comment/39555486
answer count: 7
has comment: http://stackoverflow.com/comment/39555177
has comment: http://stackoverflow.com/comment/39555770
has answer: http://stackoverflow.com/a/41704389
favorite count: 0
has comment: http://stackoverflow.com/comment/39555707
has comment: http://stackoverflow.com/comment/39555234
has comment: http://stackoverflow.com/comment/39555350
has comment: http://stackoverflow.com/comment/82999511
linked to: http://stackoverflow.com/q/25730779
has comment: http://stackoverflow.com/comment/39555227
has comment: http://stackoverflow.com/comment/39555388
has comment: http://stackoverflow.com/comment/39555207
has comment: http://stackoverflow.com/comment/39555435
has comment: http://stackoverflow.com/comment/39555632
has comment: http://stackoverflow.com/comment/39555500
has comment: http://stackoverflow.com/comment/39556037
accepted answer: http://stackoverflow.com/a/25385399
has title: Masking a social security number input
downvote count: 1
has comment: http://stackoverflow.com/comment/39555128
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39555397
has answer: http://stackoverflow.com/a/52321382
has comment: http://stackoverflow.com/comment/39555681
has comment: http://stackoverflow.com/comment/39555556
has comment: http://stackoverflow.com/comment/39555242
score: 17
has answer: http://stackoverflow.com/a/25385399

http://stackoverflow.com/a/25268906
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25268514
has body: OK, I literally hate myself for saying this (grin) because this type of question is almost always the lead-in to using the wrong pattern to do something more sophisticated in AngularJS. BUT, since it does get asked a lot, this does totally work: http://plnkr.co/edit/XnT5tGjeDUVGHJ3pzFpc?p=preview var entries = []; angular.forEach($elem.children()[1].children, function(tr) { var entry = []; angular.forEach(tr.children, function(td) { entry.push(td.innerHTML); }); entries.push(entry); }); console.log(entries); There's nothing really Angular-ish about this. $elem is just a lightweight wrapper around the HTML element for the table. It's HTML5 so there's a &lt;thead&gt; element followed by a &lt;tbody&gt;, which the first forEach follows down the chain to get each &lt;tr&gt; - the children of the &lt;thead&gt;. The inner
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/25268514

http://stackoverflow.com/comment/39489118
has text: @Derek朕會功夫 I literraly copied and pasted his code. There must be something else I'm doing wrong. I am a complete nob with jQuery too. Im sorry about my lack of ability with it.
comment on: http://stackoverflow.com/a/25329782
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/25371305
has title: Steam API Key in Client-Side JavaScript
tagged with: javascript
has comment: http://stackoverflow.com/comment/39563767
has body: Recently I have created a Steam app, using the Steam API, which requires the Steam Key to use to any large extent. My application is written completely using client-side JavaScript and needs to have the key put in there somehow. However Steam forbids the user from posting his API in a public place, and I believe that the source code is public. Is there anyway of encoding it, so there is no way to get the normal key, yet still keep the functionality of putting it in a call to a website (for example www.example.com/?api=key). An example I have been looking at is encoding it into base 64, but I'm not sure if this fulfills the privacy required. The code for this is: alert(btoa("key")); After that I paste in the alert message I got in an example of var api=atob("key"); This hides the key from plain site, but it can be easily decoded using something like alert(atob("key")); Is there a library I can use, or some way that does not need server side JavaScript (such as node.js) to do this.
has answer: http://stackoverflow.com/a/55196666
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39563457
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39563826
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39563446
tagged with: steam
type: Question

http://stackoverflow.com/a/25289866
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39422765
has body: tb_remove() returns false so the form would not submit. You need to add a click handler to "Add to Cart" that runs tb_remove() and also returns true. Since you're submitting the form in an iframe, you need to make sure the "post" fires before removing the iframe from the document. For usability, it would be nice to also have a message saying your product was added to the cart when the thickbox closes.
has comment: http://stackoverflow.com/comment/39487868
upvote count: 1
answers question: http://stackoverflow.com/q/25287785
type: Answer

http://stackoverflow.com/comment/39460343
comment on: http://stackoverflow.com/q/25315460
type: Comment
type: QuestionComment
score: 0
has text: What returns `$("select[name='send_volume'] > option[value="+ send_volume_value +"]").length` ?

http://stackoverflow.com/q/25243792
has comment: http://stackoverflow.com/comment/39326998
possible better answer: http://stackoverflow.com/a/25243892
has answer: http://stackoverflow.com/a/25244630
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25243840
tagged with: javascript
has body: Hey guys I have this jQuery content toggle setup here: http://jsfiddle.net/DTcHh/848/ I am trying to remove the class for the span that contains the plus glyphicon and replace it with the minus glyphicon when the content is visible. Here is my jQuery: $(document).ready(function () { $('#toggle-view li').click(function () { var text = $(this).children('div.panel'); if (text.is(':hidden')) { text.slideDown('200'); $(this).children('span').html('-'); } else { text.slideUp('200'); $(this).children('span').html('+'); } }); }); Here is my HTML: Title 1 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. I have tried implementing this code to try and remove the plus glyph and replace it with the minus glyph however I can't get it to work: $(this).children('span')removeClass(glyphicon glyphicon-plus glyph-plus-toggle).addClass(glyphicon glyphicon-minus glyph-minus-toggle); Any idea where I am going wrong? Thanks :)
has comment: http://stackoverflow.com/comment/39327334
score: 0
answer count: 3
has title: Remove class add class issue
has answer: http://stackoverflow.com/a/25243892
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25243840
has comment: http://stackoverflow.com/comment/39326980

http://stackoverflow.com/comment/39426986
type: Comment
comment on: http://stackoverflow.com/a/25296091
type: AnswerComment
has text: I want to get 206e608ecaf23a9575ca81a86e3afd72eca243a0 value by hash_hmac function
score: 0

http://stackoverflow.com/comment/39570645
comment on: http://stackoverflow.com/a/25374889
type: AnswerComment
score: 0
has text: I have a form which is posted with the values and I get the result based on that value.... So if number is less than 25 it should be multiplied with 0.90 and then posted. So it means the result I get will be based on the value I submitted after multiplying with 0.90 which I am not getting. So it means that form is being submitted with the original value
type: Comment

http://stackoverflow.com/comment/39314727
comment on: http://stackoverflow.com/q/25236975
score: 0
type: Comment
type: QuestionComment
has text: Hope the below site helps you. http://stackoverflow.com/questions/16507222/create-json-object-dynamically-via-javascript-without-concate-strings

http://stackoverflow.com/q/25315283
accepted answer: http://stackoverflow.com/a/25315336
has answer: http://stackoverflow.com/a/25315682
tagged with: php
has body: I need to add some text to a URL bar without deleting what's already there(as I've mentioned in the title). Basically, I have eight or so hashes(/one/, /two/, /three/, etc). I have to add these to the URL bar without deleting the previous hashes that are already in there. For example, I could have a button that adds "/two/" to the URL, but what if "/one/" is already there? I need it to make it so that it just adds the new hash after the one one, like this - "/one/two/three/". I've tried using Hide "one" and Hide "two" , but unfortunately when I use the second one after the first, it just replaces "/one/" with "/two/". Any suggestions would be great. Let me know if I need to provide some more context, I'm not quite sure what's relevant to this question in my code. Thanks in advance, guys!
has comment: http://stackoverflow.com/comment/39459937
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25315682
has title: Adding to/editing the URL bar of a webpage without deleting what's already there.
has answer: http://stackoverflow.com/a/25315336
type: Question
answer count: 2
tagged with: url
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/27235187
answers question: http://stackoverflow.com/q/25247410
score: 0
has body: The order of the dependecies are: 1. Then write your code and after it add 2. Note: The versions can variate
type: Answer

acrobat
type: Tag
tags question: http://stackoverflow.com/q/25323427
tags question: http://stackoverflow.com/q/25247485
tag name: acrobat
tags question: http://stackoverflow.com/q/25380882

http://stackoverflow.com/comment/52937466
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25259210
has text: Apparently there are flags to make IonMonkey [produce more logs](https://wiki.mozilla.org/IonMonkey#Debugging) that only work in debug builds. There's a ticket to [enable them in optimized builds](https://bugzilla.mozilla.org/show_bug.cgi?id=1094150). Still not sure how you would set these from Firefox though.
type: Comment

http://stackoverflow.com/q/25387897
has comment: http://stackoverflow.com/comment/39595286
tagged with: css
has comment: http://stackoverflow.com/comment/39594756
possible better answer: http://stackoverflow.com/a/25388094
favorite count: 0
has title: How can I skew one side of a div and then replicate it and skew a different side?
has body: Suppose I have a div: div { height: 100px; width: 500px; background: blue; margin: 0 auto; } And I want it to become two mode - skew to each side - Here is the base form - http://jsfiddle.net/urielz/neybabgj/ How could I get the above two forms? Update : If it required using JavaScript - do it.
has comment: http://stackoverflow.com/comment/39594570
upvote count: 1
has answer: http://stackoverflow.com/a/25388224
has comment: http://stackoverflow.com/comment/39594875
type: AnsweredQuestion
tagged with: skew
score: 1
has comment: http://stackoverflow.com/comment/39594547
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39594776
accepted answer: http://stackoverflow.com/a/25388224
linked to: http://stackoverflow.com/q/22069704
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39594631
has answer: http://stackoverflow.com/a/25388094
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/16748387

http://stackoverflow.com/q/25273017
has comment: http://stackoverflow.com/comment/39381772
has answer: http://stackoverflow.com/a/25273236
answer count: 2
possible better answer: http://stackoverflow.com/a/25273129
upvote count: 0
has comment: http://stackoverflow.com/comment/39381935
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25273129
has comment: http://stackoverflow.com/comment/39381727
has comment: http://stackoverflow.com/comment/39381699
downvote count: 1
has body: I am trying to accomplish a 'simple' jQuery effect. When an user loads their dashboard, and they have a specific id (#) in the url, the dashboard should load the content assigned to that specific id. Here is what I have so far: var pathname = window.location.hash.substr(1); if(pathname = loadextra){ $('.loadextra').addClass('active'); $('.load-fixed').removeClass('active'); $('.fixed-ads').hide(); $('#loader').show().html('&lt;div class="typing_loader_holder"&gt;&lt;div class="typing_loader"&gt;&lt;/div&gt;&lt;/div&gt;'); setTimeout( function() { $('#loader').hide(); $('.extra-ads').show(); }, 2000); }elseif(pathname = loadfixed){ $(this).addClass('active'); $('.load-extra').removeClass('active'); $('.extra-ads').hide(); $('#loader').show().html('&lt;div class="typing_loader_holder"&gt;&lt;div class="typing_loader"&gt;&lt;/div&gt;&lt;/div&gt;'); setTimeout( function() { $('#loader').hide(); $('.fixed-ads').show(); }, 2000); }else{ //do nothing } So, imagine an user goes to: http://website.com/user#loadextra then the code inside if(pathname = loadextra){} should be fired off - same goes for #loadfixed Although, as it is now, if you just goes to http://website.com/user, then if(pathname = loadextra){} is fired of. Why doesn't the if/elseif/else statement work in my code?
accepted answer: http://stackoverflow.com/a/25273236
type: Question
has title: jQuery - get id of url and do something (if/else)
tagged with: javascript
score: -1

http://stackoverflow.com/a/25316279
accepted answer of: http://stackoverflow.com/q/25315979
has body: You can set the location by running the following command. npm config set prefix /usr/local
answers question: http://stackoverflow.com/q/25315979
type: AcceptedAnswer
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/25274220
type: AcceptedAnswer
downvote count: 0
score: 4
type: Answer
has comment: http://stackoverflow.com/comment/39384190
answers question: http://stackoverflow.com/q/25273501
has body: jQuery in WordPress runs in noConflict mode which means the global $ shortcut for jQuery isn't available. Replace your code with the following: jQuery(document).ready(function($) { alert( 'ready!' ); }); Inside the document ready wrapper the $ can be used as an alias for jQuery.
upvote count: 4
accepted answer of: http://stackoverflow.com/q/25273501

ng-grid
tags question: http://stackoverflow.com/q/25365711
type: Tag
tag name: ng-grid
tags question: http://stackoverflow.com/q/25253204

http://stackoverflow.com/q/25346329
tagged with: javascript
has comment: http://stackoverflow.com/comment/39517076
score: 0
linked to: http://stackoverflow.com/q/6047582
has comment: http://stackoverflow.com/comment/39517177
has body: I often define an array like this: var arr = new Array(); But when my PM saw my code, my PM said that I should define an array like this: var arr = []; and it will be more efficient. I find that there is another defined way var arr = ();? What is the difference between them and which way do you often use?
has title: Which way is best to define a JavaScript array?
duplicate of: http://stackoverflow.com/q/6047582
answer count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/2280285
type: Question
has comment: http://stackoverflow.com/comment/39517062
has comment: http://stackoverflow.com/comment/39517048

http://stackoverflow.com/a/25283374
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25282502
answers question: http://stackoverflow.com/q/25282502
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39535437
has comment: http://stackoverflow.com/comment/39535425
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/39402211
has comment: http://stackoverflow.com/comment/39401273
has body: Instead of using jQuery for finding the value of the input, I would suggest you to use model a field of the event handler argument e. So you should do: &lt;script&gt; function onEdit(e) { if (e.model.IsAllocated) { this.closeCell(); } } &lt;/script&gt; See it in action here: http://jsfiddle.net/OnaBai/ry82wcvc/
score: 3

http://stackoverflow.com/comment/39359255
type: Comment
has text: I think my answer is the correct solution to the problem and the selected answer is not, as it did not work. I think my answer should be chosen as it solves the problem correctly, works and explains the issues the OP was having.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25252361

http://stackoverflow.com/q/25319017
tagged with: ruby
linked to: http://stackoverflow.com/q/25277496
tagged with: ruby-on-rails
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25325727
downvote count: 0
score: 1
has body: I'm trying to let a user create Exercises with Equipment and Muscles in many-to-many relationships through their respective join tables( exercise_equipment, exercise_muscles ). I've gotten the form working for adding one equipment/muscle per exercise, but cannot figure out how to add a link to add another field to the form on the fly. I've checked out RailsCasts, this post, have asked it as a side question on a previous post of my own, but simply cannot get this functionality to work. I'm fairly new to Rails 4 and am still trying to learn Javascript, but I'd love a thorough explanation of how to set this up the Rails 4 way! My Models: # id :integer # name :string # is_public :boolean Exercise has_many :exercise_equipment has_many :equipment, :through => :exercise_equipment accepts_nested_attributes_for :exercise_equipment # id :integer # exercise_id :integer # equipment_id :integer # optional :boolean ExerciseEquipment belongs_to :exercise belongs_to :equipment accepts_nested_attributes_for :equipment # id :integer # name :string Equipment has_many :exercise_equipment has_many :exercises, :through => :exercise_equipment My Controller Methods: def new @exercise = Exercise.new @exercise.exercise_equipment.build @exercise.exercise_muscles.build end def create exercise = current_user.exercises.new( exercise_params ) if exercise.save! redirect_to exercise else render 'new' end end views/exercises/new.html.erb Create New Exercise <%= form_for @exercise do |f| %> <%= render 'form', f: f %> <%= f.submit "New Exercise" %> <% end %> views/exercises/_form.html.erb <%= f.label :name %> <%= f.text_field :name, autofocus: true %> <%= f.check_box :is_public %> Public <%= f.fields_for :exercise_muscles do |emf| %> <%= emf.collection_select :muscle_id, Muscle.all, :id, :name, { include_hidden: false } %> <% end %> <%= f.fields_for :exercise_equipment do |eef| %> <%= eef.collection_select :equipment_id, Equipment.all, :id, :name, { include_hidden: false } %> <%= eef.check_box :option…
type: Question
accepted answer: http://stackoverflow.com/a/25411994
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25411994
possible better answer: http://stackoverflow.com/a/25325727
tagged with: ruby-on-rails-4
upvote count: 1
linked to: http://stackoverflow.com/q/15568431
has title: How to Create Nested Forms in Rails 4
favorite count: 0

http://stackoverflow.com/comment/39502298
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25336666
type: AnswerComment
has text: i just realized i dont need to display the actual info just verify that its there. thanks to your help ive come up with this `var adb = require('adbkit'); var client = adb.createClient(); var Promise = require('bluebird'); function checkDevices(){ client.listDevices().then(function(devices){ if(devices != "") {alert('device detected')} else {alert('no device detected')} }) };`

http://stackoverflow.com/q/25351898
type: AnsweredQuestion
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/25353802
type: Question
tagged with: jquery-ui
tagged with: jquery-mobile
tagged with: javascript
has title: Dynamic navbar for mobile
has body: I'm doing a mobile App with jQuery mobile 1.4.3. I'm trying to build a navigation bar that changes dynamically, If the user has logged in the navigation bar will show 4 options, if not it will show 3 options. The problems: Once I click the bar some times it turns all blue. I'm sure I'm not using the correct code. The navigation bar disappears for some time when I click in a button. The blue click highlight is not persistent for the page click. What I need is a fixed navigation bar that smoothly changes pages when clicked :) http://jsfiddle.net/claire89/toxtcbhe/14/ var statusLogin = null; $(document).on('pagecontainershow', function (e, ui) { var myNavbar = null; if (statusLogin == null) { myNavbar = $(' Menu Sugestions History Settings '); $('.ui-content').append(myNavbar).trigger('create'); } else { myNavbar = $(' Menu History Settings ').appendTo('.ui-content'); $('.content').append(myNavbar).trigger('create'); } $("[data-role='navbar']").navbar(); $("[data-role='header'], [data-role='footer']").toolbar(); var activePage = $.mobile.pageContainer.pagecontainer("getActivePage"); var activePageId = activePage[0].id; switch (activePageId) { case 'listMenuPage': alert("listMenuPage"); break; case 'sugestionsPage': alert("sugestionsPage"); break; case 'settingsPage': alert("settingsPage"); break; case 'historyPage': alert("historyPage"); break; default: } });
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25353802
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/128993416
type: AnswerComment
has text: how can I wait for the next page load to automatically execute rest of the code from the console? adding eventListener add it to current page not next page
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25252594

http://stackoverflow.com/comment/39507172
comment on: http://stackoverflow.com/a/25340149
type: Comment
has text: Well, your function works great and does the job - but i was wondering if there was a way we could apply a function to all keys and run a different function if that function returns an error. For example, I'd like to apply this: keys.forEach(function(key){d[key] = parseInt(d[key], 10)}); but have it only work for the values that were string numbers and apply d[key]=d[key]||"None"; if there was an error.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39457535
type: AnswerComment
type: Comment
has text: @user3763877 please check the update question I did in my initial content, thanks
score: 0
comment on: http://stackoverflow.com/a/25313815

http://stackoverflow.com/comment/39465198
type: QuestionComment
has text: But it does not exclude '[' , ']' You can check it here: http://www.regexr.com/
comment on: http://stackoverflow.com/q/25317997
score: 0
type: Comment

http://stackoverflow.com/a/25240892
answers question: http://stackoverflow.com/q/25240222
type: Answer
has comment: http://stackoverflow.com/comment/39356602
has body: callback needs to be the name of the callback function. You should generate a unique one each time the function is called. You should use a second, different query string variable to determine what URI to fetch. var jsonp_counter = 0; function request_jsonp(url, callback){ jsonp_counter++; var callback_name = "jsonp_function_" + jsonp_counter; window[callback_name] = callback; var jsonp_url = 'http://www.myurl.com/myscript.php" + "?callback=" + encodeURIComponent(callback_name) + "&amp;url=" + encodeURIComponent(url); var script = document.createElement('script'); script.setAttribute('src', url); document.getElementsByTagName('head')[0].appendChild(script); } request_jsonp("filename.html", function (data) { do_something_with(data); });
score: 0

http://stackoverflow.com/a/71799126
has body: function canvas2pdf(){ var img =canvas.toDataURL(); var pdf = new jspdf.jsPDF(); pdf.addImage(img, 'JPEG', 0, 0); pdf.save('canvas.pdf'); }
score: 0
has comment: http://stackoverflow.com/comment/126889970
answers question: http://stackoverflow.com/q/25237146
type: Answer

http://stackoverflow.com/comment/39510126
score: 0
has text: @Matyas thank you very much for this, but i have a problem. how i can use the javascript to work with my current code?
type: Comment
comment on: http://stackoverflow.com/a/25341984
type: AnswerComment

http://stackoverflow.com/a/25252173
accepted answer of: http://stackoverflow.com/q/25251840
answers question: http://stackoverflow.com/q/25251840
has body: Currently, you defined $parent.myColor in order to save a value of the radio button. So if you want to be able to show the drop down based on the selected image, you can use ng-click on the img tag, as you already did, and assign the new value to it. {{key}} myColor: {{myColor}} mySize: {{mySize}} Try it yourself.
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/q/25297832
tagged with: google-chrome
has body: I would like to create a variable which do exactly the same as console.log and deactivate the original console.log. newLog('hello world'); // Should be displayed console.log('hello world'); // Should be ignored I found two ways: First one: var newLog = console.log; console.log = function() {}; Second: var newLog = console.log.bind(console); console.log = function() {}; The first one works with IE9 but not with Chrome. The second one works with Chrome but not with IE9. I didn't try on other browsers. Is there a way to get all browser working together without mixing solutions?
type: Question
has answer: http://stackoverflow.com/a/25297988
tagged with: internet-explorer-9
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: logging
has title: Define a new console.log and desactivate the orginal one

http://stackoverflow.com/a/25275043
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25274896
score: 1
has comment: http://stackoverflow.com/comment/39385675
has comment: http://stackoverflow.com/comment/39385575
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: If i understand you correctly you just need to dynamically build an array based on how many items were ordered, with each index [0,1,2,3,4...] In which case all you need is the one line below, and then to pass this new arr to your order.get call. var arr=[], arrayLength = order.get('fullOrderDetails').length; // this will make the arr --&gt;[0,1,2.. ] for (var i = 0; i &lt; arrayLength; i++) { arr.push(i); } // i pass it in below mandrill.sendEmail({ message: { text: "Your order: " + order.get('fullOrderDetails', arr) + "has been processed and we will notify you when your order has been dispatched!", subject: "Thank you for your order!", from_email: "order-confirmation@aStore.com", from_name: "aStore.com!", to: [ { email: order.get('email'), name: order.get('name') } ] }, async: true }, { success: function(httpResponse) { response.success(); }, error: function(httpResponse) { response.error("Uh oh, something went wrong"); } });
answers question: http://stackoverflow.com/q/25274896

http://stackoverflow.com/comment/39517993
type: Comment
has text: Thanks @Daniel :) . This works. Appreciate you updating my Plunker :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25345574

http://stackoverflow.com/a/25310855
has comment: http://stackoverflow.com/comment/39451909
answers question: http://stackoverflow.com/q/25310450
has body: CORS is a setting that must be modified on the server. It allows resources on a webpage to be requested by an external domain. Simply changing your code on the client will not change the functionality of CORS. The reason you can access a page from within a "script" tag, is because tags are treated differently than all other data for cross origin requests. In the old days, you could "hack" CORS onto your system using JSONP which stores JSON data inside of HTML tags. To enable CORS in Apache: First find your httpd.conf by typing ps -ef | grep apache Which will give you the location of Apache. Once you have found that type: <apache-location> -V Which will return the exact location of your httpd.conf like such: -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf" Now you need to go to httpd.conf and type "/" to search for <directory>. Once you find the tag, right after it type: Header set Access-Control-Allow-Origin "*" Save the file and confirm the syntax is correct by running: apachectl -t If that checks out, run the graceful restart command: apachectl -k graceful Once the server restarts, your files should now be accessible via external scripts. If you where not able to save the config due to an error, try exiting your editor and typing: sudo chmod 755 httpd.conf This gives the owner full access to the configuration file but everyone else can only read an execute it (http://en.wikipedia.org/wiki/Chmod). To test these changes, on an external server create a new index.html file and load it up with the following: TEST The resulting output should mirror the live data feed at yourwebsite.com/file.csv If loading up that html page shows no ouput, press f12 on firefox to open the developer's console. Most likely you will see an error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at yourwebsite.com/file.csv. This can be fixed by moving the resource to the same domain or enabling CORS. This means either a) your httpd.conf was not conf…
score: 4
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/39452004
downvote count: 0
has comment: http://stackoverflow.com/comment/39453880

http://stackoverflow.com/comment/39488461
type: AnswerComment
comment on: http://stackoverflow.com/a/25314027
type: Comment
has text: hi @jackrugile, thanks for replying! there is a pie chart at top of the page here: https://developers.google.com/chart/ and some other examples here: http://www.chartjs.org/ . If you hover/rollover you'll see what I mean. They all work well, but i'm just unsure how to split it horizontally or vertically :S
score: 0

http://stackoverflow.com/comment/39484341
comment on: http://stackoverflow.com/a/25327507
has text: @LorenzKlein This may help too. [Another run through of orbit](http://zurb.com/playground/orbit-jquery-image-slider)
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25387749
answer count: 1
tagged with: meteor
favorite count: 0
type: UnansweredQuestion
has title: Meteor Table Data Being Reordered
has body: I have started building a meteor application that has a table with data loaded from a collection. I want the user to be able to double click on a field and edit it. I have achieved this functionality but when I update the document in the collection the table redraws and the updated document is at the bottom of the table, out of order from the other rows, which have not been updated. This happens to all updated rows. Any insight into this problem would be greatly appreciated. This is my first meteor application so do not know why this is happening.
downvote count: 1
type: Question
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25404249
upvote count: 0

http://stackoverflow.com/comment/39421479
comment on: http://stackoverflow.com/a/25293725
has text: the strange thing is that without data-role="tagsinput" it works (which means it has the same width of the other inputs in the form)
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39617049
has text: Then how and where would I call toString() instead?
comment on: http://stackoverflow.com/a/25391029
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25373617
has comment: http://stackoverflow.com/comment/39567795
type: Question
has comment: http://stackoverflow.com/comment/39567822
tagged with: javascript
has body: I'm reading through the Javascript Patterns book, and one of their examples regarding the creation of regular expression literals does not appear consistent Chrome version 36.0.1985.125 on Mac OSX. Here's the example function getRE() { var re = /[a-z]/; re.foo = "bar"; return re; } var reg = getRE(), re2 = getRE(); console.log(reg === re2); //true according to book reg.foo = "baz"; console.log(re2.foo); //baz according to book In this version of chrome, line one in the console is false, and line two is still "bar" They then go on to say in ES5 that the literal will create new objects each time. Does this version of chrome implement ES5? And if so, I thought all browsers were still on 3 minus a few augmentations.
has title: In which browsers are regular expression literals created only once
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39567883
answer count: 0
has comment: http://stackoverflow.com/comment/39567768
type: UnansweredQuestion
upvote count: 1
tagged with: regex
score: 1
has comment: http://stackoverflow.com/comment/39567907

http://stackoverflow.com/comment/41398638
type: QuestionComment
type: Comment
has text: any luck? I'm having similar issues
comment on: http://stackoverflow.com/q/25331069
score: 0

http://stackoverflow.com/comment/39500211
score: 0
comment on: http://stackoverflow.com/q/25333500
type: QuestionComment
has text: Thanks, I've added a link to a jsfiddle and a little more detail above.
type: Comment

http://stackoverflow.com/comment/39493133
has text: Does it do it in Firefox too?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25327645
type: AnswerComment

http://stackoverflow.com/a/25335456
accepted answer of: http://stackoverflow.com/q/25334290
type: Answer
has comment: http://stackoverflow.com/comment/39567752
has body: I don't think the full file path is supported or allowed via modern web browsers via the file upload control. What you would end up having to do is create something server-side that use a service account to access the file share, and then the client (web page) could call the server-side code as it traverses the file share until the user selects a file. Example: server: on load, here are the contents of "\server\home" client: show the contents of subfolder "\server\home\pictures" server: connects to "\server\home\pictures" and returns contents client: selects "\server\home\pictures\foo.jpg" Check out System.IO.Directory http://msdn.microsoft.com/en-us/library/system.io.directory(v=vs.100).aspx for ways to get listing of directory contents server-side (GetFiles, GetDirectories, GetFileSystemEntries, etc) and then you can return those results to the client.
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25334290
score: 0
has comment: http://stackoverflow.com/comment/39586597

http://stackoverflow.com/comment/39473328
type: Comment
type: QuestionComment
has text: to help you make a plunker and post here.
comment on: http://stackoverflow.com/q/25322235
score: 0

http://stackoverflow.com/a/25374794
answers question: http://stackoverflow.com/q/25374651
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25374651
type: Answer
score: 0
has body: This sounds like something that would be better done as a custom timer because you need to keep track of the time, not just delay an operation. Somehow, you need to format your data where you have the amount of run and pause time for each operation. Something like this: var operations = [{fun: oneFunction, wait: 1000, run: 3000}, {fun: twoFunction, wait: 2000, run: 5000]; Then you will need to handle those functions, running them for their respective times: function handleOperations(operationArray) { for (var i = 0; i &lt; operationArray.length; i++) { var start = Date.now(); if ((Date.now()-start) &lt;= operationArray[i].run) { operationArray[i].fun(); //run while the timer is still going } else { //otherwise, wait for specified time var waitStart = Date.now(); if ((Date.now()-waitStart) &lt;= operationArray[i].wait) {}; } } }

http://stackoverflow.com/comment/39567680
type: Comment
has text: Is there anyway that OtherCtrl can can fire the service also if OtherCtrl happens first? (i dont think this will happen but yeah...)
comment on: http://stackoverflow.com/a/25373418
type: AnswerComment
score: 0

http://stackoverflow.com/q/25283846
has comment: http://stackoverflow.com/comment/39401109
upvote count: 1
tagged with: http
has comment: http://stackoverflow.com/comment/39401203
tagged with: java
type: UnansweredQuestion
has body: Imagine I have a jQuery script to listen for drag and drop action and then upload them. If I open my webpage in a WebView , how can I drop a File object into that area? (basically fake a drop given I have a File object or path to that File for example I use the camera to take a picture, then I save that image. Now I would like to upload that image purely using browser capabilities (without httpClient requests on android side). Or If I could add my file to a file upload input (which I couldn't find a way to achieve).
answer count: 0
downvote count: 0
has title: Android webview, pretend file drop
tagged with: javascript
tagged with: jquery
favorite count: 0
type: Question
tagged with: android
score: 1

http://stackoverflow.com/q/25261592
type: UnansweredQuestion
has body: I am working on building a chrome extension to be used to simplify some of the eCommerce related tasks that we perform. A content script is loaded into every page with jQuery as a dependency mentioned in the manifest.json file. The main objective is to pick out the element being clicked on the loaded page. While the above logic works in most of the scenarios, there is a couple of websites(one mentioned below that does not seem to register the click event for a few dynamically loaded elements. For example I click on the color swatch and the content script event is triggered, however clicking on the size swatch which has been modified yields nothing). http://www.solesociety.com/opal-crystal-blue.html Sample Content script code $(window).load(function(){ console.log('Content Script Loaded!'); $('body').on('click', function(e){ console.log($(e.target)); }); }); I have gone through several stackoverflow questions that suggest adding the selector as the second parameter to the on function will take in consideration the dynamically elements, but I cannot opt for that as my code relies on any element of the body to be clicked. Additionally I also did a check to see if mentioning the element as the second parameter gave any results but the outcome was the same. $('body').on('click', '.sizes li a', function(e){ console.log($(e.target)); });
has title: Click event on dynamically added elements from chrome content script
answer count: 0
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 2
tagged with: google-chrome-extension
favorite count: 0
upvote count: 2

http://stackoverflow.com/a/25321000
downvote count: 0
has comment: http://stackoverflow.com/comment/39471032
has comment: http://stackoverflow.com/comment/39470679
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25320876
answers question: http://stackoverflow.com/q/25320876
has body: You just apply .draggable() to your snowflake http://jsfiddle.net/MzVFA/213/
type: AcceptedAnswer

http://stackoverflow.com/a/25383625
type: Answer
score: 0
has body: here is a Demo: http://jsfiddle.net/hxzgpdoz/ i made some changes in your mouseenter event function: var elemDiv = document.getElementById("demo"); if( elemDiv ){ elemDiv.innerHTML = "something"; }else{ elemDiv = document.createElement('div'); elemDiv.id ="demo"; document.body.appendChild(elemDiv); elemDiv.innerHTML = "something"; }
answers question: http://stackoverflow.com/q/25383448

http://stackoverflow.com/q/25338883
has title: apply Class OnChange in Javascript
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
answer count: 2
has answer: http://stackoverflow.com/a/25339018
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: css
has body: i m creating no of &lt;li&gt;... &lt;/li&gt; in javascript like this $(function () { var settings = { rows: 6, cols: 6, rowCssPrefix: 'row-', colCssPrefix: 'col-', seatWidth: 30, seatHeight: 30, seatCss: 'seat', selectedSeatCss: 'selectedSeat', selectingSeatCss: 'selectingSeat' }; var init = function (reservedSeat) { var str = [], seatNo, className; for (i = 0; i &lt; settings.rows; i++) { for (j = 0; j &lt; settings.cols; j++) { seatNo = (i + j * settings.rows + 1); className = settings.seatCss + ' ' + settings.rowCssPrefix + i.toString() + ' ' + settings.colCssPrefix + j.toString(); str.push('&lt;li id="'+seatNo+'" class="' + className +" table"+seatNo+ '"&gt;' +'&lt;a id="a'+ seatNo +'" title="'+ seatNo+'"&gt;&lt;/a&gt;' '&lt;/li&gt;'); } } $('#place').html(str.join('')); }; Now i need to apply the Class selectedSeat to the &lt;li&gt; ID's= 15 , 14 , 25, 10
possible better answer: http://stackoverflow.com/a/25339089
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25339089
accepted answer: http://stackoverflow.com/a/25339018

http://stackoverflow.com/comment/39368711
type: QuestionComment
has text: I've added some code examples in mongo shell (which works how I would like it to work) and using the nodejs driver
comment on: http://stackoverflow.com/q/25239408
score: 0
type: Comment

http://stackoverflow.com/comment/39351685
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25256605
type: Comment
has text: So, isn't there any way to access a key of an object that is being created? The code is in the global scope.

http://stackoverflow.com/comment/39585823
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25381849
has text: Works for me. Try http://jsfiddle.net/orj8wdps/1/ - looks to me you are in fact not assigning an array to `self.PreviousDowntimeEvents` but a single object. Try `self.PreviousDowntimeEvents = data.data` instead of `self.PreviousDowntimeEvents = data.data[0]`.

http://stackoverflow.com/q/25240563
tagged with: qunit
tagged with: cordova
type: UnansweredQuestion
has body: I am new to qunit. How to test phonegap application containing SQLite database coding by qunit?
type: Question
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/27420873
has title: phonegap application containing SQLite database testing by qunit

http://stackoverflow.com/comment/39493567
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25332583
has text: I've seen the fiddle that it works. But I'm then trying to write it out in the html like this `{{newString }}` But it doesn't work.

http://stackoverflow.com/comment/39537578
has text: just set `modal:false`
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25356337
score: 0

http://stackoverflow.com/comment/39540178
type: Comment
has text: I done that but now I receive 'TypeError: undefined is not a function '
comment on: http://stackoverflow.com/a/25359079
type: AnswerComment
score: 0

http://stackoverflow.com/q/25373830
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: html2canvas
has comment: http://stackoverflow.com/comment/39568489
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39568861
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39568231
has answer: http://stackoverflow.com/a/25439464
has title: Html2Canvas ...Google Map is not rendering
upvote count: 1
type: Question
score: 1
has comment: http://stackoverflow.com/comment/39689417
linked to: http://stackoverflow.com/q/24046778
has body: I am running a Apache Server . I have a simple screen capture set up using Html2canvas .The capture function is rendering a blank Image . I have tried numerous ways to configure the javascript using related articles from this site to no Avail . The code is all working and tested because I can capture the image prior to "google maps api being loaded . Thank you and any advice would be much appreciated . Tester This is the php document renders to save.php <?php //Get the base-64 string from data $filteredData=substr($_POST['img_val'], strpos($_POST['img_val'], ",")+1); //Decode the string $unencodedData=base64_decode($filteredData); //Save the image file_put_contents('img.png', $unencodedData); ?> Save the image and show to user Click Here to See The Image Saved to Server Click Here to Go Back Here is Client-sided image: <?php //Show the image echo ' '; ?> This sample works Correctly . I want to achieve this with above Code using "Google Earth"
has comment: http://stackoverflow.com/comment/57542366

http://stackoverflow.com/comment/39577000
score: 0
has text: I will still have to work on it but you helped me a lot, thanks mate :)
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25377560

http://stackoverflow.com/q/25253672
tagged with: angularjs
has title: Dynamic multi-column filtering with angularJS ng-repeat and ng-model
has body: I have figured out static (hard-coded) multi-column filtering; Here. {{ (x.name | uppercase) + ', ' + x.country }} However, I want to be able to create the text box filters dynamically based on the model (ie. for any # of columns). It seems like it should be something like this, but the text boxes do nothing. {{ (x.name | uppercase) + ', ' + x.country }} I've searched all around, and I find it hard to believe something like this hasn't been done [often enough to be found by my searching]. Any help is appreciated.
has answer: http://stackoverflow.com/a/25254438
type: Question
type: AnsweredQuestion
tagged with: angular-ngmodel
tagged with: filtering
accepted answer: http://stackoverflow.com/a/25254438
tagged with: javascript
score: 4
upvote count: 4
answer count: 1
downvote count: 0
tagged with: angularjs-ng-repeat
favorite count: 0

http://stackoverflow.com/comment/39427300
type: Comment
comment on: http://stackoverflow.com/a/25297354
score: 1
type: AnswerComment
has text: I added it as a comment instead of an answer because, while it is true and will work, it probably shouldn't be used directly in code that might need to be fixed late at night by someone who's not super familiar with javascript. Just because you CAN do it, doesn't mean you SHOULD :)

http://stackoverflow.com/q/25328886
has body: As you may see below, I've defined two sections in the ngdocs setting in my Grunfile.js: ngdocs: { options: { dest: 'docs', html5Mode: false, .... }, api: { src: ['src/lib/*.js'], title: 'Libraries' }, app: { src: ['src/app/*.js'], title: 'Application' } }, How can I connect these modules via @link directive? If you build the example, you will see that all links between src/app/main.js module (MainModule) to src/lib/notification.js module (NotificationsModule) are broken :( This issue has been repeated from the project issue#98 (https://github.com/m7r/grunt-ngdocs/issues/98).
score: 1
tagged with: gruntjs
type: Question
answer count: 2
upvote count: 1
tagged with: javascript
tagged with: documentation
favorite count: 0
has answer: http://stackoverflow.com/a/26621554
tagged with: angularjs
downvote count: 0
has title: How to link between modules from different sections
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25759300
tagged with: angularjs-directive

http://stackoverflow.com/comment/39510409
type: AnswerComment
has text: Yeh. i know... I said to put in a function just to be more generic code...
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25342308

http://stackoverflow.com/q/25309091
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25309174
type: Question
has title: Get reCaptcha value via javascript?
tagged with: javascript
tagged with: jquery
answer count: 2
downvote count: 0
has body: I've added reCaptcha to my site, and when I use it normally in a form everything works great, but now I faced a problem when I tried to read the captcha value via JavaScript or jQuery. I have this HTML code that loads reCaptcha on my page. When I fill in the captcha field and click on a button I want to load the values of recaptcha_response_field and recaptcha_challenge_field so I can submit them via $.get(); so I've come up with this code: $("#ok").click(function() { var res,res2; var rcf = document.getElementsByName('recaptcha_challenge_field').value; var rrf = document.getElementsByName('recaptcha_response_field').value; var url = "go.php?rcf="+ rcf +"&rrf=" + rrf; alert(url); $.get( url, function( data ) { var n = data.indexOf("#"); res = data.slice(0,n); res2 = data.slice(n+1); }); }); When I click the button I get an alert box with this value: go.php?rcf=undefined&rrf=undefined Basically I can't read those fields and I think that I'm reading the wrong ones. File go.php verifies captcha I just need to pass those two captcha fields to it so it can do all the background work of checking the captcha. I really don't know how to achieve this and I guess there is a simple solution, but I couldn't find it anywhere so I wanted to ask the community. Best Regards!
has answer: http://stackoverflow.com/a/25309174
possible better answer: http://stackoverflow.com/a/25309272
favorite count: 0
has answer: http://stackoverflow.com/a/25309272
upvote count: 2
tagged with: php

http://stackoverflow.com/q/25330131
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
possible better answer: http://stackoverflow.com/a/25330167
has answer: http://stackoverflow.com/a/25330167
tagged with: javascript
has title: Array.prototype.unshift.call(arguments,....) how can it be done?
upvote count: 2
answer count: 2
accepted answer: http://stackoverflow.com/a/25330174
has body: i am trying to implement different array methods on arguments only for experiment purpose.I was able to use slice and join methods.But i can't figure out how can i add an extra element in arguments list using unshift method.it is giving an unexpected result .it is giving the value 3 ,which i don't know from where it is comming.how it can be done? &lt;html&gt; &lt;body&gt; &lt;script&gt; function init(){ console.log(arguments); console.log(arguments.length); console.log(Array.prototype.join.call(arguments,'__')); console.log(Array.prototype.unshift.call(arguments)); } init(1,2,3); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; result: Arguments { 0: 1, 1: 2, 2: 3, 2 more… } 3 "1__2__3" 3
favorite count: 0
has answer: http://stackoverflow.com/a/25330174

http://stackoverflow.com/a/25274665
type: Answer
answers question: http://stackoverflow.com/q/25274563
upvote count: 40
has body: One way you can communicate between them using what is called eventing. One directive can emit an event on the rootscope which can then be listened by anybody who wants to. You could use $rootScope.$emit or $rootScope.$broadcast to publish events with data and use $scope.$on to listen to the event. In your case you could just do $scope.$emit as well. app.directive("firstDir", function(){ return { restrict : 'E', controller : function($scope){ this.data = 'init value'; this.set = function(value){ //EMIT THE EVENT WITH DATA $scope.$emit('FIRST_DIR_UPDATED', value); this.data = value; // communication with second Directive ??? } }, controllerAs : 'firstCtrl' }; }); app.directive("secondDir", function(){ return { restrict : 'E', controller : function($scope){ var _that = this; //LISTEN TO THE EVENT $scope.$on('FIRST_DIR_UPDATED', function(e, data){ _that.data = data; }); this.data = 'init value'; }, controllerAs : 'secondCtrl' }; }); Demo Demo2 ____________________________________________________________________________ Now speaking of which, it sometimes is really required to inject $rootScope just to have the eventing enabled to a different node in your application. You can instead have a pub/sub mechanism easily built in your app and make use of prototypical inheritance. Here i am adding 2 methods publish and subscribe on $rootScope's prototype during app initialization. So any child scope or isolated scope will have these methods available and communication will be so easier without worrying about whether to use $emit, $broadcast, whether i need to inject a $rootscope for communication from isolated scoped directive etc. app.service('PubSubService', function () { return {Initialize:Initialize}; function Initialize (scope) { //Keep a dictionary to store the events and its subscriptions var publishEventMap = {}; //Register publish events scope.constructor.prototype.publish = scope.constructor.prototype.publish || function () { var _thisScope = this, handlers, args, ev…
downvote count: 0
has comment: http://stackoverflow.com/comment/39385043
has comment: http://stackoverflow.com/comment/39384975
type: AcceptedAnswer
score: 40
accepted answer of: http://stackoverflow.com/q/25274563

list
type: Tag
tags question: http://stackoverflow.com/q/25297460
tags question: http://stackoverflow.com/q/25320540
tags question: http://stackoverflow.com/q/25342616
tag name: list
tags question: http://stackoverflow.com/q/25386534
tags question: http://stackoverflow.com/q/25340107
tags question: http://stackoverflow.com/q/25235361

http://stackoverflow.com/q/25247059
accepted answer: http://stackoverflow.com/a/25249812
has title: Backbone.js & Inheritance Methods
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25249812
tagged with: extend
type: Question
tagged with: function
tagged with: javascript
tagged with: class
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/25248797
favorite count: 0
tagged with: backbone.js
has body: i was wondering how to use functions within the Backbone.View code. Can someone advise/show me how this is done properly. I understand that extending is only put into the var. I've looked at extend, prototype, super, parent, baseview and other fancy stuff. But that only confused me even more ;). var jsHelpers = { intVar: 300, sum: function(a, b, callback) { // do something interesting: c = a + b; d = c + intVar; callback(c); } //end sum function } //end jsHelpers /* somewhere else */ ViewThingy = Backbone.View.extend({ initialize: function() { this.render(); }, render: function() { var result = jsHelpers.sum(1, 1, function(callbackData) { //let's do something with the return stuff: this.$el.html(callbackData); }); //end jsHelpers } // end render }); //end extend The error is of course that the function jsHelpers.sum(); is not available in the extend. TIA ! Vince
possible better answer: http://stackoverflow.com/a/25248797

http://stackoverflow.com/q/25268290
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/25268338
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39372700
answer count: 2
downvote count: 0
possible better answer: http://stackoverflow.com/a/25268349
has comment: http://stackoverflow.com/comment/39372663
favorite count: 0
has answer: http://stackoverflow.com/a/25268349
has answer: http://stackoverflow.com/a/25268338
has title: Regular Expression in JavaScript giving an uncaught type error
has body: I am developing an application and want to be able to grab only the resource from the URL so I have written a regular expression, but it doesn't seem to be working and I get an uncaught type error. Can anyone help with this? var link = document.location; var res = link.match(/\/.*php/g);
has comment: http://stackoverflow.com/comment/39372682
tagged with: regex
type: AnsweredQuestion

http://stackoverflow.com/q/25378068
has answer: http://stackoverflow.com/a/25378507
accepted answer: http://stackoverflow.com/a/25378507
tagged with: asp.net
has title: Error in loading data from database to gridview using ajax json C#
tagged with: ajax
has body: I'm trying to load data from database to gridview while scrolling page.It work like this 1)Intially when the page is loaded gridview display 10 data form the database(works fine) 2)while scrolling gridview display a image for loading and that time a server side function is called by using ajax json method for loading next 5 data from database 3)after successfully hitting this function the javascript removes the image for loading and appends the gridview with next 5 data. Now the problem is after removing the image the gridview shows the first data from the database again and again in the gridview for the next 5 times . Please Help.. C# protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { newscontainer.DataSource = GetNewsPageWise(1, 10); newscontainer.DataBind(); } } public static DataSet GetNewsPageWise(int pageIndex, int pageSize) { string constring = "server=***;uid=***;pwd=******;database=*******"; using (SqlConnection con = new SqlConnection(constring)) { using (SqlCommand cmd = new SqlCommand("[GetNewsPageWise]")) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@PageIndex", pageIndex); cmd.Parameters.AddWithValue("@PageSize", pageSize); cmd.Parameters.Add("@PageCount", SqlDbType.Int, 4).Direction = ParameterDirection.Output; using (SqlDataAdapter sda = new SqlDataAdapter()) { cmd.Connection = con; sda.SelectCommand = cmd; using (DataSet ds = new DataSet()) { sda.Fill(ds, "popnews"); DataTable dt = new DataTable("PageCount"); dt.Columns.Add("PageCount"); dt.Rows.Add(); dt.Rows[0][0] = cmd.Parameters["@PageCount"].Value; ds.Tables.Add(dt); return ds; } } } } } [WebMethod] public static string GetCustomers(int pageIndex) { //Added to similate delay so that we see the loader working //Must be removed when moving to production System.Threading.Thread.Sleep(2000); return GetNewsPageWise(pageIndex, 5).GetXml(); } } Javascript &lt;script type="text/javascript"&gt; var pageIndex = 1; var pageCount; $(function () { //Re…
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25378890
tagged with: gridview
type: Question
tagged with: c#
tagged with: javascript
has comment: http://stackoverflow.com/comment/39576134
has answer: http://stackoverflow.com/a/25378890
score: 0
answer count: 2

http://stackoverflow.com/comment/39570140
type: AnswerComment
comment on: http://stackoverflow.com/a/25374334
type: Comment
has text: @OliverBarnwell Where's the script that edits the code? Like i don't see how you can change the value in that code?
score: 0

http://stackoverflow.com/comment/39508727
comment on: http://stackoverflow.com/a/25340987
has text: The object I'm using is not a function, so prototype doesnt seem to be working for me. var Object1 = dc.lineChart("#chart-line-hitsperday");
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39427425
score: 0
type: AnswerComment
has text: Why make it that ugly? A function should only have a single purpose, and not do completely different things depending on whether an argument is given or not.
type: Comment
comment on: http://stackoverflow.com/a/25297513

http://stackoverflow.com/comment/39349530
comment on: http://stackoverflow.com/q/25255317
score: 0
type: Comment
type: QuestionComment
has text: when calling `ctx.drawImage` he converts the `drawX` and `drawY` to canvas positions by multiplying them by `SIZE`. `drawX * SIZE, drawY * SIZE`

http://stackoverflow.com/q/25285154
favorite count: 0
upvote count: 2
type: UnansweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/39403612
has title: How to convert currency Strings from Array
has answer: http://stackoverflow.com/a/25285215
type: Question
answer count: 2
tagged with: arrays
tagged with: javascript
has body: I have an array which holds a list of array and the value is in 'dollars'. I need to take the max price and min price from that list. This is what have tried, var _array = [$1.09,$3.07,$2.223]; var number = Number(_array.replace(/[^0-9\.]+/g,"")); a= Math.max.apply(Math,number); // $3 b= Math.min.apply(Math,number); // $1 But its not working, can anyone please help me out. Demo Link
downvote count: 0
has answer: http://stackoverflow.com/a/25285259

http://stackoverflow.com/a/25483248
answers question: http://stackoverflow.com/q/25296589
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/40263736
downvote count: 0
has body: I think jquery is reloaded when you call the renderPartial in your actionCreate(). Try changing the parameters of the call to $this-&gt;renderPartial('_form', array(...), false, false); Or add the following code to _form to prevent jquery (and maybe other javascript files) from being reloaded. &lt;?php if (Yii::app()-&gt;request-&gt;isAjaxRequest) { $cs = Yii::app()-&gt;clientScript; $cs-&gt;scriptMap['jquery.js'] = false; $cs-&gt;scriptMap['jquery.min.js'] = false; } ?&gt; When jquery is reloaded it forgets everything it knew before. So the yiiListView doesn't exist anymore.

http://stackoverflow.com/comment/39473006
comment on: http://stackoverflow.com/q/25322286
score: 0
type: Comment
type: QuestionComment
has text: You could use jQuery selectors (angular.element allows only to find by tagname) to target the first `ng-binding` class and get its text. In case where all your `b` has `ng-binding` class, you could do the trick with angular.element finding for first `b` without using jQuery.

http://stackoverflow.com/comment/39461046
comment on: http://stackoverflow.com/q/25315841
has text: @madflow: Uh, what? Where is it illegal?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39526861
type: QuestionComment
comment on: http://stackoverflow.com/q/25344444
has text: @DavidWeldon can't check the resource since I'd need to buy it. I'd like to ask you if you've got some resources on how to setup the queries with the relational model in meteor (with pub/sub methods)
score: 0
type: Comment

http://stackoverflow.com/q/25371926
accepted answer: http://stackoverflow.com/a/33027426
type: Question
tagged with: reactjs
has comment: http://stackoverflow.com/comment/67749193
downvote count: 0
has body: I have a complex web page using React components, and am trying to convert the page from a static layout to a more responsive, resizable layout. However, I keep running into limitations with React, and am wondering if there's a standard pattern for handling these issues. In my specific case, I have a component that renders as a div with display:table-cell and width:auto. Unfortunately, I cannot query the width of my component, because you can't compute the size of an element unless it's actually placed in the DOM (which has the full context with which to deduce the actual rendered width). Besides using this for things like relative mouse positioning, I also need this to properly set width attributes on SVG elements within the component. In addition, when the window resizes, how do I communicate size changes from one component to another during setup? We're doing all of our 3rd-party SVG rendering in shouldComponentUpdate, but you cannot set state or properties on yourself or other child components within that method. Is there a standard way of dealing with this problem using React?
tagged with: javascript
favorite count: 0
tagged with: responsive
has comment: http://stackoverflow.com/comment/81022169
has answer: http://stackoverflow.com/a/33027426
answer count: 4
has comment: http://stackoverflow.com/comment/55442933
has comment: http://stackoverflow.com/comment/77611463
has answer: http://stackoverflow.com/a/36626909
upvote count: 88
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/30019559
possible better answer: http://stackoverflow.com/a/25410176
has comment: http://stackoverflow.com/comment/63448691
score: 88
has title: How can I respond to the width of an auto-sized DOM element in React?
linked to: http://stackoverflow.com/q/44480053
has answer: http://stackoverflow.com/a/25410176

http://stackoverflow.com/comment/39472777
comment on: http://stackoverflow.com/q/25322035
type: QuestionComment
has text: I would like to exclude every category: "value" from the object, or every name: "value" Either way really. Basically I want to do this so that say for example, the object included username, id, firstname, lastname etc. I would want to exclude certain keys like id @runTarm
score: 0
type: Comment

http://stackoverflow.com/comment/39509608
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25341703
has text: Someone call security, we've got a plaintext offender.

http://stackoverflow.com/comment/39349866
type: Comment
type: QuestionComment
has text: when you click the first time, 1 handler is added that you cancel... but still the registered handler is present... then when you try to de activate the second user a second handler is added... now when you click on confirm both first and second handlers are bound to the button so both gets executed
comment on: http://stackoverflow.com/q/25255484
score: 0

http://stackoverflow.com/comment/39453567
comment on: http://stackoverflow.com/a/25311741
has text: please remove your anwser so that other will anser
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39532655
type: Comment
has text: Note that if int00 = int00 || is removed the scroll_diseases_left function works, but of course the animations don't stop when the scroll_disease left button (the id) is no longer being touched.
comment on: http://stackoverflow.com/a/25324225
type: AnswerComment
score: 0

http://stackoverflow.com/a/25319067
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25318561
type: Answer
score: 0
has body: You have three problems. One, your event isn't firing. Two, messing with intervals is tricky and should be avoided where possible. Three, you'll lose your event attachments when the video element is moved and re-appended. Ready? Lets go. According to this: YouTube API Change Event Not Firing the API may be buggy, so loading the videos with JS is a better option. (function setupPlayers() { if(window['YT'].loaded == 1){ // Sets up the players via script due to the Iframe API being buggy var player01 = new YT.Player('player01', { height: '390', width: '640', videoId: 'nCgQDjiotG0', events: { 'onStateChange': onPlayerStateChange } }); var player02 = new YT.Player('player02', { height: '390', width: '640', videoId: 'V70ruRzEGOI', events: { 'onStateChange': onPlayerStateChange } }); var player03 = new YT.Player('player03', { height: '390', width: '640', videoId: 'xgrcK9Ozb_Q', events: { 'onStateChange': onPlayerStateChange } }); } else { setTimeout(setupPlayers, 100); } })(); Note: to make sure the API is loaded you have to check window['YT'].loaded until it's all there. This is a bit of a round-about technique to get what you want done but its far easier than messing with the interval itself. Javascript Timeouts and Intervals are tricky at best. What we're making here is a primary loop (like for a game, if you've ever done that) and putting a global condition on the action of that loop. This way the code is only executed while your condition is true, but it just keeps running that loop and you don't have to worry about stopping or starting it back up. I've also changed the setInterval to a setTimeout that's repeatedly called in the doTheSlide function, this seems more stable to me and has fixed some issues in chrome I've dealt with before. Also in this next snippet is the fix for the final issue. You cannot use appendTo on the element so instead you must move through the nodes and detect the end of the list. I've used a little jQuery extention method you can see in the f…
accepted answer of: http://stackoverflow.com/q/25318561

http://stackoverflow.com/comment/39351684
has text: I have no code show-worthy code I tried which wouldn't be more confusing than helpful. I don't really care about the representation, thats why I didn't specify it any further. This is a more generic question. And why can't JS do multidimensional array? Isn't this a 2-dimensional array: [[1, 2], [3, 4]]?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25245195
score: 0

http://stackoverflow.com/a/25320503
downvote count: 1
score: 2
upvote count: 3
has body: I think what you want to do is something like this... (supposing process return a $.Deferred().promise() object) var requests = []; for (var i=0; i&lt;json_list.length; i++) { requests.push(process(json_list[i].id, json_list[i].name)); } $.when.apply($, requests).then( function() { $('#global').text("OK"); }, function() { $('#global').text("FAIL"); } ); EDIT: Edited the code to iterate the array properly. I thought it was an object and used for..in, but you should use this way always ;)
answers question: http://stackoverflow.com/q/25320363
has comment: http://stackoverflow.com/comment/39470265
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39469746
has comment: http://stackoverflow.com/comment/39475133
has comment: http://stackoverflow.com/comment/39475835
has comment: http://stackoverflow.com/comment/39486454
accepted answer of: http://stackoverflow.com/q/25320363
has comment: http://stackoverflow.com/comment/39476092
type: Answer

http://stackoverflow.com/a/25318233
has comment: http://stackoverflow.com/comment/39465644
accepted answer of: http://stackoverflow.com/q/25318085
has comment: http://stackoverflow.com/comment/39465652
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39465618
type: Answer
answers question: http://stackoverflow.com/q/25318085
has body: What you need is a hash tag routing libary. http://projects.jga.me/routie/ This will run when your app page loads and read the hash, diverting the logic of your code to do something based on the hash tag, thus you make your items remove on the page in your code logic. No need for lots of pages. But! If the url launcher on the device launches new windows each time an item is detected, that is a problem since you can't close those windows, other than from the window itself. Solution The app has a main window for the game, each item is stored in local storage, You can use the local storage event system to detect if another page changes an item, and update the UI in real-time. addEvent(window, 'storage', function (event) { if (event.key == 'item1') { item1.innerHTML = event.newValue; } }); When NFC launches a new window, display user feedback that states they have completed a task of the game then close it using a timeout. Below that window will be the main page window with the update displayed. Done properly it will work brilliantly. You can also add a nice x close button on the pop windows as tasks are completed.
has comment: http://stackoverflow.com/comment/39465560
has comment: http://stackoverflow.com/comment/39489277
has comment: http://stackoverflow.com/comment/39465581
has comment: http://stackoverflow.com/comment/39465667
score: 0

http://stackoverflow.com/comment/39381424
comment on: http://stackoverflow.com/q/25270162
type: QuestionComment
has text: Definitely sounds like an easy case for dropping dataTables then. Most of what you're trying to do is already built into ng-repeat. You'll also need the [filter](https://docs.angularjs.org/api/ng/filter/orderBy).
score: 0
type: Comment

http://stackoverflow.com/q/25344982
has comment: http://stackoverflow.com/comment/39515112
has comment: http://stackoverflow.com/comment/39515482
linked to: http://stackoverflow.com/q/14347952
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25345670
tagged with: wordpress
type: Question
tagged with: addclass
has body: I am trying to toggle the visibility of some custom meta boxes via jQuery. I managed to hide them by default and to make them visible when clicking on the correct post format. I am not finding a solution for making the meta boxes disappear when the user changes the post format. e.g. Default: Hidden Click on "Aside": Show Switching from "Aside" to any other post format: hide. I have the following code: jQuery(document).ready(function () { jQuery("#postbox-container-2").addClass("hidden"); if (jQuery("input#post-format-video").is(':checked')) { jQuery("#postbox-container-2").removeClass("hidden"); } jQuery("input#post-format-video").change(function () { if (jQuery(this).is(':checked')) { jQuery("#postbox-container-2").removeClass("hidden"); } }); }); Any idea? Different approach based on @zipp fiddle Query(document).ready(function() { jQuery( "#postbox-container-2" ).hide(); var toToggle=''; jQuery('input#post-format-video').change(function() { if (toToggle){ jQuery(toToggle).hide(); } //alert(this.value+ " is checked"); var selector='#postbox-container-2'; jQuery(selector).toggle(); toToggle=selector; }); }); even this one works fine but does not change live when I click on a different radio button
tagged with: removeclass
has title: Show hide custom metaboxes, live, with jQuery
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1

http://stackoverflow.com/comment/39357688
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25258997
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/59166/discussion-between-sudarshan-and-shavez).

http://stackoverflow.com/comment/39322981
type: Comment
type: QuestionComment
has text: @adeneo resize events can fire very frequently, typically you would debounce/throttle it (much like scroll events). the browser itself manages events for matchMedia (they only fire when something changes), so is bound to be better performing. the only event handling i do is matchMedia(mq).addListener(fn), it's not custom at all :)
comment on: http://stackoverflow.com/q/25241179
score: 0

http://stackoverflow.com/comment/39383013
type: Comment
type: QuestionComment
has text: A better question is why are you following the Google JS Style Guide? It's notoriously terrible and Google-specific.
comment on: http://stackoverflow.com/q/25273489
score: 0

http://stackoverflow.com/comment/39411807
comment on: http://stackoverflow.com/a/25288875
type: Comment
has text: Hi Gareth, I don't see any such line in the templated markup (the html file).
type: AnswerComment
score: 0

http://stackoverflow.com/a/25364977
type: Answer
downvote count: 0
score: 3
has body: In the HTML page, linked to an "OK" button: function ok() { var t1 = document.getElementById("textarea1").value; var t2 = document.getElementById("textarea2").value; var t3 = document.getElementById("textarea3").value; var t4 = document.getElementById("textarea4").value; var result = JSON.parse(bridge.doIt(t1,t2,t3,t4)); } } In the application's webview: class MyBridge { public MyBridge(Context context) { // ... } @JavascriptInterface public String doIt(String t1, String t2, String t3, String t4) { // do whatever you want here with the values } } and in the webview's constructor: this.addJavascriptInterface(new MyBridge(pContext), "bridge"); This should work (using it myself). If you don't want to use an OK button, you'll have to change the code a bit to fit your needs, maybe call a function on the "onKeyPress" of the text fields.
has comment: http://stackoverflow.com/comment/39580709
has comment: http://stackoverflow.com/comment/39581824
answers question: http://stackoverflow.com/q/25364756
upvote count: 3

http://stackoverflow.com/comment/39541158
score: 72
type: Comment
has text: Those devious code hackers ;) . I hope they documented it well, before some smart guy deleted it 'since it has no use'.
comment on: http://stackoverflow.com/a/25359759
type: AnswerComment

http://stackoverflow.com/comment/39523103
score: 0
type: AnswerComment
has text: Ah I see. So I cannot pass a reference to a variable or object for it to be changed elsewhere; only its properties can be changed. I actually found a good explanation here: http://stackoverflow.com/questions/518000/is-javascript-a-pass-by-reference-or-pass-by-value-language So, if I wanted to change the value of `$scope.var1`, I can either (a) write a function that returns that value and use it as such: `$scope.var1 = setValue(...)`, (b) hard-code the change in the function: `function setValueVar1(value) {$scope.var1 = value;}`, or (c) do as my second function and pass the name...correct?
type: Comment
comment on: http://stackoverflow.com/a/25349739

http://stackoverflow.com/comment/39329553
type: QuestionComment
comment on: http://stackoverflow.com/q/25243973
has text: I just tried this. Unfortunately nothing changed. Furthermore, after a wrong UN and PW attempt, it somehow thinks that the page is valid even if I leave one of the textboxes completely blank.
score: 0
type: Comment

http://stackoverflow.com/q/25388100
has body: I'm using postgres with node.js via the pg package, I'm only starting off so I'm aiming for a very simple table of the form shown below, created in the psql shell by the command CREATE TABLE people(id int, name text); Column | Type | Modifiers ------------+---------+----------- id | int | name | text | The relevant parts of the node file are shown below. All I'm trying to do is get a count of the current number of people (which is fine), increment it by 1 and use this new value as the id of the next person I add to the table pg.connect(conString, function(err, client) { var count; var next; client.query('SELECT COUNT(*) FROM people', function(err, result) { count = result.rows[0].count; next = Number(count)+1; }); client.query('INSERT INTO people (id, name) VALUES ($1, $2)', [next, req.body.personName],function(err, result) { }); }); The req.body.personName is being set elsewhere in the express app, there is no problem with that part of it, the name gets stored fine in postgres but the id column remains blank. I have tried both numeric and int types when creating the field in postgres but it made no difference Assuming the problem to be an incompatibility between types as they are defined in postgres, and the looser definition in javascript I have tried to cast the type VALUES ($1::int, $2) , again to no avail I thought the [node-pg-types][1] project might be a solution, but from what I understand of it, it isn't (I could well be wrong) If I replace the next variable in the client.query call with either a 1 or '1' (or any other number/string) then 1 will appear as the id in postgres
tagged with: postgresql
has comment: http://stackoverflow.com/comment/39595541
type: Question
has title: Javascript 'number' and postgres types
has answer: http://stackoverflow.com/a/25388450
tagged with: node.js
score: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25388450
type: AnsweredQuestion

http://stackoverflow.com/comment/39445545
has text: I'll take the CSS solution as min-height was just temporary, but thanks anyway :)
comment on: http://stackoverflow.com/a/25306103
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/q/25291915
answer count: 2
tagged with: javascript
tagged with: jquery
has title: Prevent $element.on('click') before ajax is loaded
accepted answer: http://stackoverflow.com/a/25292002
has comment: http://stackoverflow.com/comment/39416277
tagged with: ajax
has comment: http://stackoverflow.com/comment/39416356
type: AnsweredQuestion
score: 0
possible better answer: http://stackoverflow.com/a/25292003
has answer: http://stackoverflow.com/a/25292003
has body: I am making and ajax call and storing the results in an array. After the first set of data is loaded, I am using next and previous buttons to navigate through the array. I want to prevent any $(element).on('click') events from happening until I have the first set of data loaded. Is there any way to do this? I have already tried to use $(element).unbind('click'); for when the document loads and then $(element).bind('click'); when the ajax call is successful, but still clicking on either the next or previous links will still trigger my $('#next #prev').on('click', function () { //my code to navigate through the array here. }); Anyone have any ideas on how I can complete stop this event from firing until the ajax has loaded?
type: Question
has answer: http://stackoverflow.com/a/25292002

http://stackoverflow.com/comment/39573652
has text: The `clearTimeout` isn't required (but it's nice to have). +1 for the fixes and resolving in both cases to indicate this is a check and that not having the connection is not an exceptional case.
type: AnswerComment
comment on: http://stackoverflow.com/a/25376111
score: 0
type: Comment

http://stackoverflow.com/comment/39329540
type: Comment
type: QuestionComment
has text: You could use JS to achieve the same thing, it just won't be as efficient at doing it.
comment on: http://stackoverflow.com/q/25244300
score: 0

http://stackoverflow.com/q/25315841
downvote count: 0
has comment: http://stackoverflow.com/comment/39461078
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39461024
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
upvote count: 1
has body: I am getting the following json from a rest webservice. - [ { "jobId": 1000160829, "jobRefID": "Blue Shields key hospital contract negotiations using robust analytic tools and analyses--strategic contract roadmap, negotiation factsheets, and…", "companyName": "Blue Shield Of California", "jobTitle": "Senior Manger, Business Analysis", }] I have the following code to use this data and generate dynamic html content - htmlAdd += ' '; for (i=0; i<data.length; i++){ htmlAdd += ' '; htmlAdd += ' '; htmlAdd += ' '+data[i].jobTitle+'— ; htmlAdd += ' '+data[i].companyName+'—'+data[i].city+', '+data[i].state+' '; htmlAdd += ' · '+data[i].jobDescription+'details ; htmlAdd += ' ; htmlAdd += ' '; } htmlAdd += ' ; document.getElementById('jobListing').innerHTML = htmlAdd; The same static code works - Senior Software Engineer — Data Science team · Rapidly develop proof-of-concept prototypes to prove out hypotheses · Design, architect, implement, and debug robust, high-volume production... details Overview | Reviews | Salaries Anyone knows where is the mistake?
type: Question
has comment: http://stackoverflow.com/comment/39461046
has title: unexpected token illegal error when dynamically adding html content
tagged with: javascript
has comment: http://stackoverflow.com/comment/39461003
has answer: http://stackoverflow.com/a/25315887
answer count: 1

http://stackoverflow.com/q/25344519
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
tagged with: callback
has body: I have many small audio files, and I want to play these files one after another, not all of them at the same time. I have used the object Audio in javascript like this var audio_1 = new Audio(); var audio_2 = new Audio(); var audio_3 = new Audio(); audio_1.src = "/path1"; audio_2.src = "/path2"; audio_3.src = "/path3"; Now I just need to call the function play for every object, but I need to play the audio_1 alone, and play audio_2 when the first one ended. The solution I found is to test on the property ended of every object audio_1.ended; // returns true when it ends playing I found an object onended inside the audio object, I thought it's a function but it's not, can someone help me and give me the best way to solve this problem.
has answer: http://stackoverflow.com/a/25344549
type: Question
answer count: 1
tagged with: audio
score: 0
has title: Playing audio files in javascript
accepted answer: http://stackoverflow.com/a/25344549
tagged with: jquery-mobile

http://stackoverflow.com/q/25266611
has answer: http://stackoverflow.com/a/25266685
has body: I need to know, how can I perform keydown on specified element or document. Now I need to perform 'click on right arrow'. I tried this: $('#page').trigger({type: 'keydown', name: 'right'}); But this doesn't work. Is here any solution, how can I perform action like this?
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/25266685
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/832059
linked to: http://stackoverflow.com/q/3368578
has answer: http://stackoverflow.com/a/25266706
duplicate of: http://stackoverflow.com/q/832059
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25266721
possible better answer: http://stackoverflow.com/a/25266706
has title: Perform keydown
type: Question

http://stackoverflow.com/q/25301034
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/368813
possible better answer: http://stackoverflow.com/a/25301102
tagged with: select
has comment: http://stackoverflow.com/comment/109987585
score: 23
has comment: http://stackoverflow.com/comment/39433670
type: Question
has comment: http://stackoverflow.com/comment/39433580
tagged with: readonly
has title: how to set select element as readonly ('disabled' doesnt pass select value on server)
has comment: http://stackoverflow.com/comment/39433559
has comment: http://stackoverflow.com/comment/125770052
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/29044377
favorite count: 0
accepted answer: http://stackoverflow.com/a/29044377
has answer: http://stackoverflow.com/a/39095421
has comment: http://stackoverflow.com/comment/39433607
has answer: http://stackoverflow.com/a/25301102
has answer: http://stackoverflow.com/a/30905507
answer count: 5
has answer: http://stackoverflow.com/a/59989423
upvote count: 25
downvote count: 2
has comment: http://stackoverflow.com/comment/39433712
has body: When i used any of the following code ,select element do looks like disabled,but the select is not pass on the server : Im thinking of the readonly to be used, but i dont know or is that will solved the issue. Any help is much appreciated. $('#selectID').prop('disabled',true); $('#selectID').prop('disabled','disabled'); $('#selectID').attr('disabled',true); $('#selectID').attr('disabled','disabled');

http://stackoverflow.com/a/25355738
has body: So there are two parts to your question: How can I make just that Refresh after submit is pressed You can use jquery-form for that. In your case, you can initialize your form to something like this: $(document).ready(function() { var options = { url: 'your_form_action', target: '#player-song-comments', // target element(s) to be updated with server response type: 'post' // 'get' or 'post', override for form's 'method' attribute }; // bind form using 'ajaxForm' $('#song-comment-form').ajaxForm(options); }); There are many other options you can play with. OR every 30 seconds? Try change your $comments.load("/template/sections/player_comments.php #player-song-comments"); to $comments.load("/template/sections/player_comments.php"); // remove the selector According to the docs, the selector is used to insert fragments of the remote document. In other words, when load was executed, jQuery parses the returned document to find the element #player-song-comments. This element, along with its contents, is inserted into the element with an ID of result, and the rest of the retrieved document is discarded.... I assume #player-song-comments is not part of your response?
type: Answer
has comment: http://stackoverflow.com/comment/39538131
answers question: http://stackoverflow.com/q/25354123
score: 0
has comment: http://stackoverflow.com/comment/39538542
has comment: http://stackoverflow.com/comment/39552634
has comment: http://stackoverflow.com/comment/39552926
has comment: http://stackoverflow.com/comment/39552853

http://stackoverflow.com/comment/39699157
score: 0
type: AnswerComment
has text: I read through it and i had some sort of the same solution.. if i really want something outside of it i load it in the index.html view where normally the tabs are loaded into this is usefull because it also makes an option for excluding the tabs in some pages like a detail page with a back button and footer actions don't really need tabs, they can just click back to get to the tabs
type: Comment
comment on: http://stackoverflow.com/a/25428206

http://stackoverflow.com/a/25346034
has comment: http://stackoverflow.com/comment/39516667
downvote count: 0
has comment: http://stackoverflow.com/comment/39522227
has comment: http://stackoverflow.com/comment/39516526
answers question: http://stackoverflow.com/q/25346009
type: Answer
upvote count: 1
has body: I've never used them myself but there appears to be javascript events for video/audio, including ended. video.addEventListener('ended', foo); Where foo would be a function to hide the video. Hope that helps!
score: 1

http://stackoverflow.com/q/25343721
tagged with: javascript
tagged with: jquery-events
answer count: 2
accepted answer: http://stackoverflow.com/a/25348349
has answer: http://stackoverflow.com/a/25344748
downvote count: 0
has comment: http://stackoverflow.com/comment/39513425
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25344748
linked to: http://stackoverflow.com/q/1921855
has comment: http://stackoverflow.com/comment/39513742
has comment: http://stackoverflow.com/comment/39513888
type: AnsweredQuestion
has body: I have a problem with queuing up events in jQuery. I have an elevator project that allows the user to click on buttons, and then lights go on and then numbers change. That works fine, except when they punch a number again before it reaches the floor picked the first time. I want it to get to the floor first picked before it goes to the second clicked floor (or third, or fourth, etc.). I've done some stuff with .promise, when done, etc. and none of it seems to work. I am using .click which appears to be the issue, because it fires the function regardless of where it is currently. Trouble is that I can't seem to find any alternative and it needs to finish current operation first before moving on to any other floors. I hope I explained this well. If not please let me know. Perhaps there is another way entirely of doing it. Still learning this front end/jQuery stuff. $( ".button" ).click(function(event) { // doing stuff here.... $( runMainscript() ).promise().done(function() { runMainscript(buttonclicked, floorQ); }); }); function runMainscript(buttonclicked,floorQ) { //doing stuff here } BTW, here is a timer for 2 seconds on each floor. JSfiddle: http://jsfiddle.net/ak25Lxab/1/ See how if you click on two buttons quickly, it jumps around?
score: 1
has title: Queue up a function after click events
upvote count: 1
has answer: http://stackoverflow.com/a/25348349
has comment: http://stackoverflow.com/comment/39513824
type: Question

http://stackoverflow.com/q/25372736
score: 11
type: AnsweredQuestion
type: Question
tagged with: javascript
upvote count: 11
has answer: http://stackoverflow.com/a/25372925
accepted answer: http://stackoverflow.com/a/25372925
has body: I'm trying to recreate a chart (the one below) using Highcharts. I'm using a basic bar chart, and I'm wondering if there is a way to get a vertical line showing the average of all the bars? I have the value calculated, I just need it to display as the picture shows. Can I do this using Highcharts?
has title: Can I add an "average" line to Highcharts Chart?
tagged with: highcharts
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/39309545
score: 0
type: QuestionComment
type: Comment
has text: Thanks @smerny I see the error in my console..like I said I don't know much about javascript. Which is why I came here to get help.
comment on: http://stackoverflow.com/q/25234255

http://stackoverflow.com/q/25299179
tagged with: css
has answer: http://stackoverflow.com/a/25299215
score: 0
answer count: 2
has title: How to make a user-controlled slideshow on webpage
tagged with: slideshow
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39430377
has body: I am teaching myself how to build webpages. In my code, I have a slideshow at the top. It automatically changes pictures. I want to change this feature so that it only changes the picture by clicking. I want arrows on both sides of the picture (previous and next buttons). How would I go about doing that? Here is my code so far: HTML: First One! THIS IS THE WORLD OF KENDRICK LAMAR She Needs me Swimming Pools Rigamortus King B/W Complex CSS: body { font-family: 'Signika', sans-serif; background-color: #f3871f; text-align: center; } .firsthalf h1 { border: 5px solid black; } .menu ul { display: inline; } Thank you!
tagged with: jquery
has answer: http://stackoverflow.com/a/25299254
type: Question
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39571029
type: QuestionComment
has text: You really ought to read about using feature detection rather than browser detection. Browser detection is brittle and can break each time a new browser is released. Feature detection don't right is both forward and backward compatible.
comment on: http://stackoverflow.com/q/25375318
score: 0
type: Comment

http://stackoverflow.com/q/25373124
downvote count: 0
tagged with: jquery
tagged with: unobtrusive-validation
favorite count: 0
has title: adding a custom jquery.validation method results in Uncaught TypeError: Cannot read property 'call' of undefined
accepted answer: http://stackoverflow.com/a/25373423
has body: I am battling to get jquery.validation to work with a custom method. I am trying this $.validator.addMethod("validateMe", function (value, element) { alert("validate"); }); $( "#myTextBox" ).rules( "add", { validateMe: true }); I am using jquery.validate v1.12 but when trying to validate I get an error of Uncaught TypeError: Cannot read property 'call' of undefined Am I missing something here?
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/43418672
tagged with: javascript
has answer: http://stackoverflow.com/a/25373423
tagged with: validation
answer count: 1

http://stackoverflow.com/comment/39488214
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25330193
has text: try swapping @RenderBody() & @RenderSection("BodyScripts", required: false) around

http://stackoverflow.com/comment/39480286
has text: Why are you not allowed to use jQuery but you are allowed to use its `$.ajax` functionality?
comment on: http://stackoverflow.com/q/25326095
score: 0
type: Comment
type: QuestionComment

date
tags question: http://stackoverflow.com/q/25382290
tags question: http://stackoverflow.com/q/25309434
tags question: http://stackoverflow.com/q/25260009
tags question: http://stackoverflow.com/q/25329108
tag name: date
tags question: http://stackoverflow.com/q/25389438
tags question: http://stackoverflow.com/q/25300213
tags question: http://stackoverflow.com/q/25241142
tags question: http://stackoverflow.com/q/25385911
tags question: http://stackoverflow.com/q/25290617
tags question: http://stackoverflow.com/q/25306216
tags question: http://stackoverflow.com/q/25291257
tags question: http://stackoverflow.com/q/25269242
tags question: http://stackoverflow.com/q/25317012
tags question: http://stackoverflow.com/q/25352139
tags question: http://stackoverflow.com/q/25381268
tags question: http://stackoverflow.com/q/25268850
tags question: http://stackoverflow.com/q/25293545
tags question: http://stackoverflow.com/q/25275696
type: Tag
tags question: http://stackoverflow.com/q/25378419
tags question: http://stackoverflow.com/q/25290174
tags question: http://stackoverflow.com/q/25246843
tags question: http://stackoverflow.com/q/25288781
tags question: http://stackoverflow.com/q/25313706
tags question: http://stackoverflow.com/q/25314862
tags question: http://stackoverflow.com/q/25280308
tags question: http://stackoverflow.com/q/25358137
tags question: http://stackoverflow.com/q/25289757
tags question: http://stackoverflow.com/q/25367789
tags question: http://stackoverflow.com/q/25246097

http://stackoverflow.com/a/25529263
upvote count: 4
has body: With below code you can auto close JavaScript alert windows, get message text or send click message to buttons on alert window. WindowStateChanged event does not fire on JavaScript alert show (on my environment). if it fires, below code can be used. &lt;DllImport("user32.dll", SetLastError:=True)&gt; _ Private Shared Function GetForegroundWindow() As IntPtr End Function Private Sub aaxWebBrowser1_WindowStateChanged(sender As Object, e As AxSHDocVw.DWebBrowserEvents2_WindowStateChangedEvent) HandleJavascriptAlertwindows(GetForegroundWindow(), False) End Sub or you can use ForeGroundWindowWatcher class to catch JavaScript alert windows. if AxWebbrowser on a form you should change Me.ParentForm.Handle to Me.Handle Private ForeGroundWindowWatcher_ As ForeGroundWindowWatcher Private Sub StartForeGroundWatcher() ForeGroundWindowWatcher_ = New ForeGroundWindowWatcher AddHandler ForeGroundWindowWatcher_.ForegroundWindowHasChanged, AddressOf ForeGroundWindowWatcher_ForegroundWindowHasChanged ForeGroundWindowWatcher_.Startt() End Sub Private Sub StopForeGroundWatcher() If ForeGroundWindowWatcher_ IsNot Nothing Then RemoveHandler ForeGroundWindowWatcher_.ForegroundWindowHasChanged, AddressOf ForeGroundWindowWatcher_ForegroundWindowHasChanged ForeGroundWindowWatcher_.Stopp() End If End Sub Private Sub btnStartForeGroundWatcher_Click(sender As System.Object, e As System.EventArgs) Handles btnStartForeGroundWatcher.Click 'Should be called inside form_load event StartForeGroundWatcher() End Sub Private Sub btnStopForeGroundWatcher_Click(sender As System.Object, e As System.EventArgs) Handles btnStopForeGroundWatcher.Click 'Should be called inside form_Closing event StopForeGroundWatcher() End Sub Private Sub ForeGroundWindowWatcher_ForegroundWindowHasChanged(sender As Object, ForeGroundWindowHandle As IntPtr) HandleJavascriptAlertwindows(ForeGroundWindowHandle, False) End Sub Private LastForeGroundWindowHandle As IntPtr = IntPtr.Zero Private Sub HandleJavascriptAlertwindows(ForeGr…
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25376595
answers question: http://stackoverflow.com/q/25376595
type: Answer
score: 4

http://stackoverflow.com/comment/39394530
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25280202
type: Comment
has text: As I'm using Typescript I get a compilation error if I try to "declare" an undefined function like that.

http://stackoverflow.com/comment/39538359
has text: I have tried, but it's same as earlier
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25356337
type: QuestionComment

http://stackoverflow.com/q/25304663
has body: hope you can help I want to have a drop down list that searches my mysql database and shows the first and last names of the users. You can then select any of the names and it will generate the rest of the membership details (i.e. date signed up, last logged in etc). I have got the dropdown list working fine, but my problem comes with the next step of generating the rest of the details. With my below code it just shows the details of the last user who signed up and does not change when I change the name in the drop down menu. I'm pretty sure I need Javascript to help get this working but as I am a beginner to PHP/MYSQL any advise toward the right direction for me would be great. Thanks This is the code which searches my database and puts the first and last name in to a drop down list $sql = "SELECT first_name,last_name FROM registration_tbl"; $query = mysqli_query($dbc, $sql); echo '&lt;select name="name" style="width: 400px"&gt;'; while ($row = mysqli_fetch_assoc($query)){ $firstname = $row['first_name']; $lastname = $row['last_name']; echo'&lt;option&gt;' . $firstname . " " . $lastname . '&lt;/option&gt;'; } echo '&lt;/select&gt; &lt;p&gt;'; Again the above code works fine, but the below code is what I am having difficulty with $sql = "SELECT * FROM registration_tbl WHERE first_name = '".$firstname."'"; $query = mysqli_query($dbc, $sql); while($row = mysqli_fetch_array($query)){ echo "ID: " . " " . $row[0] . "&lt;br&gt;" . "Name: " . $row[1] . " " . $row[2] . "&lt;br&gt;" . "Company: " . $row[3] . "&lt;br&gt; " . "Email: " .$row[4] . "&lt;br&gt; " . "Date of registration: " . $row[6] . "&lt;br&gt; " . "Last login: " .$row[7] . "&lt;br&gt;" . "Admin/User: " .$row[8] . "&lt;p&gt;"; }
has comment: http://stackoverflow.com/comment/39440307
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25304967
has answer: http://stackoverflow.com/a/25304809
tagged with: mysql
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39440453
has comment: http://stackoverflow.com/comment/39440356
has title: Generating more MYSQL database results when a dropdown list is selected
has answer: http://stackoverflow.com/a/25305159
accepted answer: http://stackoverflow.com/a/25305159
score: 0
has comment: http://stackoverflow.com/comment/39440648
possible better answer: http://stackoverflow.com/a/25304809
has comment: http://stackoverflow.com/comment/39440227
answer count: 4
has answer: http://stackoverflow.com/a/25323524

http://stackoverflow.com/comment/39596535
type: AnswerComment
score: 0
type: Comment
has text: @SimpleAsCouldBe Head's up -- I fixed the line `el.setAttribute("data-element-hash", hash);`
comment on: http://stackoverflow.com/a/25375255

http://stackoverflow.com/q/25251131
tagged with: javascript
has body: I want to solve a clustering problem Thanks to Mårten Wikström, he explained it nicely. I want to implement the tile/sub tile partitioning scheme using quadtree My data is large data collected by volunteers. what cheapest architecture and tools is best recommended to design and visualize this data so that the points will not be cluttered on the map? Is there some one solved same problem and can share the code and architecture design or recommend me some?
has comment: http://stackoverflow.com/comment/39353138
linked to: http://stackoverflow.com/q/6641919
has title: Decluttering too many point markers
has answer: http://stackoverflow.com/a/25251722
upvote count: 0
answer count: 1
tagged with: mashup
favorite count: 0
has comment: http://stackoverflow.com/comment/39353028
tagged with: openlayers
type: UnansweredQuestion
score: -3
tagged with: php
downvote count: 3
type: Question
tagged with: geoext

http://stackoverflow.com/q/25349339
has title: Can't run two functions after each other
possible better answer: http://stackoverflow.com/a/25349360
tagged with: get
score: 0
answer count: 2
has body: When I execute this code, I'm getting Uncaught TypeError: object is not a function and only status runs. What is the problem? $(document).ready(function() { steam('status', 60000); steam('currently-playing', 60000); }); function steam(mode, repeat) { // VARIABEL var checked = true; // HÄMTA steam = $.ajax({ url: 'ajax-get/steam/' + mode.replace('-', '_'), type: 'GET', beforeSend: function() { $('#steam-' + mode).html(' Hämtar data från Steam API - var god vänta '); }, success: function(s) { checked = false; $('#steam-' + mode).html(s); }, error: function() { $('#steam-' + mode).html(' Kunde inte hämta. Var god försök igen '); } }); setInterval(function() { if(checked == false) { // HÄMTA steam = $.ajax({ url: 'ajax-get/steam/' + mode.replace('_', '-'), type: 'GET', success: function(s) { $('#steam-' + mode).html(s); }, error: function() { $('#steam-' + mode).html(' Kunde inte hämta. Var god försök igen '); } }); } }, repeat); }
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39522207
has comment: http://stackoverflow.com/comment/39522176
accepted answer: http://stackoverflow.com/a/25349358
has answer: http://stackoverflow.com/a/25349360
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39522171
has answer: http://stackoverflow.com/a/25349358
type: Question

http://stackoverflow.com/comment/39368259
type: Comment
comment on: http://stackoverflow.com/a/25265949
has text: Perfect! No idea that double square brackets would handle the period between the two variables. Thanks.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39483446
comment on: http://stackoverflow.com/q/25327561
score: 1
type: Comment
has text: that code is not valid. `temp.push{ .. }?`
type: QuestionComment

http://stackoverflow.com/comment/39531707
score: 0
has text: do you wish to randomize the object keys also? or the keys are the same each time?
comment on: http://stackoverflow.com/q/25354652
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39465843
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25318353
has text: You could try this? http://davidwalsh.name/pseudo-element
score: 0

http://stackoverflow.com/comment/39458515
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25309118
has text: I am on phone now, I can create working fiddle for you tomorrow if it helps

http://stackoverflow.com/q/25381159
answer count: 2
has answer: http://stackoverflow.com/a/25381248
accepted answer: http://stackoverflow.com/a/25381213
has body: I see a JavaScript Signature like: attachMetadataFailed(oData?, fnFunction, oListener?) now I know, that the first and the last parameter are optional. But the mandatory parameter is in the middle. How can I call the function, if I dont want to set the optional parameters? I think when I will use attachMetadataFailed(function() {...}) that I will access just the first parameter which is optional or not?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39581253
has answer: http://stackoverflow.com/a/25381213
type: Question
has title: How to pass Arguments to this signature?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39581418
possible better answer: http://stackoverflow.com/a/25381248
score: 0

http://stackoverflow.com/a/25366129
answers question: http://stackoverflow.com/q/25364544
type: Answer
has body: I am not familiar with jQuery Calculations, but it looks like what you are doing can be achieved using plain jQuery or javascript. I did a quick google search for jquery sum and I found this other stackoverflow post that might help you. stackoverflow sum You can add a class attribute called "sum" to all the fields you want to sum up and use the jquery marked as the answer. Once you get done calculating the total you can assign it to the total amount input field. $('.sum').blur(function () { var sum = 0; $('.sum').each(function() { sum += Number($(this).val()); }); $("#totalsum").val(sum); });​​​​​​​​​
score: 0

http://stackoverflow.com/comment/39511125
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25342717
has text: That is not how JavaScript works.

http://stackoverflow.com/q/25346315
type: Question
tagged with: html5-audio
upvote count: 1
has title: Audio Playback in Firefox malfunctioning at around 98%
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39518709
tagged with: firefox
answer count: 0
downvote count: 0
has body: I'm working with user-uploaded audio in javascript/html5, such that the user file input becomes the src for an audio element. In all my development so far, things have been working very well in chrome and safari; but I have one problem with firefox that I can't figure out and I don't know where to begin looking. Other than this, firefox works fine, too! Consistently I'm finding that when audio.currentTime is very near to audio.duration (about 98%, to be more precise), the play and pause methods don't work properly. When I try to pause the audio at any point past ~98%, the audio just finishes playing. Trying to play the audio then defaults to doing whatever happens when one plays the audio after it has ended. If audio controls are on, the slider works as it should stopping and starting no matter when play or pause are called. This is really bugging me out... anyone have any ideas, similar experiences?
score: 1
favorite count: 0

http://stackoverflow.com/q/25240521
tagged with: vb.net
answer count: 0
has title: How to call VB method with JS or JQuery
linked to: http://stackoverflow.com/q/25205527
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/39321479
tagged with: asp.net
has comment: http://stackoverflow.com/comment/39321301
has body: Hi I've been having issues with ASP and VB DDL not firing the selectedIndexChanged when the drop down value changes - please see my earlier question. I've been searching for a an asp and vb solution for three days. Coming to the realisation that to force this I'll need to use something client side or change the entirety of my code, which isn't really an option. Problem is I have very limited experienced with JQuery and JavaScript and cannot get the selectedIndexChanged event to fire from the client side. How can I do this and is this possible? I've seen a few things on google but either I'm implementing these wrong or they're not working for me in this instance. Any help would be greatly appreciated and would answer both my questions. Thanks in advance. ****Update 1**** Example code I've tried and to give an example of what I'm trying to achieve. JavaScript function JsFunction() { __doPostBack("DLL", ""); } DDL snippet &lt;asp:DropDownList ID="DDL" runat="server" Width="120px" OnSelectedIndexChanged="DDL_SelectedIndexChanged" AutoPostBack="true" CausesValidation="false" EnableViewState="true" onchange="javascript:JsFunction()"&gt; &lt;asp:ListItem Value="0"&gt;Select&lt;/asp:ListItem&gt; Update 2 JS I've also tried without success function JsFunction() { AJAXControlToolKit.HTMLEditor.Announcements.DDL_SelectedIndexChanged(); } And function JsFunction() { document.getElementById('&lt;%=DDL.ClientID').click() }
type: UnansweredQuestion

http://stackoverflow.com/comment/39304403
score: 0
comment on: http://stackoverflow.com/q/25230527
type: Comment
type: QuestionComment
has text: @muistooshort I have updated the jsfiddle (previous wasn't correct) http://jsfiddle.net/mb85yc2r/7/ with this logic, the router pancakes method should be called

http://stackoverflow.com/comment/39382772
comment on: http://stackoverflow.com/a/25273627
type: AnswerComment
has text: Please put the code in the answer, not just a link.
score: 0
type: Comment

http://stackoverflow.com/q/25308848
downvote count: 0
tagged with: javascript
has body: I have a form as follows: Show Home Type 1 Type of Home: Please select the Type of Home 1. Type of Home 2: Please select the Type of Home 2. So, Home Type 2 dropdown is always visible and Home Type 1 is visible only on selection of the checkbox. Now, on click of form submit button, I set the $scope.submitted variable to true and stops the submission as follows: $scope.submitted = true; if($scope.MyForm.$invalid == true){ return false; } So, this brings the red colored bolder to my Home Type 2 dropdown. Till this everything is fine. If I select any value to Home Type 2 dropdown, the red color is gone and I am able to submit the form also (as Home Type 1 is still hidden, so it is not validated). But the problem comes when I do as follows: Lets say my Home Type 2 is blank and Home Type 1 checkbox is not selected (so Home Type 1 is hidden) and I try to submit the form. This triggers submit and makes Home Type 2 red. And stops the submission. Then I selected the Home Type 1 checkbox, so it makes Home Type 1 visible on the screen. But this Home Type 1 is also in red color !! I want to validate this Home Type 1 dropdown only when form is submitted and this field was visible at that submission. If Home Type 1 was hidden at the time of submission, it should not be red when it is made visible if user selects checkbox after first submission attempt. Hopefully I was able to explain my situation.
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/41231276
type: AnsweredQuestion
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/42095947
accepted answer: http://stackoverflow.com/a/41231276
score: 1
has title: Form validation on visible fields at that moment?
tagged with: validation
answer count: 1

http://stackoverflow.com/comment/39453006
comment on: http://stackoverflow.com/q/25311615
score: 6
has text: This question appears to be off-topic because it belongs on http://codereview.stackexchange.com/
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39518235
score: 0
comment on: http://stackoverflow.com/q/25329786
type: Comment
type: QuestionComment
has text: @ostapische You take the formulas `h = r / (A·r/(2·V)-1)` and `h = A/(2πr) - r`. Then `h = h` and solve for r.

http://stackoverflow.com/comment/39516004
score: 0
type: Comment
type: QuestionComment
has text: @NJay You just want to navigate to Math or science only. right?
comment on: http://stackoverflow.com/q/25345635

http://stackoverflow.com/comment/39352471
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25257020
has text: Is that the last payload from the server before the error, as shown by the Network panel in your browser? Because nothing here should cause `parseerror`.
score: 0

http://stackoverflow.com/comment/39647792
has text: I ran into another problem after solving the ng-change issue. The page also uses Prototype 1.6 javascript library for a datepicker widget and that uses Event.observe(parentElement, 'change', callback) to update other fields. The problem is for IE9 and 10 the dispatchEvent fires the ng-change on the parentElement but the callback inside Event.observe isn't fired which leads to other problems on the page. Would really appreciate help from someone so Prototype's event system and AngularJS can play nicely.
type: Comment
comment on: http://stackoverflow.com/a/25398029
score: 0
type: AnswerComment

http://stackoverflow.com/q/25265860
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/25266063
tagged with: node.js
has title: SocketIO volatile emit to namespace
score: 2
type: AnsweredQuestion
tagged with: socket.io
type: Question
has body: The following is failing with the error TypeError: Cannot read property 'volatile' of undefined (i.e. map doesn't have a volatile emit method): io = require("socket.io").listen(server) map = io.of "/map" temp = [] recieveDataFromSomewhere = (hit) -&gt; temp.push hit setInterval -&gt; map.volatile.emit 'data', temp temp = [] , 1000 I need to use volatile messages as the overhead of SocketIO keeping track of receipts is causing latency to rise problematically over time.
downvote count: 0
tagged with: websocket
tagged with: javascript
has answer: http://stackoverflow.com/a/25266063
answer count: 1

http://stackoverflow.com/comment/39325085
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25241232
has text: Well explained @ Valentin. I just did some logging to the console: `[...] else if (Math.random() < 0.06) { // Place a bush entity at the current tile Crafty.e('Bush').at(x, y); console.log(Crafty.e('Bush').at()); }` Assuming `Math.random()` occurs `n` times then my log shows `Object {x=0, y=0}`, `n` times. Or for each occurrence of `Crafty.e('Bush').at()`. The quotient of `0/16` is zero for all `x & y` resp, moreover it doesn't give me the current co-ords as I progress through the loop?

http://stackoverflow.com/q/25378229
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39576628
has comment: http://stackoverflow.com/comment/39576682
tagged with: text
answer count: 0
has title: How to: Place TXT File's Content (from FTP Server) in HTML5 Document
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39576399
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39576611
has body: I am trying to get the content of a TXT file (located on my FTP server) to place it in a HTML5 document. Unfortunately, I just know how to read a txt file by selecting it with a dialog. Does someone of you know how to set the content of a txt file, that is located on my FTP server? Something like: &lt;div src="ftp://john-doe.com/Ordner/Unterordner/txtFile1.txt" /&gt; Here is my content so far: &lt;body&gt; &lt;input type="file" id="files" name="files[]" multiple /&gt; &lt;output id="list"&gt;&lt;/output&gt; &lt;script&gt; function handleFileSelect(evt) { var files = evt.target.files; for (var i = 0, f; f = files[i]; i++) { var reader = new FileReader(); reader.onload = (function (theFile) { return function (e) { var span = document.createElement('span'); span.innerHTML = ['&lt;p&gt;', e.target.result, '&lt;/p&gt;'].join(''); document.getElementById('list').insertBefore(span, null); }; })(f); reader.readAsText(f, "UTF-8"); reader.readAsText(f); } } document.getElementById('files').addEventListener('change', handleFileSelect, false); &lt;/script&gt;
tagged with: ftp

http://stackoverflow.com/q/25259392
tagged with: dns
type: AnsweredQuestion
tagged with: javascript
type: Question
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/25259438
favorite count: 0
has title: nodejs creating dns name for application
has body: Hi I have node js application. I run it locally as : http.createServer(processRequest).listen(1337); To rich my application in browser I need to write: localhost:1337/index.html So I have 2 questions: If I want to rich my application as www.myapp.dev/index.html instead of localhost:1337/index.html, what I need to change in my code? I bought domain www.myserver.com, what I need to put in my app in order to do it work in this domain? Thanks.
has answer: http://stackoverflow.com/a/25259438
tagged with: node.js
score: 2
upvote count: 2

http://stackoverflow.com/q/25343560
has body: I have a global object APP which I use as a namespace for variables and functions in my applicaton: var window.APP = {}; Does it make sense to "declare" variables in this namespace before assigning them? var APP.myvar = null; APP.myvar = new Cls(); Or should I forget using var and just add properties when required to my APP object?
upvote count: 1
has comment: http://stackoverflow.com/comment/39512431
favorite count: 0
possible better answer: http://stackoverflow.com/a/25343636
score: -3
downvote count: 4
type: AnsweredQuestion
has title: In Javascript, does it make sense to "declare" a variable that is a property of an object?
type: Question
has answer: http://stackoverflow.com/a/25343636
answer count: 2
tagged with: variable-declaration
tagged with: javascript
has answer: http://stackoverflow.com/a/25343594
accepted answer: http://stackoverflow.com/a/25343594
has comment: http://stackoverflow.com/comment/39512510

http://stackoverflow.com/comment/39515477
type: Comment
comment on: http://stackoverflow.com/a/25344218
has text: Thank you, for your quick reply! :) This sounds quite logic! Can you give me an example of how to draw html-tags on canvas? I have absolutely no idea...
type: AnswerComment
score: 0

http://stackoverflow.com/q/25243367
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39326265
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39326174
has answer: http://stackoverflow.com/a/25243852
score: 1
has comment: http://stackoverflow.com/comment/39326505
type: Question
upvote count: 2
tagged with: function
has comment: http://stackoverflow.com/comment/39329301
has body: I have a function like this function lib(){ this.create = function (text){ return document.createElement(text); } /* ??? this.attribute = function{} ??? */ } function CreateSomething{ var x = lib.create('div'); } Now I want another subfunction like .create(), that I can call with. How can I do that? x.attribute('id=Test');
tagged with: javascript
has title: JavaScript function.subfunction()
has comment: http://stackoverflow.com/comment/39326279
has comment: http://stackoverflow.com/comment/39326136

http://stackoverflow.com/comment/39366466
comment on: http://stackoverflow.com/q/25259609
score: 0
type: Comment
type: QuestionComment
has text: Does the freeze still happen if you don't call `this.showPreloader()` ?

http://stackoverflow.com/q/25255345
tagged with: css
type: AnsweredQuestion
has title: How can I keep mega sub menu open after mouse leaves top navigation button?
accepted answer: http://stackoverflow.com/a/25255409
tagged with: navigation
type: Question
has comment: http://stackoverflow.com/comment/39349468
answer count: 2
has answer: http://stackoverflow.com/a/25256431
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25255409
possible better answer: http://stackoverflow.com/a/25256431
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I am new to jQuery. I am trying to set up a mega drop down that is 100% width on the screen but the content is centered. Also the top navigation buttons are centered. How can I keep the sub content area open after the mouse leaves the top button? Here is the fiddle: http://jsfiddle.net/uf1107qs/ $('.top1').on('mouseenter', function () { $('.sub1').slideDown(200).addClass('.abTop'); $('.fades1').delay(50).fadeIn(200); }); $('.top1').on('mouseleave', function () { $('.sub1').delay(600).slideUp(200).removeClass('.abTop'); $('.fades1').fadeOut(0); });
has comment: http://stackoverflow.com/comment/39349307
has comment: http://stackoverflow.com/comment/39427127

http://stackoverflow.com/q/25289330
tagged with: jquery
favorite count: 0
tagged with: datepicker
has title: How to send date from JQuery datepicker to Node.js server
score: -1
has comment: http://stackoverflow.com/comment/39411654
has comment: http://stackoverflow.com/comment/39413529
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39416275
has comment: http://stackoverflow.com/comment/39411545
has body: I want to send data from my JQuery datepicker to my Node.js server. I've got this piece of code: &lt;script&gt; $("#dp1").datepicker({ dateFormat: "dd-mm-yy", buttonImage: '/img/calendar.png', buttonImageOnly: true, changeMonth: true, changeYear: true, showOn: 'both', }); &lt;/script&gt; And datepicker appears after clicking on image. I don't know how to send the chosen date to my Node.js server after chosing the date by the user. EDIT: Ok, now I have something like this: &lt;script&gt; $("#dp1").datepicker({ buttonImage: '/img/calendar.png', onSelect: function(date) { $.ajax({ type: "POST", url: "/postDate", data: { date: date } }); } dateFormat: "dd-mm-yy", buttonImageOnly: true, changeMonth: true, changeYear: true, showOn: 'both', }); &lt;/script&gt; And now my image is not visible and I can't click on it to show the datepicker.
downvote count: 1
tagged with: node.js
has answer: http://stackoverflow.com/a/25292588
type: Question
upvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/39587393
has text: There is no such concept as "incognito app window". And app window is not a regular Chrome browsing window. What are you trying to achieve?
score: 0
comment on: http://stackoverflow.com/q/25383855
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25233606
has title: Linking multiple pages to single index.php page using PHP 'Include'
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has body: Im just practicing some things in PHP and have come across a problem. I am linking multiple pages to single index.php page using PHP 'Include' function ( as i have read it makes a large site much more manageable and easily up-dateable'. I have created external CSS files (3 in total, one for the navigation, page styling and wrapper content) and have a few external JS files which have all been linked to a PHP document named head.php. (below is the head.php contents) The main page which the server will show first will be 'index.php' so for this page i am linking all the other segments which will all fit together to create the single page. (below is the index.php contents) My problem is that in-between both the head and footer php include lines i have created a div named 'wrapper' (styles are already applied to an external CSS sheet named 'style.css' which is linked in head.php) (please see bottom for style.css contents) I would presume that when i view index.php in my browser (i am using XAMPP) that is should show the wrapper on the page, however i can not see the wrapper and i just continue to see the navigation bar only, i find this strange as i can use and tags in index.php which are externally styled by the php included head.php page. Please take a look at my code below for all the pages mentioned, I'm not sure what i am doing wrong here. Thank you BELOW IS HEAD.PHP: MC SMM | Home BELOW IS STYLE.CSS: #wrapepr { background-color:black; width:1000px; height:1000px; margin:0 auto; } BELOW IS INDEX.PHP: <?php include('segments/head.php'); ?> <?php include('segments/facebookjs.php'); ?> <?php include('segments/homenav.php'); ?> <?php include('segments/headbottom.php'); ?>
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25233656
accepted answer: http://stackoverflow.com/a/25233656
tagged with: php
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/q/25267158
score: 1
has body: I am trying to grab data from a wordpress blog using the WP-API plugin. My js file is using jQuery to make ajax calls to the api. I need to use JSONP as the response type since I am trying to access cross domain information. When the page loads, I get an error "Uncaught TypeError: number is not a function" and my response begins like this: /**/1([{"ID":231,"title":blahblahblah... with the error pointing at the "1" in the console. This is the code I am using to try and grab the data and parse it: function get_posts(num_offset) { offset = num_offset, url = 'http://www.example.com/wp-json/posts?_jsonp=1&amp;filter[posts_per_page]=5&amp;filter[offset]=' + offset; $.ajax({ type: 'GET', dataType: "jsonp", url: url, success: function (data) { consol.log(data); console.log(url); } }); // second ajax call to get the total number of posts $.ajax({ type: 'GET', dataType: "jsonp", url: 'http://www.example.com/wp-json/posts?_jsonp=1&amp;filter[offset]=-1', success: function (data) { console.log(data); } }); } I guess I need to know how I can remove the "Uncaught TypeError: number is not a function" error and then how I would be able to parse the JSONP data. much thanks!
tagged with: wordpress
accepted answer: http://stackoverflow.com/a/25267247
type: Question
tagged with: jsonp
tagged with: javascript
tagged with: jquery
has title: Uncaught TypeError: number is not a function when parsing JSONP response in jQuery ajax call
tagged with: ajax
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25267247
upvote count: 1
type: AnsweredQuestion

http://stackoverflow.com/comment/39536640
score: 2
type: Comment
comment on: http://stackoverflow.com/a/25352685
has text: You should combine it with CSP and disallow any inline javascript: http://www.html5rocks.com/en/tutorials/security/content-security-policy/?redirect_from_locale=de
type: AnswerComment

http://stackoverflow.com/a/25264985
score: 0
has body: You need to trigger onclick also: frm.elements[i].onclick(); To avoid last element from click you need to reduce length in for-loop by 1, so final code should be: function SelectAll() { var frm = document.forms[0]; for (i = 0; i &lt; ( frm.elements.length - 1 ); i++) { frm.elements[i].checked=true; frm.elements[i].onclick(); } }
type: Answer
answers question: http://stackoverflow.com/q/25264951

http://stackoverflow.com/comment/39437557
has text: This way it doesnt even run the regformhash function. Now it just copies the content of registration_form to the url line without a hashed password: ......index.html?username=Test&email=test@example.com&password=Lol123&confirmpwd=Lol123#
type: Comment
comment on: http://stackoverflow.com/a/25303077
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39338277
comment on: http://stackoverflow.com/q/25249423
has text: @JonathanM Some of the methods used to get the final result is run.cgi have built-in print statements, which I did not want to be outputted, so I instead just wrote only the result to a JSON. I suppose I could just return it immediately though and parse out those unwanted print statements.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25343197
downvote count: 0
has answer: http://stackoverflow.com/a/30247093
tagged with: gulp
favorite count: 0
type: Question
score: 4
has body: I have a gulp task for precompiling handlebars templates that consists of the following: gulp.src(['templates/*.hbs']) .pipe(handlebars()) .pipe(declare({ namespace: 'Template.templates', noRedeclare: true })) .pipe(concat('compiled.js')) .pipe(header('Template = {};\nTemplate.render = function(templateName, context) { return Handlebars.template(Template.templates[templateName])(context) };\n')) .pipe(gulp.dest('templates')); I want to create a gulp plugin that wraps this functionality to make it easier to use, like this: gulp.src(['templates/*.hbs']) .pipe(handlebars2()) .dest('templates') Or with options: gulp.src(['templates/*.hbs']) .pipe(handlebars2({ filename: 'compiled.js', namespace: 'Template' })) .dest('templates') The documentation for writing gulp plugins and the examples source code I've looked at only show the usage of streams, and I'm not sure how to apply that to leveraging other gulp plugins inside my own. How do I write a gulp plugin to accomplish the functionality of handlebars2 above? Even if someone just points me in the right direction, I can solve it and post the solution as an answer for others. Thanks!
answer count: 2
has answer: http://stackoverflow.com/a/30647943
tagged with: javascript
upvote count: 4
type: AnsweredQuestion
has title: How do I write a gulp plugin that uses other gulp plugins?
accepted answer: http://stackoverflow.com/a/30647943
possible better answer: http://stackoverflow.com/a/30247093

http://stackoverflow.com/a/25342791
score: 2
has comment: http://stackoverflow.com/comment/39511851
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25342743
has body: You get "Guy" because you set it as name property of o, and then return o to the outside, making it public. If you want private variables, you can use function Person(name, age, job){ "use strict"; // name, age, job are private variables // sayName is a privileged method this.sayName = function(){ alert(name); }; } var newGuy = new Person("Guy", 21, "Seeker"); newGuy.name; // undefined Note you don't need to create a new o object and return it, just call the constructor with new operator and assign public/privileged properties to this. I suggest reading Private Members in JavaScript, by Douglas Crockford.
answers question: http://stackoverflow.com/q/25342743
has comment: http://stackoverflow.com/comment/39511823
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/39511387

http://stackoverflow.com/comment/39401238
score: 0
type: QuestionComment
has text: Thank you all I will try this , so promise.done() first then disable the button
type: Comment
comment on: http://stackoverflow.com/q/25283642

http://stackoverflow.com/a/25287768
accepted answer of: http://stackoverflow.com/q/25287568
type: Answer
answers question: http://stackoverflow.com/q/25287568
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39408612
has body: There are several issues here. There doesn't need to be any correlation between how the data is stored and how it is served. Usually there is no correlation between the two for data. I agree with Pointy that the first thing you should do is the very simple solution of serving the whole file and acting on it client-side only. Evaluate the size of the file served and performance. Is this sufficient for your needs? If so, don't optimize unnecessarily. Note: When testing performance make sure you have a production size data set with realistic variance and range of data. If this is not good enough, you need to identify what the bottleneck is. Is it the lookup on the client side? Is it the data transfer? Is the data transferred onload or on first need? If on first need is it reasonable to transfer it earlier? Does that solve the problem? If the problem is indeed transferring the amount of data from server to client, then write a smart server side handler that stores the data in memory in chunks, usually by first letter or first two letters, and serves those chunks as needed. Make sure each chunk can be individually cached (proper cache headers). If the problem is not transferring but client side processing (which is very likely), look at how you're storing the data in the JSON file. It will likely benefit to create indexes where when you first load the data, loop through it and create new lists of all items starting with each first letter, then all items starting with two letter combinations and then when you access what you need you can use these lists, like this: var oneLetterIndex = {}; oneLetterIndex['a'] = [items starting with a...] oneLetterIndex['b'] = [items starting with b...] ... // do the above dynamically of course.. Then evaluate, and if need more performance, do the same for two letters.. var twoLetterIndex = {}; twoLetterIndex['aa'] = [...]; twoLetterIndex['ab'] = [...]; ... twoLetterIndex['zz'] = [...]; // again, do dynamically and skip the two letter comb…
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25284031
accepted answer of: http://stackoverflow.com/q/25277496
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25277496
type: Answer
downvote count: 0
score: 1
has body: Firstly, you need to make sure you define your associations correctly. Any has_many association should be defined with a plural name - #app/models/exercise.rb Class Exercise &lt; ActiveRecord::Base has_many :exercise_equipments has_many :equipments, :through =&gt; :exercise_equipments accepts_nested_attributes_for :exercise_equipments end #app/models/exercise_equipment.rb Class ExerciseEquipment &lt; ActiveRecord::Base belongs_to :exercise belongs_to :equipment end #app/models/equipment.rb Class Equipment &lt; ActiveRecord::Base has_many :exercise_equipments has_many :exercises, through: :exercise_equipments end If you've already got it working, and are happy with what you've got, then I'd recommend keeping your current setup. However, you may wish to adopt the above for convention's sake Edit I see from the deleted answer that Beartech investigated this, and turns out Rails treats Equipment / Equipments as the same. Will be worth ignoring the above, but I'll leave it for future reference Params I cannot get the parameters to actually send through the values of the collection element that I pick. See below for the model, view, controller, and parameters. I think I get what you mean - you're looking to update the record, but it does not send through the updated parameters to your controller, hence preventing it from being updated. Although I can't see any glaring problems, I would recommend the issue is that you're trying to populate the exercise_id of an Exercise object. You need to define it for the exercise_equipment object: &lt;%= f.fields_for :exercise_equipment do |eef| %&gt; &lt;%= eef.collection_select :equipment_id, Equipment.all, :id, :name %&gt; &lt;%= eef.check_box :is_optional %&gt; &lt;% end %&gt; This will populate your exercise_equipment table as described here: Time: 61.279 ms postgres@=&gt;db=# select id, exercise_id, equipment_id, optional from exercise_equipment; id | exercise_id | equipment_id | optional ----+-------------+--------------+--------…
has comment: http://stackoverflow.com/comment/39404256
upvote count: 1

http://stackoverflow.com/comment/39302301
comment on: http://stackoverflow.com/a/25230663
type: AnswerComment
type: Comment
has text: I think you need to do a lot of work on trying to explain your issues. I'm still not understanding what you want. Maybe someone else will be able to help you out. Sorry.
score: 0

http://stackoverflow.com/comment/39595741
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25388504
has text: Did you actually inspect the contents of [`request.url`](http://nodejs.org/api/http.html#http_message_url)?

http://stackoverflow.com/comment/39459544
has text: You can also use `$(".location:contains('Country')").siblings(".label")` if there are more elements in each h3
score: 1
comment on: http://stackoverflow.com/a/25315050
type: AnswerComment
type: Comment

http://stackoverflow.com/a/55484032
has body: Unfortunately the above solutions didn't work for me, it only worked when I queried shadowRoot and execute with delay after the tweet loads: Javascript setTimeout((function() { return $('.twitter-tweet').each(function() { return $(this.shadowRoot).find('.EmbeddedTweet').css({ width: '99%', maxWidth: '100%' }); }); }), 2000); Coffeescript setTimeout (-&gt; $('.twitter-tweet').each () -&gt; $(this.shadowRoot).find('.EmbeddedTweet').css width: '99%' maxWidth: '100%' ), 2000
downvote count: 0
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/25275923
score: 2

http://stackoverflow.com/q/25371813
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25371910
has body: i have this code: Weird thing is, while first comparation returns true, after adding 'some text', it isn't equal anymore. Why is that? Is it a bug, or intended behaviour? Is there a way to make the second test return true too?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25371992
has title: Elements redefined while adding content
type: Question
tagged with: javascript
tagged with: dom
score: 0
answer count: 2

http://stackoverflow.com/comment/39309016
has text: Is there a reason to not just use a link to an element with an id?
type: QuestionComment
comment on: http://stackoverflow.com/q/25233980
type: Comment
score: 1

http://stackoverflow.com/q/25290332
tagged with: data-binding
has comment: http://stackoverflow.com/comment/39425520
answer count: 0
has title: Realtime db-view sync for a rails app. Recommendations
type: Question
has body: I'm building an app that will include a calendar for people to insert data both from their mobile and the web. The thing is, wherever they do it from, the view needs to update automatically when something changes on the database. I understand js frameworks like ember do this, but i have no experience with any of them. What approach would you recommend?
tagged with: database
tagged with: javascript
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39419513
has comment: http://stackoverflow.com/comment/39424251
tagged with: ember.js
tagged with: ruby-on-rails

http://stackoverflow.com/q/25270793
possible better answer: http://stackoverflow.com/a/25271079
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39377520
has answer: http://stackoverflow.com/a/25271079
has comment: http://stackoverflow.com/comment/39377391
tagged with: css
has comment: http://stackoverflow.com/comment/39377468
has comment: http://stackoverflow.com/comment/39377440
has comment: http://stackoverflow.com/comment/39377609
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39377568
has answer: http://stackoverflow.com/a/25271405
accepted answer: http://stackoverflow.com/a/25271405
has comment: http://stackoverflow.com/comment/39377474
has comment: http://stackoverflow.com/comment/39377546
has comment: http://stackoverflow.com/comment/39377494
type: Question
has comment: http://stackoverflow.com/comment/39378337
answer count: 2
has body: I'm working on making my sidebar responsive. The problem is, I can't simply use CSS media queries because the two sidebar designs I have are so different that it can't be done (much text would need to be removed, etc). So what I have are two sidebar designs, one which should replace the other when the browser is resized. Here is what I've got so far: $(window).on('resize', function() { var width = $(this).width(); var height = $(this).height(); var tablet = 1240; /* If width of browser is less than 1240... */ if (width &lt; tablet) { /* Hide the non-tablet sidebar. */ $('.sidebar:not(.tablet)').hide(); /* If the tablet sidebar already exists on the page, show it. */ if ($('.sidebar.tablet').length) { $('.sidebar.tablet').show(); } else { /* If the tablet sidebar doesn't exist on the page, load it and append it to the body. */ $.get("sidebar_tablet.php", function(data) { $('body').append(data); }); } } /* If width of browser is greater than 1240... */ if (width &gt; tablet) { /* Hide the tablet sidebar. */ $('.sidebar.tablet').hide(); /* Show the non-tablet sidebar. */ $('.sidebar:not(.tablet)').show(); } }); The problem is that if I resize the browser to less than 1240px wide, it will load the tablet sidebar multiple times (I'm guessing because the check to see if the sidebar already exists or not is slower than the speed at which I resize the browser), even though I have a check to see if it already exists on the page. How can I fix this?
has title: Replacing HTML on resize
has comment: http://stackoverflow.com/comment/39377671
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39377584
has comment: http://stackoverflow.com/comment/39377497

http://stackoverflow.com/comment/39439178
has text: Following too not working
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25289815

http://stackoverflow.com/comment/39474520
comment on: http://stackoverflow.com/a/25323175
score: 3
type: AnswerComment
has text: But you can't send an ajax request through with `onbeforeunload`.
type: Comment

http://stackoverflow.com/comment/63332004
type: Comment
has text: @wang.aurora : you can use "labelRotation": 270 property.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25272472

http://stackoverflow.com/comment/39343112
type: Comment
has text: I think I'm really close with this, but I still don't see how I pass the store object to the partial from the js template? Just posted my partial.
comment on: http://stackoverflow.com/a/25251729
score: 0
type: AnswerComment

http://stackoverflow.com/a/25333887
score: 0
type: Answer
has body: Here's a start for you: /&lt;script src=\"(.*)(?=\")/g Retrieve the value of the first capturing group returned by this expression.
answers question: http://stackoverflow.com/q/25333475

http://stackoverflow.com/a/25266614
has comment: http://stackoverflow.com/comment/39370471
score: 3
downvote count: 0
has body: Having set the project up exactly as per the linked article, the .NET client that works for me has the following code: var connection = new HubConnection("http://localhost:65069/"); IHubProxy proxy = connection.CreateHubProxy("stockTickerMini"); try { connection.Start().Wait(); var stocks = proxy.Invoke&lt;IEnumerable&lt;Stock&gt;&gt;("GetAllStocks").Result; } ... In my example, the StockTicker.html page is at http://localhost:65069/StockTicker.html and the hub name is stockTickerMini as per the attribute. In your case then the values below should be right: var connection = new HubConnection("http://192.168.1.5:8080/RTStreamer"); IHubProxy proxy = connection.CreateHubProxy("stockTicker");
upvote count: 3
has comment: http://stackoverflow.com/comment/39371714
answers question: http://stackoverflow.com/q/25266322
type: Answer

http://stackoverflow.com/comment/39427617
comment on: http://stackoverflow.com/a/25294350
type: AnswerComment
type: Comment
has text: Yeah .html() should work too, I don't know why I said that :)
score: 1

http://stackoverflow.com/q/25384729
tagged with: cross-domain
answer count: 2
has answer: http://stackoverflow.com/a/25385010
possible better answer: http://stackoverflow.com/a/40450866
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: iframe
has answer: http://stackoverflow.com/a/40450866
has title: Cross-Document Messaging between two windows or tabs, NOT IFrames
type: Question
accepted answer: http://stackoverflow.com/a/25385010
has body: I have put together a Cross-Document Messaging implementation between a site and an iframe. It woks great. But I desire to communicate between tabs, not iframes. Here is the code I have, for the iframe communication in 2 parts. The first is the Master page and the other is the remote or slave page. So, MASTER page here... Cross-Document Messaging Receiver Cross-Domain Messaging Example Enter your message to be sent to the iframe: Send Message (Note: Only alphanumeric characters will be printed!) Remote Script iframe And now, the REMOTE site here... Remote Receiver Messages Received: The solution lies in how to call a window.open instead of invoking the IFRAME in the MASTER: and changing the sendmessage code line: var remoteframe = document.getElementById("remotepage"); and be able to pass messages to the window. I have a mental block there... Any help would be appreciated... TIA Dennis
tagged with: javascript
upvote count: 2

http://stackoverflow.com/comment/39489996
score: 0
comment on: http://stackoverflow.com/a/25275895
type: Comment
has text: Oh you mean that's better than deleting?
type: AnswerComment

http://stackoverflow.com/comment/44016229
type: Comment
score: 0
has text: This solved my problem although it requires time-to-time update for method delegations. I accept this answer. :-)
comment on: http://stackoverflow.com/a/25381200
type: AnswerComment

http://stackoverflow.com/comment/39498804
comment on: http://stackoverflow.com/a/25335096
score: 0
type: AnswerComment
type: Comment
has text: Adding the following to a div worked: `ng-init="newProposal.contacts = [{name:'', email:''},{name:'', email:''}]"`

http://stackoverflow.com/comment/39586862
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25383417
has text: @bergi - yes his innerClass is of no use. I have provided him with an answer without that

http://stackoverflow.com/q/25233980
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
answer count: 0
tagged with: scroll
upvote count: 1
has title: How to autoscroll to a div when clicked
type: Question
has comment: http://stackoverflow.com/comment/39309016
has body: I am trying to make my page autoscroll to a div when a user clicks it. The jQuery I am using only works the first time it's clicked. After that it just produces no result even though it is in the click function. The element offset variable is being calculated correctly, I can see it in the log. However on second click nothing happens Here is my jQuery: $('.logoWrap').click(function () { var body = $("html, body"); var scrollTop = $(window).scrollTop(); var elementOffset = $(this).offset().top; var distance = (elementOffset - scrollTop); body.animate({ scrollTop: distance }, '500', 'swing');) }; The reason I can't just use and anchor and ID is because when the div is clicked there is another div that slides down to show more content. So I think this is whats messing things up. Here is my code in it's entirety $('.logoWrap').click(function(){ var body = $("html, body"); var scrollTop = $(window).scrollTop(); var elementOffset = $(this).offset().top; var distance = (elementOffset - scrollTop); body.animate({scrollTop:elementOffset}, '500', 'swing'); if($(this).next('article').is(':visible')){ $(this).parent().animate({marginBottom : 0},'2000'); $(this).removeClass('activeWork'); $(this).next('article').slideUp('2000'); } else if($('.logoWrap').hasClass('activeWork')){ $('.activeWork').next('article').slideUp('2000'); $('.activeWork').parent().animate({marginBottom : 0},'2000'); $('.activeWork').removeClass('activeWork'); var articleHeight = $(this).next('article').height(); var desiredHeight = articleHeight + 100; //open content $(this).addClass('activeWork'); $(this).next('article').delay('500').slideDown('2000'); $(this).parent().delay('500').animate({marginBottom : desiredHeight},'2000'); } else{ var articleHeight = $(this).next('article').height(); var desiredHeight = articleHeight + 100; //open content $(this).addClass('activeWork'); $(this).next('article').slideDown('2000'); $(this).parent().animate({marginBottom : desiredHeight},'2000'); }
has comment: http://stackoverflow.com/comment/39328854
has comment: http://stackoverflow.com/comment/39309050
tagged with: javascript
linked to: http://stackoverflow.com/q/6677035
downvote count: 0
score: 1
tagged with: jquery
duplicate of: http://stackoverflow.com/q/6677035

http://stackoverflow.com/q/25358152
has answer: http://stackoverflow.com/a/25400765
type: Question
has title: Transferring Variable Values Between Scopes
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39539423
tagged with: jquery
tagged with: scope
score: 0
has body: I'm seriously sick and tired of thinking it. Okay there is a draggable blue box,; if it touches the red box, the redbox suddenly changes the position randomly. I mixed up whole codes, I know; I'm so dumb at this coding part. But I couldn't figure it the mistakes. I need someone who knowledge me about this situation. The Jquery Part. $(document).ready(function() { var kol = 253; var score = 0; var redBoxWidth = $('#redBox').width(); var redBoxHeight = $('#redBox').height(); var redT = $('#redBox').position().top; var redL = $('#redBox').position().left; var redBox = $(".redBox"); var blueCoordinates = function(element1) { var top; var left; var blueBoxWidth = $('#blueBox').width(); var blueBoxHeight = $('#blueBox').height(); element1 = $(element1); top = element1.position().top; left = element1.position().left; $('#results').text('X: ' + left + ' ' + 'Y: ' + top); $('#results3').text('redL: ' + redL + 'redX: ' + redT); setTimeout(function() { if ((top > (redX) && left > (redY))) { setTimeout(function() { $('#results2').text(top + " " + redX + " " + redY + " " + redBoxHeight + " " + redBoxWidth); }); redX = (Math.random() * ($('#canvas').width() - redBoxWidth)).toFixed(); redY = (Math.random() * ($('#canvas').height() - redBoxHeight)).toFixed(); redBox.css({ 'position': 'absolute', 'left': redX + 'px', 'top': redY + 'px' }); } blueCoordinates(); }); } $('#blueBox').draggable({ drag: function() { blueCoordinates('#blueBox'); } }); }); The HTML PART CSS PART # canvas { width: 500px; height: 400px; background: #ccc; position: absolute; top: 0px; left: 0px; }# blueBox { position: absolute; top: 0; left: 0; width: 100px; height: 100px; background: blue; cursor: move; } .redBox { position: absolute; top: 250px; left: 350px; width: 100px; height: 100px; background: red; cursor: move; } .results { text - align: center; position: relative; top: 400px; left: 25px; }
accepted answer: http://stackoverflow.com/a/25400765
tagged with: position
tagged with: draggable
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39538217

http://stackoverflow.com/comment/39554221
type: QuestionComment
comment on: http://stackoverflow.com/q/25366743
type: Comment
has text: As a sidenote, the duplicate is somewhat wrong, you should be using `prop('disabled')` and not `attr('disabled')`, always `prop` with properties
score: 0

http://stackoverflow.com/q/25296989
type: Question
has title: Do foreach in tr table Jquery
has answer: http://stackoverflow.com/a/25297271
score: -2
tagged with: javascript
tagged with: jquery
has body: i have a table html. I want to get all columns names. I was trying but nothing. $('#tblmodelos th').each(function () { var $data = $(this).html(); console.log($data); });
has answer: http://stackoverflow.com/a/25297147
has answer: http://stackoverflow.com/a/25297013
answer count: 3
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/39426414
has comment: http://stackoverflow.com/comment/39426348
downvote count: 3

http://stackoverflow.com/comment/39456459
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25291900
type: Comment
has text: No problem! If I answered your Q please don't forget to mark my answer as the correct solution :)

console
tags question: http://stackoverflow.com/q/25249367
tags question: http://stackoverflow.com/q/25272479
tags question: http://stackoverflow.com/q/25317690
type: Tag
tags question: http://stackoverflow.com/q/25377755
tags question: http://stackoverflow.com/q/25373993
tag name: console

http://stackoverflow.com/a/25370973
has comment: http://stackoverflow.com/comment/39563206
type: AcceptedAnswer
has body: You're not defining the window.onload functions correctly. Either: &lt;script&gt; window.onload = function() { localStorage.setItem("one", true); } &lt;/script&gt; Or: &lt;script&gt; window.onload = loadFunction; function loadFunction() { localStorage.setItem("one",true); } &lt;/script&gt; And on your other page: window.onload = function() { setInterval(function() { var one = localStorage.getItem('one') || ''; if (one != 'yes') { function hideone() { var elem = document.getElementById("one"); elem.className = "hide"; } } }, 1000); }; Additionally, you're setting localStorage.one to true on the first page, and checking if it's yes on the other page. Not sure if this is meant to be or is a mistake.
score: 0
has comment: http://stackoverflow.com/comment/39563154
has comment: http://stackoverflow.com/comment/39563437
type: Answer
has comment: http://stackoverflow.com/comment/39563226
has comment: http://stackoverflow.com/comment/39563119
has comment: http://stackoverflow.com/comment/39563401
accepted answer of: http://stackoverflow.com/q/25370864
answers question: http://stackoverflow.com/q/25370864

http://stackoverflow.com/a/25284027
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39402128
has comment: http://stackoverflow.com/comment/39410215
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/39409743
accepted answer of: http://stackoverflow.com/q/25282821
upvote count: 3
answers question: http://stackoverflow.com/q/25282821
has body: If OSGI plugin is an option then try to use the Bootstrap4XPages plugin. It contains jquery libs as well. Is that a Domino 9 server?
has comment: http://stackoverflow.com/comment/39401696
downvote count: 0
has comment: http://stackoverflow.com/comment/39410296
has comment: http://stackoverflow.com/comment/39401976

http://stackoverflow.com/q/25382802
has body: i have the following code is not working. I am not getting both alert box info when page loads and when i put the cursor on the input box which has type="password". Both cases are not working right now. I need to make it work. Any help? Please HTML &lt;div class="field"&gt; &lt;input name="ctl00$logInBox$UserName" type="text" maxlength="256" id="ctl00_logInBox_UserName" class="userName" autocomplete="off" placeholder="Username" /&gt; &lt;input name="ctl00$logInBox$Password" type="password" maxlength="256" id="ctl00_logInBox_Password" class="password" autocomplete="off" placeholder="Password" value="" /&gt; &lt;/div&gt; Javascript &lt;script type="text/javascript"&gt; window.onload = function () { var loginid = document.getElementById('ctl00_logInBox_Password'); loginid.setAttribute('type', 'text'); alert(loginid.type); } (function () { var loginFocus = document.getElementById('ctl00_logInBox_Password'); loginFocus.focus = function () { this.type = "password"; alert(this.type); } })(); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/39584605
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25383259
has comment: http://stackoverflow.com/comment/39585338
has answer: http://stackoverflow.com/a/25383259
downvote count: 3
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25383401
score: -2
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/39584911
has comment: http://stackoverflow.com/comment/39585342
has title: Javascript inner function is not working
favorite count: 0
has comment: http://stackoverflow.com/comment/39584516
has answer: http://stackoverflow.com/a/25383401

http://stackoverflow.com/comment/39551224
has text: @Karl-AndréGagnon - Why wouldn't it work? He said he gives his list items classes that match the div IDs.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25365282
type: AnswerComment

http://stackoverflow.com/a/25369441
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25369230
score: 1
has body: Try this: CFL_175x175.png
accepted answer of: http://stackoverflow.com/q/25369230
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/39490489
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25331301
has text: Side note: In JavaScript, they're called function *references* rather than function pointers.

http://stackoverflow.com/q/25238092
type: Question
score: 3
accepted answer: http://stackoverflow.com/a/25255467
upvote count: 3
answer count: 1
has body: I'm having an interesting time trying to get my Pebble watch to honor the escape sequence character \t when pushing data to my watch (using SimplyJS). The following snippet is the code that I have been using: simply.scrollable(true); simply.style('small'); simply.fullscreen(true); var aflLadderUrl = 'http://www.sportal.com.au/feeds/sss/afl_ladder.json'; var ladderContent = ''; ajax({ url: aflLadderUrl, type: 'json'}, function(data) { var i = 0; while (i &lt; 18){ ladderContent = ladderContent + data.ladder[i].friendly_name + '\t\t\t' + data.ladder[i].percentage + '\n'; i++; } simply.text({ title: 'AFL Ladder', body: ladderContent }); }, function() { simply.text({ title: 'AFL Ladder', body: 'No internet connection' }); } ); What I am currently observing is that the \n is being honored and I can see that on my watch, each row of data is being displayed on a separate line. However, it appears that my \t are being ignored and instead of a tab being inserted into my line, zero whitespace is being displayed (i.e. 'my name is' + '\t\t\t' + 'dave' is displayed as my name isdave). I have also tried compiling a Hello World program using just the Pebble SDK (taking the code from https://github.com/kristofvc/pebble-hello-world/blob/master/src/pebble_hello_world.c and adding a couple of \t\t in the string to be printed on line 11) and have also noticed that the SDK honors \n characters but not \t characters (just as my SimplyJS app did). My question is: is it possible to have the Pebble (either via the SDK or SimplyJS) display tabs the same way you'd expect them to work when printing to console? I understand the \t character may not be supported and instead of using \t I could just use spaces, but this one had me curious. Please let me know if you require any more information. Thanks in advance!
tagged with: pebble-watch
has answer: http://stackoverflow.com/a/25255467
type: AnsweredQuestion
has title: Pebble SDK/SimplyJS not honoring the \t character
downvote count: 0
tagged with: pebble-sdk
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/25329277
tagged with: angularjs
type: Question
has title: why value is not set in input field (already used "value":"ddd")?
has answer: http://stackoverflow.com/a/25329643
score: 0
answer count: 1
tagged with: angularjs-directive
has body: can we add by default value in input field.I make a form in which I convert json to form . http://plnkr.co/edit/ZNJO3x3IqajjdMNStJMF?p=preview I used this plugin https://github.com/Textalk/angular-schema-form/blob/master/docs/index.md#validation-messages already used this "value":"dddd" why it is not coming pre field or default value ? $scope.schema = { type: "object", properties: { name: { type: "string", minLength: 2, title: "Name", description: "Name or alias" ,required:true,"value":"dddd"}, "student": { type: "string", title: "studentname", description: "Name or student" ,required:false}, "email": { "title": "Email", "type": "string", "description": "Email will be used for evil.", required:true }, title: { type: "string", required:true, enum: ['dr','jr','sir','mrs','mr','NaN','dj'], } } }; an we give different message .."required :true" ."these field is required" and when user enter invalid email "please enter the valid email
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery

http://stackoverflow.com/a/25373285
accepted answer of: http://stackoverflow.com/q/25373161
has comment: http://stackoverflow.com/comment/39567349
has comment: http://stackoverflow.com/comment/39567400
answers question: http://stackoverflow.com/q/25373161
upvote count: 1
has comment: http://stackoverflow.com/comment/39567231
score: 1
has comment: http://stackoverflow.com/comment/39567305
has comment: http://stackoverflow.com/comment/39567196
has comment: http://stackoverflow.com/comment/39567285
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39567265
has body: You can try to link directly to image and "crop" desired part with css clip property.
type: Answer

http://stackoverflow.com/a/34318857
type: Answer
downvote count: 0
has body: You can add a javascript function to your code: &lt;script&gt; $(document).ready(function(){ $(".dropdown").hover( function() { $('.dropdown-menu', this).stop( true, true ).slideDown("fast"); $(this).toggleClass('open'); }, function() { $('.dropdown-menu', this).stop( true, true ).slideUp("fast"); $(this).toggleClass('open'); } ); }); &lt;/script&gt; you can see the example and demo in dtc-eng
score: 1
answers question: http://stackoverflow.com/q/25261254
has comment: http://stackoverflow.com/comment/56380021
upvote count: 1

http://stackoverflow.com/q/25307141
type: Question
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25307330
answer count: 1
has body: I have got a list (#js-list-scroll) in my page, some items (li) in the list have a class 'itemPage', what I want to achieve is when the user scroll, I want to find the nearest 'itemPage' to the scroll position. Something like this: $(window).scrollTop().closest('.itemPage'); Youssef
tagged with: scroll-position
type: AnsweredQuestion
tagged with: scroll
has answer: http://stackoverflow.com/a/25307330
has title: JS nearest li to the scroll position

http://stackoverflow.com/q/25301552
score: 1
linked to: http://stackoverflow.com/q/15341165
favorite count: 0
type: UnansweredQuestion
upvote count: 1
type: Question
tagged with: canvas
has title: How to create a dynamic ellipse using paper.path object in raphael.js
tagged with: javascript
tagged with: jquery
has body: I am a newbie to rapheal js &amp; I need to create a dynamic ellipse only using paper.path() object. Although we can do it using paper.ellipse(), but I need it to be done by only in path manner on demand of pre-exist code. I googled for it and only get the solution for circle2path(). Let me give a example to describe. var paper = Raphael(10,10, 250, 250); var start_x = 170;//this has to be dynamic var start_y = 160;// so these are also var r_x = 40; var r_y = 35; var ellipse = paper.ellipse(start_x,start_y,r_x,r_y); // here instead of paper.ellipse, I need to use paper.path() //for example I used path to create circle var radius = 50; var circle_path = "M"+ (start_x)+ (start_y-radius)+"A"+ radius+radius+0+1+1+(start_x-0.1)+(start_y-radius)+ "z"; var circle = paper.path(circle_path); Its working properly for circle. Is there any way to do with ellipse. Thanks in advance.
answer count: 1
has answer: http://stackoverflow.com/a/25302936
downvote count: 0

http://stackoverflow.com/comment/39331652
type: Comment
has text: Well you should at least fix the code so that each "click" does not re-bind the event handlers.
comment on: http://stackoverflow.com/q/25246014
score: 0
type: QuestionComment

http://stackoverflow.com/a/25335480
type: Answer
accepted answer of: http://stackoverflow.com/q/25335099
has comment: http://stackoverflow.com/comment/39499018
has comment: http://stackoverflow.com/comment/39498850
score: 0
has body: First off, you need to understand how jQM enhances its' widgets, e.g. collapsible. The initial HTML markup of a collapsible doesn't remain as is after the widget is created. Header Contents The above HTML markup is converted into the following. Header Contents You're not updating collapsible's header/content properly, you need to target inner elements. Below is an example. Edit: I forgot to mention that you don't need to call refresh method since you aren't replacing any part of the collapsible. var data = [{ "title": "foo1", "content": "foo1 content" }, { "title": "foo2", "content": "foo2 content" }]; $.each(data, function (i, value) { $("#datacollapsible .ui-collapsible:eq(" + i + ")") .find("h3 a") .text(value.title) .end() .find(".ui-collapsible-content p") .text(value.content); }); Demo
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25335099

http://stackoverflow.com/a/25333107
answers question: http://stackoverflow.com/q/25332677
type: Answer
upvote count: 1
downvote count: 1
score: 0
has body: Note: this is not a complete solution, only a recommendation on how to get started solving the problem. When you request a web page in your browser, a few things happen. Your browser issues a GET request to the target The target server responds with some HTTP response code and potentially some html to display Your browser looks through that html and finds references to various other resources* Your browser issues GET requests for all those resources the servers that those resources are on respond with more response codes and potentially the requested resources If your browser isn't displaying the images, it's because the server that holds them isn't giving them to you. This could be for many reasons including: 404 - the resource couldn't be found 500 - the server had some error occur 403 - you're not allowed to access the image for some reason. If you can figure out what response code you're getting for the resources, you'll have something to work with. *images, videos, etc.

http://stackoverflow.com/comment/39427284
has text: Please make a fully-functioning http://jsfiddle.net demo.
type: Comment
comment on: http://stackoverflow.com/q/25297428
type: QuestionComment
score: 1

http://stackoverflow.com/q/25372458
tagged with: javascript
has title: undefined is not a function javascript but works with alert box
score: 0
has comment: http://stackoverflow.com/comment/39565668
has comment: http://stackoverflow.com/comment/39565917
has body: I keep getting this error. I found that by giving an alert box as the first line of the function got rid of the problem. Help :(. I would like the function to loop through the select list onkeypress from a search textbox and compare it with the options in the select list. If it doesn't match it will temporarily remove or disable them. I apologize I may have not phrased the question right at first. Code: function search() { var searchText = document.getElementById("usersearch").value; var usersList = document.getElementById("users"); usersList.disabled(true); for(var i = 1; i&lt;usersList.length; i++) { alert("test"); } } html code: The problem persists and I have looked all over the internet but this problem I think can be caused for several reasons. I was using opera for testing. This code creates the select list. &lt;script type="text/javascript"&gt; var request = $.ajax({ url: "sendmsgprep.php", type: "POST", dataType: "html" }); request.done(function(msg) { $(".users").html(msg); }); request.fail(function(jqXHR, textStatus) { //alert( "Request failed online 367: " + textStatus ); }); &lt;/script&gt; other file 'sendmsgprep.php" &lt;?php $id = $_COOKIE['id']; $username = $_COOKIE['username']; require("connect.html"); echo '&lt;select name="users" id="users" tabindex="4" onfocus="wipe(this)"&gt; &lt;option value=""&gt;--SELECT--&lt;/option&gt;'; $query = "SELECT * FROM users WHERE user_id!='$id'"; $result = mysql_query($query, $connect)or die("Error on line 31&lt;br&gt;".mysql_error()); while ($row = mysql_fetch_array($result)) { echo "&lt;option value=".$row['user_id']."&gt;".$row['username']."&lt;/option&gt;"; } echo '&lt;/select&gt;'; ?&gt;
has comment: http://stackoverflow.com/comment/39565662
answer count: 0
type: UnansweredQuestion
tagged with: input
tagged with: php
has comment: http://stackoverflow.com/comment/39565691
has comment: http://stackoverflow.com/comment/39565767
type: Question
has comment: http://stackoverflow.com/comment/39565785
has comment: http://stackoverflow.com/comment/39565800
has comment: http://stackoverflow.com/comment/39565866
has comment: http://stackoverflow.com/comment/39565760
tagged with: function
has comment: http://stackoverflow.com/comment/39565922

http://stackoverflow.com/comment/39376845
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25270035
has text: **Look at your Javascript console.** `SyntaxError: missing } after property list suppliesprices.com:69`. You have made a typo by declaring `url:` twice. (The delete link does not look any different for me using Firefox 31, that is a CSS issue for a different question).
score: 0

http://stackoverflow.com/comment/39373750
score: 0
type: Comment
type: QuestionComment
has text: I'm using Sublime Text 2 for coding, and fairly new to Javascript. Pardon my silly questions. Please recommend few sources so that I can get my basics cleared. Thanks for the timely help.
comment on: http://stackoverflow.com/q/25268611

http://stackoverflow.com/q/25276106
tagged with: javascript
has answer: http://stackoverflow.com/a/25276433
accepted answer: http://stackoverflow.com/a/25276433
answer count: 3
has body: This code works fine when I run it locally but when I put it in this Plunker (http://plnkr.co/edit/RCMbxv7Peb83tRKWTMJM) I get the following looping 404 errors: Failed to load resource: the server responded with a status of 404 (Not Found) http://run.plnkr.co/main.html GET http://run.plnkr.co/main.html 404 (Not Found) angular.js:8521 What am I missing?
possible better answer: http://stackoverflow.com/a/25406184
favorite count: 0
tagged with: angularjs
tagged with: plunker
type: AnsweredQuestion
score: 3
upvote count: 3
has title: Why does Plunker give 404 errors with AngularJS?
has comment: http://stackoverflow.com/comment/39387588
has answer: http://stackoverflow.com/a/25406184
type: Question
tagged with: angularjs-directive
tagged with: angular-ui-router
has answer: http://stackoverflow.com/a/31868670
downvote count: 0
has comment: http://stackoverflow.com/comment/39387377

http://stackoverflow.com/comment/39514371
type: AnswerComment
comment on: http://stackoverflow.com/a/25344674
type: Comment
has text: @cookiemonster The funny part is that OPs snippet is working fine. Check this [jsBin](http://jsbin.com/seheniwukupi/1/edit) or maybe I'm missing something :)
score: 0

http://stackoverflow.com/comment/39371988
comment on: http://stackoverflow.com/q/25267945
has text: have you tried using `.html();`? And then insert your code in those parenthesis
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39459310
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25311856
has text: @Omar thanks for that explanation. That helps me understand this better. This particular code snippet that expands the collapsible is only included in the code when validation fails. Hence it worked fine on intial load. I started disabling the default AJAX navigation for another part of my app and ended up disabling it almost everywhere.
type: Comment

http://stackoverflow.com/comment/66321772
type: AnswerComment
has text: Much appreciated! Your PR was released as version 2.0.2.
type: Comment
comment on: http://stackoverflow.com/a/29050391
score: 1

asynchronous
tags question: http://stackoverflow.com/q/25267358
tags question: http://stackoverflow.com/q/25269703
tags question: http://stackoverflow.com/q/25278093
tags question: http://stackoverflow.com/q/25372160
tags question: http://stackoverflow.com/q/25335203
tags question: http://stackoverflow.com/q/25300193
type: Tag
tags question: http://stackoverflow.com/q/25297322
tags question: http://stackoverflow.com/q/25274150
tag name: asynchronous
tags question: http://stackoverflow.com/q/25323744
tags question: http://stackoverflow.com/q/25379268
tags question: http://stackoverflow.com/q/25296929
tags question: http://stackoverflow.com/q/25238492
tags question: http://stackoverflow.com/q/25349848
tags question: http://stackoverflow.com/q/25326231
tags question: http://stackoverflow.com/q/25254357
tags question: http://stackoverflow.com/q/25338930
tags question: http://stackoverflow.com/q/25282937
tags question: http://stackoverflow.com/q/25333050
tags question: http://stackoverflow.com/q/25318034
tags question: http://stackoverflow.com/q/25274558
tags question: http://stackoverflow.com/q/25293693
tags question: http://stackoverflow.com/q/25273213
tags question: http://stackoverflow.com/q/25344045

http://stackoverflow.com/q/25303735
tagged with: javascript
has comment: http://stackoverflow.com/comment/39438401
has comment: http://stackoverflow.com/comment/39439004
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39438847
downvote count: 0
has comment: http://stackoverflow.com/comment/39440465
has title: ActionController UnknownFormat Error in rails 4
has comment: http://stackoverflow.com/comment/39439066
has comment: http://stackoverflow.com/comment/39440043
has comment: http://stackoverflow.com/comment/39441845
has comment: http://stackoverflow.com/comment/39440277
tagged with: ruby-on-rails-3
favorite count: 0
has comment: http://stackoverflow.com/comment/39440211
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/25325376
has comment: http://stackoverflow.com/comment/39441050
has comment: http://stackoverflow.com/comment/39440190
has comment: http://stackoverflow.com/comment/39439192
accepted answer: http://stackoverflow.com/a/25325376
has body: I have a problem in rails. View (index.html.erb) &lt;div id="container" style="margin:0 auto;"&gt; &lt;div style="float:left; height: 300px; width: 300px" align="center"&gt; &lt;%= form_tag("/java/select", :method =&gt; "post", :remote =&gt; true) do %&gt; Deivce1 &lt;%= radio_button_tag "devices", "1"%&gt;&lt;br&gt; Deivce2 &lt;%= radio_button_tag "devices", "2"%&gt;&lt;br&gt; Deivce3 &lt;%= radio_button_tag "devices", "3"%&gt;&lt;br&gt; &lt;%= submit_tag "On/Off" %&gt; &lt;% end %&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="statelist"&gt;&lt;/div&gt; Controller(java_controller.rb) class JavaController &lt; ApplicationController skip_before_filter :verify_authenticity_token def select @device = params[:devices] respond_to do|format| format.js end end end js file (select.js.erb) $('#statelist').empty().append('&lt;%= j render 'statelist'%&gt;'); html file (_statelist.html.erb) Selected device is &lt;%= @device %&gt; root file (rootes.rb) root "java#index" post "java/select" =&gt; "java#select" I think I have all components to operate ajax. Also, I usually used similar grammars in advance. However, in this case, when I clicked the "On/Off" button, the Unknownformat error message appear in the web page. This error indicated "respond_to do |format|" line at controller. What is the problem ?? Thank you for your attention. Log... Started POST "/java/select" for 127.0.0.1 at 2014-08-14 17:48:55 +0900 Processing by JavaController#select as HTML Parameters: {"utf8"=&gt;"✓", "devices"=&gt;"2", "commit"=&gt;"On/Off"} Completed 406 Not Acceptable in 6ms ActionController::UnknownFormat (ActionController::UnknownFormat): app/controllers/java_controller.rb:14:in `select' Rendered /usr/lib/jruby/jruby-1.7.13/lib/ruby/gems/shared/gems/actionpack-4.1.4/lib/action_dispatch/middleware/templates/rescues/_source.erb (6.0ms) Rendered /usr/lib/jruby/jruby-1.7.13/lib/ruby/gems/shared/gems/actionpack-4.1.4/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (14.0ms) Rendered /usr…
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/39441701
has comment: http://stackoverflow.com/comment/39441343
answer count: 1
has comment: http://stackoverflow.com/comment/39440573

http://stackoverflow.com/comment/39416685
score: 1
has text: you might want to replace the colon by something like "sleep 0.01" to limit cpu usage and speed, because on my rig it makes unrealistic fast jumps with your code.
type: AnswerComment
comment on: http://stackoverflow.com/a/25281544
type: Comment

http://stackoverflow.com/a/25251229
has body: With $("body, html") you're selecting two elements to animate, first body and second html. That's because two callbacks are fired, just like it should be. See explanation here: Callback of .animate() gets called twice jquery Try to change your code as follows: $("html body").animate({ scrollTop: top }, function () { animateScroll($topItem); });
answers question: http://stackoverflow.com/q/25250973
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39341677
score: 1
has comment: http://stackoverflow.com/comment/39341489
downvote count: 0

http://stackoverflow.com/comment/39328928
type: Comment
type: QuestionComment
has text: I tried the `ng-model="editing[key]"` but it only accepts 1 character per input and my cursor losts the focus on a input element, you can check my screen capture http://screencast.com/t/yUMBqgkxEm btw thanks for the quick response.
comment on: http://stackoverflow.com/q/25244573
score: 0

http://stackoverflow.com/q/25280003
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25280134
tagged with: base64
type: Question
score: 0
has title: Want to get base64 data from a file URL
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I want to get base64 data and i have a url which will be give me the file. I have tried the below mentioned way to get base64 data from URL I have made a ajax call to the the given URL $.ajax({ type: "GET", url: DownloadUrl, success: function (data, textStatus, jqXHR){ if (data){ } }, error: function (xhr, statusText, errorThrown) { console.log(statusText); } }); In the success event, i am getting some decoded data, I have encoded that using "window.btoa". But now my file is getting corrupted after this way. Is this the right way to get base64 data? Any other Way to get this data?

http://stackoverflow.com/q/25351765
has title: Load response from request to element instead of refreshing entire document
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25351819
answer count: 1
has comment: http://stackoverflow.com/comment/39526670
tagged with: ajax
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
type: Question
has body: i'm trying to make an ajax-browsing website, so whenever the user makes a request to another page i want to push that page into an element instead of loading an entire fresh page. scenarios include: clicking on a link. ajax calls. manual : location.href = 'url'; pretty much whenever a request is being made. How can i take control of a request and put the result in an element instead of loading a fresh new page ? thanks in advance.

http://stackoverflow.com/comment/39460523
has text: could share your markup and show where the starter function is called?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25315555
score: 1

http://stackoverflow.com/comment/39554694
score: 0
has text: Your `String myRegexp` doesn't compile.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25366896

http://stackoverflow.com/q/25372251
answer count: 1
has comment: http://stackoverflow.com/comment/39565343
has body: I'm trying to execute a JavaScript function depending on the value of a localStorage key. It seems pretty easy, but I'm not getting anywhere. Here's what I have currently - &lt;script&gt; window.onload = function () { setInterval(function() { var one = localStorage.getItem('one'); if (one !== true) { var elem = document.getElementById("one"); elem.className = "hide"; } else if (one !== false) { var elem = document.getElementById("one"); elem.className = "show"; } else { var elem = document.getElementById("one"); elem.className = "show"; } }, 50); } &lt;/script&gt; What this is supposed to do is check every 50ms for the key "one" in localStorage. If it's true, execute the function defined under the if statement. If it's false, execute the other function that's defined under the else or else if statements. Unfortunately, it doesn't matter whether or not there is even an entry in localStorage at all, it always executes the first function(hiding the object). I'm not sure why. Any suggestions would be greatly appreciated. Thanks. Edit - I couldn't find this information in other posts, mainly because my issue has to do with the points brought up in the comments and answers. If the string "true" isn't in localStorage to begin with, why is the function still executing?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39565321
has answer: http://stackoverflow.com/a/25372303
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39565401
has title: Function executes regardless of the localStorage if statement
accepted answer: http://stackoverflow.com/a/25372303
tagged with: local-storage
type: Question
tagged with: if-statement
has comment: http://stackoverflow.com/comment/39565456
tagged with: javascript
has comment: http://stackoverflow.com/comment/39565482
score: 0
tagged with: function

http://stackoverflow.com/comment/39469399
score: 0
type: Comment
has text: I guess that's true, so the only reason you would want the double wrapping is if you were going to create multiple classes in one file, each with their own private variables.
comment on: http://stackoverflow.com/a/25320316
type: AnswerComment

http://stackoverflow.com/q/25387580
has answer: http://stackoverflow.com/a/25394715
accepted answer: http://stackoverflow.com/a/25394715
type: AnsweredQuestion
tagged with: sapui5
has answer: http://stackoverflow.com/a/43122611
linked to: http://stackoverflow.com/q/25381772
score: 9
type: Question
has comment: http://stackoverflow.com/comment/45949201
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/45467553
favorite count: 0
has body: This issue came forth from drilling down the original question: How to set filter in table dropdown based on table row data Background I want to use a filter on a SAPUI5 dropdown control, where I set the filter value based on a model property (data binding) The issue If I use a filter where the filter value value1 is specified by data binding: new sap.ui.model.Filter({ path : "division", operator : sap.ui.model.FilterOperator.EQ, value1 : "{/someProperty}" }) then the dropdown does not render any items However, if I hardcode a value at property value1: new sap.ui.model.Filter({ path : "division", operator : sap.ui.model.FilterOperator.EQ, value1 : "Test" }) Then the filter works as expected. The Question Is it true we can't use data binding for specifying a filter value? Or should I implement it in another way? A small part of me can actually understand that setting a filter on a control's model using a value from that same model could induce some referential issues, but this behavior also occurs when using two distinct named models (one for the dropdown, and one for the filter value) Any help is greatly appreciated!
has comment: http://stackoverflow.com/comment/45950228
possible better answer: http://stackoverflow.com/a/43122611
has title: Not possible to set Filter value using data binding?
has comment: http://stackoverflow.com/comment/89362153
upvote count: 9
has comment: http://stackoverflow.com/comment/45406402

http://stackoverflow.com/comment/115769757
type: Comment
comment on: http://stackoverflow.com/a/30549313
has text: 5 years later and still looks pretty good thank you!
score: 4
type: AnswerComment

http://stackoverflow.com/q/25357166
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25357243
has answer: http://stackoverflow.com/a/25357243
tagged with: gwt
type: AnsweredQuestion
tagged with: java
has answer: http://stackoverflow.com/a/25359635
accepted answer: http://stackoverflow.com/a/25359635
type: Question
has body: i am working on a GWT project , and i want to use another javascript project that written in javascript . at this moment i refer to its javascript libs in this maner : &lt;script type="text/javascript" src="http://192.168.10.100:7001/mapviewer/fsmc/jslib/oraclemaps.js"&gt;&lt;/script&gt; for some reason i want to use a dynamic Ip (i do not hard code it in my main page); i copied javascript in my project but as you see it is deployed on weblogic app server and it does not work correct when i copy that javascript in my project; how can i do this. please help me thanks in advanced
has title: how to pass references to javascript links in main page in gwt main page
tagged with: javascript

http://stackoverflow.com/q/25287360
score: -1
has comment: http://stackoverflow.com/comment/39407706
has title: Lightbox Effect : Gray out body using only Javascript
downvote count: 2
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39407936
has body: [ Learning Purpose ] I'm Trying to use only javascript for this.. any advices with the simplest way is very appreciate it.. I Have explained what I need to do in the button functions with comments.. P.S: I'm not sure if this is done using CSS.. so please guide me if it does. Seems Like I'm being misunderstood I'm look for this effect: http://lokeshdhakar.com/projects/lightbox2/
tagged with: javascript
answer count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25287523

http://stackoverflow.com/q/25362501
type: AnsweredQuestion
has title: Use javascript to add style to every digit in a string
has comment: http://stackoverflow.com/comment/39545912
has comment: http://stackoverflow.com/comment/39545891
has body: Here's the js code: &lt;script language='javascript' type='text/javascript'&gt; var myOldString = "1,2,3,4,5,6&lt;/br&gt;1,2,3,4,5,6&lt;/br&gt;1,2,3,4,5,6" var myNewString = myOldString.replace(/,/g , " "); document.write(myNewString); &lt;/script&gt; Works fine, but I need to add style="padding:5px" to every digit. I tried a lot of different code vairations but none of them work. Thank's for any help!
tagged with: replace
type: Question
has answer: http://stackoverflow.com/a/25362571
tagged with: javascript
has comment: http://stackoverflow.com/comment/39546035
accepted answer: http://stackoverflow.com/a/25362571
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39545885
has comment: http://stackoverflow.com/comment/39545936
has comment: http://stackoverflow.com/comment/39545828

http://stackoverflow.com/comment/39549547
type: Comment
has text: could you help me in this question please? http://stackoverflow.com/questions/25364240/flot-jquery-y-axis-option-is-not-working
comment on: http://stackoverflow.com/a/25362869
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39567906
comment on: http://stackoverflow.com/q/25373542
type: Comment
type: QuestionComment
has text: Use http://jsfiddle.com to demo your code for debugging.
score: 1

http://stackoverflow.com/comment/135712781
has text: Hi @Marian Marian, it seems your answer does not relate to the question. The question is about getting compatibility between jQuery's .trigger() method and JavaScript's .addEventListener() method.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/75663951
score: 1

http://stackoverflow.com/comment/39382464
type: Comment
has text: `data` is just the name of the parameter passed to the callback function – and if the JSON data structure received contains a property named `data`, then of course that means that it has to be addressed as `data.data` here. Change that parameter name to `foo`, and `foo.data` would be used to address the `data` property of the JSON data structure …
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25273386

http://stackoverflow.com/comment/39436068
has text: Thank you. I found where "getXml" snapped. I removed the "try-catch" statement and now I can acces my string; it's very odd.
comment on: http://stackoverflow.com/a/25281246
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25350938
has answer: http://stackoverflow.com/a/25351162
answer count: 1
tagged with: javascript
tagged with: jquery
has title: How to manually scroll inside a scrollable container?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25351162
has body: Let's say I have a list with elements elem1 elem2 elem3 elem4 The ul have max-height, and vertical scrollbar. So I see only two first elements. Now, I gonna walk through this elements using keyboard (for example by adding "selected" class for a selected element) The question is: How to manually scroll down to elem3 using javascript / changing styles? UPDATE Solution: Jump to content inside of a scrollable div
type: Question
linked to: http://stackoverflow.com/q/3738050
score: 0

http://stackoverflow.com/comment/39642906
comment on: http://stackoverflow.com/q/25346704
type: QuestionComment
type: Comment
score: 0
has text: The Ubuntu browser doesn't use the same font(s) by default. What font-family are you using?

http://stackoverflow.com/comment/39382550
has text: Why did you make the first character optional if that's not what you really wanted? Did you know what you were doing when you typed `0?`?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25273470
score: 1

http://stackoverflow.com/comment/39501136
has text: unfortunately, adding `exit()` didn't fix the issue
type: AnswerComment
comment on: http://stackoverflow.com/a/25336891
score: 0
type: Comment

http://stackoverflow.com/comment/39380022
has text: Ok, I've got it working so far. It loads the "toolbar" and sifts the main page content down with `var bodyStyle = document.body.style; var cssTransform = 'transform' in bodyStyle ? 'transform' : 'webkitTransform'; bodyStyle[cssTransform] = 'translateY(' + height + ')';` But as you alluded to, elements with position fixed are not shifted. Is there a way to affect those elements as well?
type: Comment
comment on: http://stackoverflow.com/a/25255992
score: 0
type: AnswerComment

http://stackoverflow.com/q/25339278
type: Question
has answer: http://stackoverflow.com/a/25339360
has body: I have an angular js app that's compiled via browserify. Everything is function with the state provider except for my nested state view. Inside of my first included template: Highlights Social Locations Inside of my state router I have: app.config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('home', { url: '', templateUrl: 'templates/home.html' }) .state('home.social', { url: '/social', templateUrl: 'templates/home.first.html' }); //$locationProvider.html5Mode(true); }) I don't get any errors but the content doesn't show up inside of the carosel_viewer. I initially started with the standard $routeProvider and an ng-include which worked, so it would seem that locations and paths are correct. I've since decided that I want each stage of the 'carosel' (yes, it's not spelled correctly) to be mapped to a unique path for sharing, etc. If someone has a better suggestion for that, I am happy to entertain best practices, too. I'm a bit of a angular noob. Thanks!
accepted answer: http://stackoverflow.com/a/25339360
tagged with: javascript
score: 0
has title: Nested View in Angular UI router not loading content
answer count: 1
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/a/25277713
has body: You need to something like var top = $(this).position().top; var $sibs = $(this).siblings().filter(function(){ return $(this).position().top == top }) //do something with the matching siblings refferred by $sibs $(this).siblings().position().top will return the top value of the first sibling elements, it will not check the value of rest of the siblings.
score: 0
answers question: http://stackoverflow.com/q/25277693
type: Answer

http://stackoverflow.com/a/26470586
downvote count: 0
answers question: http://stackoverflow.com/q/25331042
has body: I had the same problem bro but no need of using Ratchet or other libraries you can write your own simple code . The handshake process,and the masking-unmasking of messages is rather difficult so i copied the code for those function perform_handshaking($receved_header,$client_conn, $host, $port) { $headers = array(); $lines = preg_split("/\r\n/", $receved_header); foreach($lines as $line) { $line = chop($line); if(preg_match('/\A(\S+): (.*)\z/', $line, $matches)) { $headers[$matches[1]] = $matches[2]; } } $secKey = $headers['Sec-WebSocket-Key']; $secAccept = base64_encode(pack('H*', sha1($secKey . '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'))); //hand shaking header $upgrade = "HTTP/1.1 101 Web Socket Protocol Handshake\r\n" . "Upgrade: websocket\r\n" . "Connection: Upgrade\r\n" . "WebSocket-Origin: $host\r\n" . "WebSocket-Location: ws://$host:$port/\r\n". "Sec-WebSocket-Accept:$secAccept\r\n\r\n"; socket_write($client_conn,$upgrade,strlen($upgrade)); return $upgrade; } function unmask($text) { $length = ord($text[1]) & 127; if($length == 126) { $masks = substr($text, 4, 4); $data = substr($text, 8); } elseif($length == 127) { $masks = substr($text, 10, 4); $data = substr($text, 14); } else { $masks = substr($text, 2, 4); $data = substr($text, 6); } $text = ""; for ($i = 0; $i < strlen($data); ++$i) { $text .= $data[$i] ^ $masks[$i%4]; } return $text; } //Encode message for transfer to client. function mask($text) { $b1 = 0x80 | (0x1 & 0x0f); $length = strlen($text); if($length <= 125) $header = pack('CC', $b1, $length); elseif($length > 125 && $length < 65536) $header = pack('CCn', $b1, 126, $length); elseif($length >= 65536) $header = pack('CCNN', $b1, 127, $length); return $header.$text; } Instead of socket_accept user socket_read to get the http header containing request from webpage that it wants to upgrade its http conn to websocket then use the handshake function above to write an accept header message .then your connection will be established .but still on the cli…
type: Answer
accepted answer of: http://stackoverflow.com/q/25331042
upvote count: 3
score: 3
type: AcceptedAnswer

http://stackoverflow.com/comment/39580171
type: Comment
has text: I've changed this code: $(".unit_price input").bind "keyup change paste", (e) -> to this: $("body").on "keyup change paste", ".unit_price input", -> And its still not working.
score: 0
comment on: http://stackoverflow.com/q/25380029
type: QuestionComment

http://stackoverflow.com/comment/39409216
score: 1
type: AnswerComment
has text: I do like this idea - mouse position could be recorded at any time interval via JavaScript. You could then plot out the movements (X-Y plane), and even get some basic statistics for a more 'valid' formula of 'tremor_randomness' for the Pointer Lock API solution or something similar. This would require a bit more work (just fetch X-Y position every 100 ms for 10 seconds, for example) and analysis, but would give you a much more *real* effect than simple randomization. For your cause, it may be worth it.
comment on: http://stackoverflow.com/a/25269401
type: Comment

http://stackoverflow.com/comment/39487668
has text: Well... How short is the distance between "starttime" and "endtime"? If it is less than a minute this is correct. How do you want it to look?
score: 0
comment on: http://stackoverflow.com/q/25329651
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25267247
has body: You're telling the other end that your callback's name is 1, in your URL: http://www.example.com/wp-json/posts?_jsonp=1&filter[offset]=-1 Here --------------------------------^^^^^^ You want to use the name of the callback function you have on your page that you're expecting to receive the JSONP response, which needs to be a validate identifier literal (so not 1). Because you're using jQuery, it's best by far if you let jQuery worry about what the callback name should be, by leaving off that query parameter entirely and letting jQuery add it. Since _jsonp is an unusual query string parameter name for this, you'll need to tell jQuery what the parameter name is. $.ajax({ type: 'GET', dataType: "jsonp", url: 'http://www.example.com/wp-json/posts?&amp;filter[offset]=-1', // No _jsonp=1 here ------------------------^ jsonp: '_jsonp', // ^^ new parameter here success: function (data) { console.log(data); } });
has comment: http://stackoverflow.com/comment/39371094
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39371106
has comment: http://stackoverflow.com/comment/39370864
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25267158
has comment: http://stackoverflow.com/comment/39370768
has comment: http://stackoverflow.com/comment/39371188
type: Answer
accepted answer of: http://stackoverflow.com/q/25267158
has comment: http://stackoverflow.com/comment/39371085

http://stackoverflow.com/q/25235973
has body: I am trying to make a form in angular using json. When I take a single json file it is easy, because I write my html and using iteration I display the form fields. Now if I have 3 or 4 json files I need to generate a different form with different ids and display it. Can I generate dynamic forms? I take two button which get json data from file "A" and "B". I need to show the different form on click. plunker $scope.getFromAFile = function() { // body... var inputs=[]; $http.get('a.json') .success(function (data) { $scope.formInputs = data.input; angular.forEach($scope.formInputs, function(value, key) { /* do something for all key: value pairs */ inputs.push({ "value": value.value, "inputValues": value.inputValues, "type": value.inputType.toLowerCase(), "name": value.name, "required": value.required }) }); getFormfromData(inputs,'BID'); }) .error(function(err){ alert(err); }); } $scope.getFromBFile = function() { // body... $http.get('b.json') .success(function (data) { var inputs=[]; $scope.formInputs = data.input; angular.forEach($scope.formInputs, function (value, key) { /* do something for all key: value pairs */ inputs.push({ "value": value.value, "inputValues": value.inputValues, "type": value.inputType.toLowerCase(), "name": value.name, "required": value.required }); }); getFormfromData(inputs,'BID'); }) .error(function (err) { alert(err); });
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25236166
has answer: http://stackoverflow.com/a/25236151
has answer: http://stackoverflow.com/a/25236166
downvote count: 1
type: Question
tagged with: angularjs-directive
type: AnsweredQuestion
score: 3
upvote count: 4
answer count: 2
possible better answer: http://stackoverflow.com/a/25236151
has title: How to make a dynamic form from JSON in angular?
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/25313167
favorite count: 0

http://stackoverflow.com/comment/39445105
score: 0
type: Comment
type: QuestionComment
has text: Is there a question there ?
comment on: http://stackoverflow.com/q/25307410

http://stackoverflow.com/a/25284510
type: Answer
has body: Works fine for me. Just removed line, and fixed putPoint in engage function putPoint(e){ if (dragging){ context.arc(e.clientX, e.clientY, radius, 0, Math.PI*2); context.fill(); context.beginPath(); context.moveTo(e.clientX, e.clientY); } } DEMO UPDATE: There was a problem with line start position. function putPoint(e){ if (dragging){ context.moveTo(newX, newY); context.lineTo(e.clientX, e.clientY); context.stroke(); context.beginPath(); context.arc(e.clientX, e.clientY, radius, 0, Math.PI*2); context.fill(); context.beginPath(); newX = e.clientX; newY = e.clientY; } } DEMO
has comment: http://stackoverflow.com/comment/39406374
accepted answer of: http://stackoverflow.com/q/25284024
has comment: http://stackoverflow.com/comment/39443868
has comment: http://stackoverflow.com/comment/39408407
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39414741
score: 0
answers question: http://stackoverflow.com/q/25284024

http://stackoverflow.com/a/25261346
type: Answer
has comment: http://stackoverflow.com/comment/39360151
has body: You can use Jquery Like this : HTML : Some Text JS : var lengthText = 30; var text = $('p').text(); var shortText = $.trim(text).substring(0, lengthText).split(" ").slice(0, -1).join(" ") + "..."; $('p').text(shortText); $('p').hover(function(){ $(this).text(text); }, function(){ $(this).text(shortText); }); DEMO : http://jsfiddle.net/1yzzbv4b/2/ Or you can also achieve this with css3 property text-overflow:ellipsis; CSS : p{ text-overflow:ellipsis; width: 250px; white-space: nowrap; overflow: hidden; } p:hover{ text-overflow:clip; width:auto; white-space: normal; } DEMO : http://jsfiddle.net/1yzzbv4b/
accepted answer of: http://stackoverflow.com/q/25261234
has comment: http://stackoverflow.com/comment/39360007
has comment: http://stackoverflow.com/comment/39360488
answers question: http://stackoverflow.com/q/25261234
upvote count: 5
has comment: http://stackoverflow.com/comment/39359790
type: AcceptedAnswer
downvote count: 0
score: 5

http://stackoverflow.com/q/25366070
tagged with: css
has comment: http://stackoverflow.com/comment/39552833
has title: How to make child div occupy full space of parent's div in a resizable bootstrap panel?
tagged with: twitter-bootstrap
score: 1
has comment: http://stackoverflow.com/comment/39552813
upvote count: 1
type: AnsweredQuestion
tagged with: jquery-ui
accepted answer: http://stackoverflow.com/a/25366216
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25366120
has answer: http://stackoverflow.com/a/25366120
type: Question
answer count: 2
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I have a resizable bootstrap panel (using the jQuery UI resizable plugin); I am trying to have a within the panel-body div, that would occupy all space, eg. to have this div occupying the panel body full space as it is resized. I thought it would be enough to define some CSS rules, like setting height: 100%; and width: 100% but it doesn't work (why ? I am new to CSS and sadly I can't understand why it fails). I ended up using alsoResize to make sure my div is resized at the same time as its parent, but it doesn't give satisfactory results. I tried other magic without success ; I don't like magic, anyway ;) For my tests I put the background color to be yellow ; surprisingly, before the first resize the doesn't even show up ! Any help and a bit of explanations would be appreciated. CSS: .dashboard_panel { min-height: 200px; } .panel-body { min-height:200px; height:100%; } .mydiv { background-color:yellow; width: 100%; height: 100%; } HTML: id23/emotion/m0 JS: $(".dashboard_panel").resizable({ alsoResize: ".mydiv, .panel-body" }); And a link to JSFiddle
has answer: http://stackoverflow.com/a/25366216
has comment: http://stackoverflow.com/comment/39552815

http://stackoverflow.com/comment/39553808
score: 1
type: Comment
has text: You could also use an http interceptor, which will read the baseurl from a config and append it to the relative url..
type: QuestionComment
comment on: http://stackoverflow.com/q/25366366

http://stackoverflow.com/q/25264783
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/25265284
favorite count: 0
tagged with: momentjs
tagged with: date-parsing
score: 2
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/25265284
type: Question
has body: I'm using moment-with-locales.min.js for date manipulation and I need to format as the user leaves the textboxes. Because locales are an issue, I'm trying to use moment to do the formatting. However, I'm running into a problem and I'm not sure if I'm doing it wrong or what. If the user types in something like '2/2/12' and I try to do moment('2/2/12', 'l'), using the 'l' for short date based on locale, it formats it into '2/2/0012'. That in itself seems broken. If I try to format with moment('2/2/12', 'M/d/yyyy'), as seen in the JSFiddle below, it changes it to '2/1/2014'. It always bumps it down to the first day of the month and makes it the current year. Here's the JSFiddle I was using. moment.locale('en-US'); var parsed = moment('2/2/12', 'M/d/yyyy'); if (moment(parsed).isValid()) { var d = new moment(parsed, 'l'); alert('Pass: ' + d.format('l')); } else { alert('Fail: ' + parsed); } I'd appreciate and help.
has title: Formatting dates with moment.js based on locale
tagged with: javascript
has comment: http://stackoverflow.com/comment/39366273

http://stackoverflow.com/q/25363005
has body: Child grand Child Child This is my code , on click of the image inside the span i want to find the id of all children(child,grand child ,great grand child etc) .It would be very helpful if you could answer my doubt . That is when i click on the image of the root node The id of all the child , grand child and great grand child should be retrieved in which the image belongs .I would like to work it strictly when i click on the image .
has comment: http://stackoverflow.com/comment/39546929
has answer: http://stackoverflow.com/a/25363045
possible better answer: http://stackoverflow.com/a/25363344
accepted answer: http://stackoverflow.com/a/25363045
score: 0
has answer: http://stackoverflow.com/a/25363344
answer count: 2
has comment: http://stackoverflow.com/comment/39547686
upvote count: 1
downvote count: 1
has title: Identify the children of an tag on click
tagged with: javascript
has comment: http://stackoverflow.com/comment/39546936
has comment: http://stackoverflow.com/comment/39547584
type: AnsweredQuestion
tagged with: jquery
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39489865
comment on: http://stackoverflow.com/q/25331018
score: 0
type: Comment
type: QuestionComment
has text: It's perfectly possible by defining the function which could handle both types of events and pass this function to `$days.on("click", func);` and `$input.on("keypress", func);`

http://stackoverflow.com/comment/39508359
has text: Does it added the file? It only changed the file on my browser.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25340880

http://stackoverflow.com/comment/39584763
type: Comment
has text: You're using syntax that should only be used in snippets or quick demonstration. Define a module, pass the module name to ng-app, register your controller via .module().controller(), and so on(check out this plunker template for a demo on how you should build a skeleton app - http://plnkr.co/edit/tpl:FrTqqTNoY8BEfHs9bB0f). That said, a possible cause for this would be if node does some automatic minification of your scripts, thus your AppController function is called "a" in the final code, instead.
comment on: http://stackoverflow.com/q/25382779
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39536004
comment on: http://stackoverflow.com/q/25356341
type: Comment
type: QuestionComment
score: 0
has text: why do you use inputosaurus? It will support sortable but wont reorder.

http://stackoverflow.com/a/31509928
type: Answer
has body: this work: &lt;div ng-include="'post/'+ post.content"&gt;
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25243050

http://stackoverflow.com/q/25305364
has comment: http://stackoverflow.com/comment/39442925
answer count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/39443139
tagged with: iframe
type: Question
tagged with: c#
has title: Close IFrame Popup via JavaScript
has body: I have one Popup dialog. putting information after update or Insert that Information I want to close that dialog no luck with this aspx Page: &lt;div id="InnerVendorPopup" style="width: 900px; height: 420px"&gt; &lt;iframe id="iframeVendor" scrolling="yes" frameborder="0" width="900px" height="420px"&gt; &lt;/iframe&gt; &lt;/div&gt; Master Page: $("#InnerVendorPopup").dialog({ height: 'auto', width: 920, title: 'Test', dialogClass: 'dialog_fixed', position: 'center', drag: function () { $.data(this, 'dragged', true); }, open: function (event, ui) { $('html').css('overflow', 'hidden'); $('.ui-widget-overlay').width($(".ui-widget-overlay").width() + 18); $.data(this, 'dragged', false); }, close: function (event, ui) { $('html').css('overflow', 'auto'); $('.ui-widget-overlay').width($(".ui-widget-overlay").width() - 18); } }); My C# Code: Page.ClientScript.RegisterStartupScript(this.GetType(), "myCloseScript", "closePopup();", true); My Javascript Code: &lt;script type="text/javascript"&gt; closePopup = function () { alert("call"); $("#InnerVendorPopup").dialog("close"); } &lt;/script&gt; I want to close My Dialog popup after update or insert button click
has comment: http://stackoverflow.com/comment/39443337
downvote count: 0
has comment: http://stackoverflow.com/comment/39442965
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39442879
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39443232
score: 2

http://stackoverflow.com/comment/39450742
has text: Apache. (Is that Info enough?)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25310363
score: 0

http://stackoverflow.com/comment/39508202
type: QuestionComment
comment on: http://stackoverflow.com/q/25340916
has text: Your code as posted won't work anyway because of the way you re-use "D".
score: 0
type: Comment

http://stackoverflow.com/a/25241009
type: Answer
has comment: http://stackoverflow.com/comment/39322536
has comment: http://stackoverflow.com/comment/39323561
score: 0
has comment: http://stackoverflow.com/comment/39321722
has comment: http://stackoverflow.com/comment/39322587
has comment: http://stackoverflow.com/comment/39323590
has comment: http://stackoverflow.com/comment/39322075
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25240273
has comment: http://stackoverflow.com/comment/39322492
has comment: http://stackoverflow.com/comment/39322145
answers question: http://stackoverflow.com/q/25240273
has body: You may use Require like this: In a single file: // the `configuration` module: define('configuration', function(){ return { googleId: 'UA-XXXXX-X' } }); // the analytics module define('analytics', ['configuration'], function(googleId){ var anID = googleId; (function(anID){ /* google analytics code here */ }()); }); // initialization of it all require(['analytics']);

http://stackoverflow.com/a/25493020
answers question: http://stackoverflow.com/q/25319955
has body: What about forced_root_block? If you set it to false or "", BR is the default and SHIFT+ENTER will produce a P. As seen on jsfiddle. I read that on there after googling for 2 minutes.
downvote count: 0
has comment: http://stackoverflow.com/comment/39836113
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/q/25235747
has answer: http://stackoverflow.com/a/25248562
answer count: 1
score: 1
tagged with: connection
favorite count: 0
type: UnansweredQuestion
tagged with: yui3
upvote count: 1
has title: jsPlumb: How to make the modification from division to endpoint?
tagged with: jsplumb
has body: I have dynamical created nodes (by yui3 library). All nodes created as children of the same parent as html-elements. However in terms of design some of nodes must be endpoints of other elements. For connections drawing I use jsPlumb library. Example. HTML-code: parent 1 2 I want that "1" and "2" elements will be endpoints of "parent"-element. All elements should be draggable and "children" divisions should be moving together with "parent" division. How do I solve this problem? Thanks for your attention, Eugene. Questions: how to make existing division as endpoint of other element (node)? how to drag list of elements by dragging "parent" element? solution with yui3 using will be very useful also. My research: There is "addEndpoint" function in jsPlumb library. But this function create new node for endpoint. I don't understand approach for drawing endpoint with my design (i.e. not standard rectangles or circles) and correct approach of the some element attributes setting. I tried to make the hierarchical html-document but that case was generating next problem: connections drawn at child layer. After several weeks of attempts of correct this bug I chose current version.
type: Question
tagged with: endpoint
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39333392
has text: I think that's working, but now nothing is being shown in the ng-repeat: {{ p.id }}
score: 0
comment on: http://stackoverflow.com/a/25247004
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/39380312
comment on: http://stackoverflow.com/a/25267752
type: AnswerComment
has text: I've editied the entire post, could you pls check it ? I just want to print from the request function some sata that i took from Yahoo finance, the stockValue variable that holds the some text from the HTML file.
score: 0
type: Comment

http://stackoverflow.com/q/25297842
has answer: http://stackoverflow.com/a/25297860
has title: How to remove some spaces behind a character
tagged with: replace
type: AnsweredQuestion
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25297865
type: Question
has comment: http://stackoverflow.com/comment/39427961
tagged with: regex
has body: I'm trying to remove double spaces behind a character, like "text :something", remove all the spaces behind ':' I tried this code, But it did not work: var myStr = 'text :something'; var myNewStr = myStr.replace(/\s:{1,}/g, ':'); thanks in advance.
score: 0
has comment: http://stackoverflow.com/comment/39427966
answer count: 2
has answer: http://stackoverflow.com/a/25297865
possible better answer: http://stackoverflow.com/a/25297860

http://stackoverflow.com/comment/39471804
type: Comment
comment on: http://stackoverflow.com/a/25319012
score: 0
type: AnswerComment
has text: I'm going to look into to this more tomorrow and update, thank you! Too much of a headache for one day.

http://stackoverflow.com/comment/39422647
comment on: http://stackoverflow.com/q/25293913
type: Comment
type: QuestionComment
has text: @Oriol If the class is added statically into the HTML then yes, it works fine, the problem I seem to be having is that the class is added, but the CSS is not aware of it. I tried moving the link element below the script in the head section but still no difference. The code that builds the table runs on the onload event.
score: 0

css-frameworks
type: Tag
tags question: http://stackoverflow.com/q/25322446
tag name: css-frameworks

http://stackoverflow.com/comment/39554089
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25364467
has text: @sircapsalot "like this" reffered to the linked svg's source containing no JavaScript. It is generated on the server side.

http://stackoverflow.com/a/73897398
has comment: http://stackoverflow.com/comment/138406850
has comment: http://stackoverflow.com/comment/130564137
upvote count: 10
type: Answer
answers question: http://stackoverflow.com/q/25246472
has comment: http://stackoverflow.com/comment/136972291
has comment: http://stackoverflow.com/comment/136978533
downvote count: 0
has comment: http://stackoverflow.com/comment/137879876
score: 10
has body: Ok so there is actually a solution that only requires the use of CSS (no HTML or JS stuff) The following selector will only select those elements with the class "parent" on hover, which do not have a child with the class "child" that is also being hovered on. .parent:has(:not(.child:hover)):hover {} The only problem I can see with the :has() selector/pseudo class is browser support (especially older versions) - so before you use it check the currerrent compatibility lists to see if it fits your requirements. Edit: It seems the provided solution doesn't work for some people / browser versions. An alternative (provided by Eric in the comments) is .parent:not(:has(.child:hover)):hover. (I'm not sure as to why both solutions work different for some browsers - as the logic is the same for both) - Chrome v122 both worked for me / Chrome v124 for Chris Hayes only the second one worked
has comment: http://stackoverflow.com/comment/138419540
has comment: http://stackoverflow.com/comment/130574222

http://stackoverflow.com/a/35532423
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25325805
type: Answer
has body: repeat of this question : Multi-Line Array Literal You can use the - as a block. (adding any white spaces after the - will not work however, new line needs to follow immediately) - var array = [ 'a', 'b' ];
upvote count: 1

http://stackoverflow.com/a/25240569
accepted answer of: http://stackoverflow.com/q/25240508
upvote count: 1
has comment: http://stackoverflow.com/comment/39443541
answers question: http://stackoverflow.com/q/25240508
score: 1
type: AcceptedAnswer
downvote count: 0
has body: I suggest you use css3 for this .image{ opacity: 0; transition: opacity 0.5s; } .image.Hovered{ opacity: 1; } $('elem').on('mousein', function(){ $(this).addClass('Hovered'); } $('elem').on('mouseout', function(){ $(this).removeClass('Hovered'); }
type: Answer

http://stackoverflow.com/q/25333092
answer count: 2
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/29929056
score: 15
has answer: http://stackoverflow.com/a/25340737
tagged with: angular-ui
has answer: http://stackoverflow.com/a/29929056
upvote count: 15
has body: I have two abstract states parent and parent.child, and an activateable state parent.child.grand. I want parent to be promise resolved before parent.child.grand gets its resolves executed. Why? Because a certain data which comes from the ajax request in the resolve from parent is required inparent.grand.child. Here's a gist Is it possible to sequentially chain the promises of parent to children states without using controllers ? (parent resolve start -> finish ajax request -> resolve promise -> parent.child.grand resolve start -> finish ajax request -> resolve promise)
favorite count: 0
has comment: http://stackoverflow.com/comment/39504039
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39494450
has comment: http://stackoverflow.com/comment/39494305
possible better answer: http://stackoverflow.com/a/25340737
has title: UI-Router: sequential resolve of parent and child states
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39494344
has comment: http://stackoverflow.com/comment/39494712
type: Question
tagged with: angularjs-routing

http://stackoverflow.com/q/25376950
has body: Hi I have an AngularJS ng-grid. I am trying to find a way to use jsPDF to render it as a PDF. I have successfully managed to render PDFs of simple text and complicated SVGs via their URI...however when I try to create an image from the ng-grid the image fails, and when I try to use the jsPDF plugin for fromHtml it takes away all the CSS even though I explicitly add it back in. Any suggestions? Here are some related posts but they are not angularJS specific: Export HTML table to pdf using jspdf Export HTML table to pdf using jspdf I tried doing the exact same thing as the second post and I get all of my data in a long list since angularJS doesn't uses standard tr and tds to make tables...it just a lot of divs with CSS.
tagged with: uri
tagged with: javascript
tagged with: jspdf
tagged with: http://stackoverflow.com/tag/pdf
answer count: 1
downvote count: 0
favorite count: 0
has title: ng-grid to PDF using jsPDF or other library?
has answer: http://stackoverflow.com/a/26587903
tagged with: angularjs
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/23035858
has comment: http://stackoverflow.com/comment/39579060
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/comment/39349712
score: 0
type: Comment
has text: As I was saying in my answer, the 'none' is not always viewed as 'none' (it will also depend on the browser.) I do not know exactly why. Something I bumped into, just like you... 8-)
type: AnswerComment
comment on: http://stackoverflow.com/a/25255550

http://stackoverflow.com/comment/39369235
type: AnswerComment
type: Comment
has text: It is invaluable... Inspect element - console for console.log("") - and the resources tab at the top of inspect element window will allow you to see local storage or webSQL databases. You also get much closer UI wise to the end result you will see on the phone. Really invaluable!
comment on: http://stackoverflow.com/a/25265409
score: 0

http://stackoverflow.com/q/25296593
score: 2
has comment: http://stackoverflow.com/comment/39425733
upvote count: 2
has title: javascript object private property behaves as if public
type: Question
tagged with: object
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/25296731
downvote count: 0
favorite count: 0
has body: As I was trying to show someone public vs private properties in a js object, I got very confused all of a sudden. Let's take the following object: function person() { var name = 'joe'; var age = '32'; this.setName = function (name) { this.name = name; } this.setAge = function (age) { this.age = age; } this.getName = function () { return this.name; } this.getAge = function () { return this.age; } } var newBuddy = new person(); I expect newBuddy.name and newBuddy.age to be undefined at this stage. They are. So far so good! However, look at the following: newBuddy.setName('matt'); //I use my setName() method to change the name. newBuddy.name; // returns "matt" -&gt; that' what I cannot understand. // I was expecting not to be able to access this property. Ever. See below. My thought process is: If I had declared this.name = 'joe' instead of var name = 'joe', I would understand that newBuddy.name returns 'joe' first, then 'matt'. The public property would have been accessible. But because I declared my property with "var name", shouldn't I not be able to access this property? My understanding was that the only way to get the name would be by calling my this.getName() method with newBuddy.getName(); To me, in that object, newBuddy.name should always return undefined. I felt confident using objects until that moment, and I really cannot figure out what I am mising. I ran that code in my firebug 2.0.2 console using Firefox 31.0, I doubt it makes any difference.
tagged with: private
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25296823
tagged with: properties
has comment: http://stackoverflow.com/comment/39425680

http://stackoverflow.com/a/25313181
answers question: http://stackoverflow.com/q/25311974
score: 0
accepted answer of: http://stackoverflow.com/q/25311974
type: AcceptedAnswer
type: Answer
has body: This is a bit of a hack, but after the line: $container.masonry( 'appended', $newElems, true ); try adding a call to 'layout' wrapped in a timeout: $container.masonry( 'appended', $newElems, true ); window.setTimeout(function() { $container.masonry('layout'); }, 1000); You can adjust the value of 1000. Try making it bigger (2000, then 3000...) if it doesn't work; or if it does work, try making it smaller until it breaks again. If this hack does fix your problem then it suggests there is an issue with things loading in the page. Masonry seems very sensitive to everything being loaded and laid-out before it can correctly do its own layout. So this hack helps you diagnose the problem and provides a workaround, but isn't the ideal solution. Are you working on a tumblr template? (Some of the code looks like Tumblr). If so you might find this question useful. Or if not, this Q relates to a Tumblr template that was using infiniteScroll and Masonry, so it may help anyway! Images loaded JavaScript - Using jQuery Masonry There's a few ideas in that relating to Masonry layouts and Tumblr and in the end the accepted answer was the timeout I suggested!

http://stackoverflow.com/comment/39555770
comment on: http://stackoverflow.com/q/25367230
score: 0
type: Comment
type: QuestionComment
has text: @DanielA.White, exactly...I'm trying to figure out a way to make this work even if I have to add separate jquery or a regex to make it work.

http://stackoverflow.com/comment/39384932
type: AnswerComment
score: 0
type: Comment
has text: my only question with that is, how do i close the after every 3rd picture and create a new div class="row"> so that they are in the bootstrap grid?
comment on: http://stackoverflow.com/a/25274613

http://stackoverflow.com/a/25252364
has comment: http://stackoverflow.com/comment/39372709
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39378641
has comment: http://stackoverflow.com/comment/39372567
has comment: http://stackoverflow.com/comment/39379040
has comment: http://stackoverflow.com/comment/39378411
score: 0
has comment: http://stackoverflow.com/comment/39378001
has comment: http://stackoverflow.com/comment/39378205
has comment: http://stackoverflow.com/comment/39373206
has comment: http://stackoverflow.com/comment/39378787
has comment: http://stackoverflow.com/comment/39378596
has body: In your code, add these: HTML &lt;!-- This is your sidebar --&gt; &lt;aside id="cont_bar" class="hide"&gt;&lt;/aside&gt; CSS /*This styles the sidebar, and adds classes to control display*/ #cont_bar { width: 16.6%; background-color: #fff; opacity: .60; margin-top: 36px; float: right; position: relative; transition: right .8s; -moz-transition: right .8s; -webkit-transition: right .8s; } .hide { right: -100%; } .unhide { right: 0; } JS /*Need this for event handling, works with jquery 1.6.4(included in your files) */ window.onload = function() { var winHeight = $(window).height(); //window height var footHeight = $('#footerwrapper').height(); //footer height $('#cont_bar').css( 'height', winHeight - 3.5*(footHeight) ); //sets sidebar height var getit = $('#contact'); $(getit).bind( "click", function() { $('#cont_bar').toggleClass( "hide unhide" ); }); } EDIT I forgot to mention quite a bit.. So first off, this requires javascript and jQuery. Secondly, I gave your contact button (li) an id of contact. Lastly, this is by no means a perfect solution but it should give you something to think about and hopefully a nudge in the right direction. The code here creates a container to be your sidebar &lt;aside id="cont_bar"&gt;. It creates classes to handle hiding, unhiding and the transition to create the sliding effect. js is used to calculate the height of the sidebar, add and remove classes, and to set an event handler (click) on your Contact button (now id="contact").
type: Answer
has comment: http://stackoverflow.com/comment/39372686
accepted answer of: http://stackoverflow.com/q/25247892
has comment: http://stackoverflow.com/comment/39379342
answers question: http://stackoverflow.com/q/25247892
has comment: http://stackoverflow.com/comment/39379194
has comment: http://stackoverflow.com/comment/39372491
has comment: http://stackoverflow.com/comment/39378348

http://stackoverflow.com/comment/39574969
type: Comment
has text: yeah, then the problem stays: howler.js uses html5-audio internally, too.
comment on: http://stackoverflow.com/a/25363762
score: 0
type: AnswerComment

http://stackoverflow.com/q/25341776
score: 1
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25341865
has comment: http://stackoverflow.com/comment/39509931
accepted answer: http://stackoverflow.com/a/25341865
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: variables
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/23667086
has comment: http://stackoverflow.com/comment/39509662
type: AnsweredQuestion
has body: After I use the getJSON method I want to update the variable, but it doesnt seem to update from inside the .done() function. The following console log is empty. var myVar; $.getJSON("url/path", function(data){ }).done(function(data) { myVar = data; }); console.log(myVar);
linked to: http://stackoverflow.com/q/13009755
upvote count: 1
has title: Global variable not updating after getJSON is done
has comment: http://stackoverflow.com/comment/39509613
has comment: http://stackoverflow.com/comment/39509701
type: Question

http://stackoverflow.com/a/25282835
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25281217
has body: You seem to be confused with page context. Everything that is executed inside an evaluate callback is sandboxed. It will cannot see variables on the outside or the outside cannot see variables on the inside. They have to be specifically passed and can only be composed of basic primitives. From the docs: Note: The arguments and the return value to the evaluate function must be a simple primitive object. The rule of thumb: if it can be serialized via JSON, then it is fine. Regarding your actual question, you can use XPath as suggested by BoltClock. As you have seen, CasperJS provides the XPath utility which is usable outside of the page context. var x = require('casper').selectXPath; casper.click(x("//a[starts-with(.,'clickhere')]")); starts-with(string, string) is an XPath 1.0 function to check if some string starts with another string. If you want to use this only to retrieve the element based on the starting text and then do something else with it, you can use the client utils of CasperJS for that inside the page context. It provides for example the function getElementByXPath: casper.evaluate(function(){ var element = __utils__.getElementByXPath("//a[starts-with(.,'clickhere')]"); // do something with element }); The __utils__ property is injected by CasperJS into the page context for every page. The . in the XPath is the complete text that is inside this element whereas text() would only select text nodes that are directly inside the a element. Since the text that you use to select the a element is inside of the b element, you need to either use . like shown above or select the b element and then go to the parent: "//a/b[starts-with(text(),'clickhere')]/.."
downvote count: 0

http://stackoverflow.com/a/53241467
has body: You stated form. Therefore note that Formidable doesn't work out of the box with just NodeJS. Unless you were to use something like the prompt module for input. If you are using HTML, you'll need something like Angular, React or Browserify to be able to give it access to your interface.
downvote count: 1
upvote count: 0
score: -1
type: Answer
answers question: http://stackoverflow.com/q/25311965

http://stackoverflow.com/a/25326143
has comment: http://stackoverflow.com/comment/39480678
type: Answer
has body: You have to define the module just once: angular.module('myModule', []); And then use it as many times as you need it without setting the dependencies: angular.module('myModule'); So either you define the module in a separate file, or if you define it in the first service, the second should look like this: angular.module('myModule') .factory('myService2', function() { ... });
score: 0
accepted answer of: http://stackoverflow.com/q/25326093
answers question: http://stackoverflow.com/q/25326093
type: AcceptedAnswer

http://stackoverflow.com/q/25231634
type: Question
tagged with: javascript
score: -1
has body: I am trying to wrap my head around recursive functions, and I do not understand the output (this example is from John Resig's 'Javascript Ninja' book): var ninja = { chirp: function chirp(n) { return (n &gt; 1) ? chirp(n-1) + "-chirp"+n : "chirp"+n; } } $('#hello').html(ninja.chirp(8)); and the output: chirp1-chirp2-chirp3-chirp4-chirp5-chirp6-chirp7-chirp8 Why is the output of n increasing instead of decreasing? It seems to me that the output would count down from 8 instead of up from 1. http://jsfiddle.net/9xq7j6y8/1/
has title: understanding Javascript recursion
answer count: 2
upvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25231696
type: AnsweredQuestion
tagged with: recursion
has answer: http://stackoverflow.com/a/25231666
accepted answer: http://stackoverflow.com/a/25231696
downvote count: 1
possible better answer: http://stackoverflow.com/a/25231666

http://stackoverflow.com/comment/39432746
has text: eg. i get var id2 = 24, i want to use var id2 in id tag , how to do that ?
comment on: http://stackoverflow.com/q/25300619
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25309089
has body: use event.stopPropagation() Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event. try $("div").click(function (e) { window.location = 'DivLink'; alert(1); }); $("img").click(function (e) { e.stopPropagation(); alert(1); window.location.href = 'ImgLink'; }); DEMO
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25309053
answers question: http://stackoverflow.com/q/25309053
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/39531735
type: QuestionComment
comment on: http://stackoverflow.com/q/25354652
has text: Just use `main.push(subobject)`? I don't understand the problem.
score: 0
type: Comment

http://stackoverflow.com/a/25264153
has comment: http://stackoverflow.com/comment/39388597
has comment: http://stackoverflow.com/comment/39365143
has comment: http://stackoverflow.com/comment/39396267
answers question: http://stackoverflow.com/q/25264026
score: 0
has comment: http://stackoverflow.com/comment/39365066
type: Answer
has body: The code below will not let the user enter character in your field only number. Because the type="number" is html5 and doesn't work in all the browsers. $(document).on('keydown', '.numeric-input', function(event) { var dot_split = $(this).val().split('.'); if ($.inArray(event.keyCode,[46,8,9,27,13]) !== -1 || (event.keyCode == 65 &amp;&amp; event.ctrlKey === true) || (event.keyCode &gt;= 35 &amp;&amp; event.keyCode &lt;= 39) &amp;&amp; dot_split.length &lt;= 2) { // let it happen, don't do anything return; }else{ // Ensure that it is a number and stop the keypress if (event.shiftKey || (event.keyCode &lt; 48 || event.keyCode &gt; 57) &amp;&amp; (event.keyCode &lt; 96 || event.keyCode &gt; 105 )) { event.preventDefault(); } } }) Then you can check with an .each if any of the fields is empty. prodFieldsEmpty = 0; $('.numeric-input').each(function(){ if($(this).val() != ""){ prodFieldsEmpty++; } }) I hope this helps you!

http://stackoverflow.com/a/25332869
has comment: http://stackoverflow.com/comment/39493843
type: Answer
has comment: http://stackoverflow.com/comment/39493587
answers question: http://stackoverflow.com/q/25332794
has body: The error your getting is based on the server-side script. It maybe that the server may not support JSONP you may want to try: $.ajax({ url:parkingUrl, type:'GET', success: function(data){ console.log(JSON.parse(data)); } }); PHP code for the page header('Access-Control-Allow-Origin: http://api.sfpark.org'); You could also try if that doesn't work you could try to pull the page info on the server side using PHP, or whatever you are using $parkingURL = 'http://....'; echo file_get_contents($parkingURL);
has comment: http://stackoverflow.com/comment/39493516
score: 0

http://stackoverflow.com/q/25350838
type: Question
has title: AngularJS Directive: Attaching a function from the controller to ng-click
accepted answer: http://stackoverflow.com/a/25351267
tagged with: javascript
score: 0
answer count: 1
has body: I've run into some trouble trying to write a directive to make a generic tool-tip which accepts as arguments a user id, and different actions associated with that id. Each action has it's own method in the controller and it's own icon. This is the HTML {{user.name}} {{user.unit.name}} {{user.roleName}} This is the directive myApp.directive('rowActions',['$compile', function($compile){ return { restrict: 'A', scope: { id: '=', actions: '=' }, link: function (scope, element, attr) { var div = angular.element(' '); for (var i=0; i < scope.actions.length; i++) { div.append(''); } element.append(div); $compile(element); } }; }]); Basically, the methods are editUser and removeUser, I'd like to be able to call them as editUser(user.id), etc, but I can't get it to compile. I tried sending them as strings ('editUser'), and in the example they are sent as functions. Neither works. Please take a look, Thank you
tagged with: angularjs
has answer: http://stackoverflow.com/a/25351267
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39524891

http://stackoverflow.com/comment/39570113
has text: When you click on the map. Can you confirm this?
comment on: http://stackoverflow.com/q/25373889
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39506982
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25340149
has text: @Chris I didn't get what you mean.

http://stackoverflow.com/q/25254816
has body: The following setting sets the x-axis range on Highcharts to the past hour: xAxis: { min: new Date().setHours(new Date().getHours() - 1), // last hour max: new Date().getTime()), // now }, However more data points are added every few seconds. How can you make the x-axis dynamic such that the scale updates with new data points, showing only the past hour?
has answer: http://stackoverflow.com/a/25254872
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/25254907
type: Question
has title: Set Dynamic x-axis range in Highcharts
tagged with: javascript
tagged with: highcharts
downvote count: 0
tagged with: jquery
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/25269755
type: UnansweredQuestion

http://stackoverflow.com/comment/39456103
score: 0
type: Comment
has text: I have a Web Server (WAMP and XAMPP both) and am a PHP Web Developer, I just want to get the URL name whatever it is, I don't want to respond by serving a PHP file. I just want the server to print '/first.php' whenever I send a request using 'localhost:1337/first.php'.
comment on: http://stackoverflow.com/a/25313232
type: AnswerComment

http://stackoverflow.com/comment/39533302
has text: It isn't working, may be I need some event handler which forces browser to focus on the required input field whenever this input field is loaded.BTW I'm using Latest Chrome browser on Win 8 PC.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25350935

http://stackoverflow.com/comment/39445077
has text: sure thing, will be here in a minute :)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25307106

http://stackoverflow.com/q/25386099
has answer: http://stackoverflow.com/a/25386575
has body: The code below is supposed to give a class to every day in a calendar(FullCalendar) in which i have planned a vacation. The dateArray shown is a string built by php, converted to an array. Now my .each function doesn't seem to call. I can log the array before the each, but once im past the .each nothing happens. function grayDates() { var dateArray = ["2014-08-21", "2014-08-22", "2014-08-23", "2014-08-24", "2014-08-25", "2014-08-26", "2014-08-27", "2014-08-28", "2014-08-29", "2014-08-30", "2014-08-31", "2014-09-01", "2014-09-02", "2014-09-03"]; console.log("this will be displayed in my console"); $("td").each(function() { console.log("this will not be displayed"); var date = $(this).data("date"); if(dateArray.indexOf(date) &gt; -1){ $(this).addClass("vacation"); } }); } I load the libraries in the header like this: &lt;script src="//code.jquery.com/jquery-1.11.0.min.js"&gt;&lt;/script&gt; &lt;script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"&gt;&lt;/script&gt; The function gets called after library and function defining, on doc ready. (event = php var filled with my events that are displayed) $(document).ready(function() { grayDates(); $('#calendar').fullCalendar({ defaultDate: '&lt;?php echo date("Y-m-d");?&gt;', weekends: false, editable: true, lang: 'nl', events: [ &lt;?php echo $event;?&gt; ] }); }); Not really at home in jQuery. Anyone that spots my mistake?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39591071
upvote count: 1
downvote count: 1
tagged with: each
type: Question
has comment: http://stackoverflow.com/comment/39591064
accepted answer: http://stackoverflow.com/a/25386575
tagged with: javascript
has comment: http://stackoverflow.com/comment/39591063
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39591810
has comment: http://stackoverflow.com/comment/39591031
favorite count: 0
has comment: http://stackoverflow.com/comment/39591770
has comment: http://stackoverflow.com/comment/39591907
has title: .each function not working
has comment: http://stackoverflow.com/comment/39591954

http://stackoverflow.com/a/25304218
answers question: http://stackoverflow.com/q/25304144
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25304144
has body: First things first: date objects have nothing to do with jQuery, that is vanilla JavaScript. Now, assuming currentDate and deptDate are Date objects, set both dates to midnight with setHours() and then compare: currentDate = currentDate.setHours(0,0,0,0); deptDate = deptDate.setHours(0,0,0,0); var check = currentDate == deptDate;
type: AcceptedAnswer
upvote count: 3
type: Answer

http://stackoverflow.com/q/25347852
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25348178
has title: how to scroll bottom of div using angular js
type: Question
tagged with: angularjs-directive
score: 5
upvote count: 5
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/270612
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
has body: I have a div in which I added element .I want to scroll to bottom of the div whenever element added in div.I know how to do in in jquery .But I did not know how to scroll using angular js I know using jquery Scroll to bottom of div? testCaseContainer is id of div . var elem = document.getElementById('testCaseContainer'); // just to // scroll down // the line elem.scrollTop = elem.scrollHeight; I want to know how it is possible using angular ? http://plnkr.co/edit/M8tCL8Szc3h3FatFLycG?p=preview I added css in div container so that it scroll . .heightClass{ height:100px; overflow :auto; } how to move focus below when item is added ..please post your answer..

http://stackoverflow.com/comment/39395767
type: AnswerComment
type: Comment
has text: I found that this package gives nearly satisfactory indenting :) https://github.com/pangloss/vim-javascript
comment on: http://stackoverflow.com/a/25266974
score: 0

http://stackoverflow.com/q/25258145
type: UnansweredQuestion
tagged with: css
tagged with: opacity
has title: Opacity is not working in IE8
has answer: http://stackoverflow.com/a/25260285
has answer: http://stackoverflow.com/a/25258265
tagged with: ie8-browser-mode
type: Question
has comment: http://stackoverflow.com/comment/39373704
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25258252
score: 0
answer count: 3
has body: I found many similar questions in the site, but nothing came close to my rescue.I am dynamically appending a div to an element and in this div I have mentioned opacity style attribute as below. $('#cell').append(' Please wait ... '); This is being done to blur the page when an ajax request is sent to the server.This piece of code is written in a javascript area and hence i am using inline style.Above style works fine in IE10 but not in IE8.
has comment: http://stackoverflow.com/comment/39354268

http://stackoverflow.com/comment/39429949
comment on: http://stackoverflow.com/q/25298984
type: Comment
type: QuestionComment
has text: You should be using `var y = x();`, not `var y = new x();`. `x` is not a constructor function. (It does not write to `this`.)
score: 1

http://stackoverflow.com/comment/39392354
has text: I think @Max has got the right solution here
type: QuestionComment
comment on: http://stackoverflow.com/q/25278052
score: 0
type: Comment

http://stackoverflow.com/comment/39496185
type: Comment
has text: But objects within arrays are collections, I'd treat that whole value as an array, like I showed in the second example, and use a transformation that works on that data structure. I'm not fond of functions that do too much. But the other answer provide that functionality in any case.
type: AnswerComment
comment on: http://stackoverflow.com/a/25334210
score: 0

http://stackoverflow.com/comment/39360999
has text: Possible duplicate of http://stackoverflow.com/questions/3964710/replacing-selected-text-in-the-textarea
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25261962

http://stackoverflow.com/comment/39385937
score: 0
type: AnswerComment
has text: @gradyWoodruff I tested it works for me for (var i = 0; i <=11; i++) { if(i%3 == 0 || i==0 ){ alert(i); } }
type: Comment
comment on: http://stackoverflow.com/a/25274613

http://stackoverflow.com/comment/39560334
comment on: http://stackoverflow.com/a/25369642
type: AnswerComment
score: 0
type: Comment
has text: Thanks, though it still isn't doing anything. Are you basing that entirely off the code I wrote above, or from the screenshots? I'm not even sure if what I'm doing is right to begin with.

http://stackoverflow.com/q/25311138
downvote count: 0
tagged with: javascript
tagged with: express
favorite count: 0
tagged with: backbone.js
has answer: http://stackoverflow.com/a/25312605
has title: How to redirect url after saving to model in backbone and express
has body: I have a backbone model that takes in data from a form and then saves it as cookie values that I want to use later app.Form1Model = Backbone.Model.extend({ url:'/save-outline/', defaults: { projectName : 'Untitled', Embargo: 'No', Angle:'1' } }); on saving the model, and sending it to the url, running res.render('dashboard/step2/index'); or redirect produces a response but it is not rendering in the browser; I know that the data is coming back as an response; What should i be doing in the model to redirect it to the next page ?
possible better answer: http://stackoverflow.com/a/25311194
upvote count: 1
has answer: http://stackoverflow.com/a/25311194
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25312605
score: 1
answer count: 2

http://stackoverflow.com/comment/39323946
comment on: http://stackoverflow.com/a/25242139
has text: Are you sure? I tested it in Chrome version 36 and it does not for me. But it does show alert in Safari on my iPhone 4s.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25240397
has title: Local Storage for Multiligual App on appery.io
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25240627
score: 0
tagged with: android
type: UnansweredQuestion
has body: This is my first App page I am trying to create. I am using appery.io platform. I am trying to create one page that has a menu of two options (languages) such that, when the user choses the langauge (German, English), the header will show the langauge as follow: German> Deutsch English=> English My page contains two componenets: Caption/header: has the text "header" Select menu: has two options (English, German). I have done the following: I created two translation.json files for both langauges and inserted the following : de-DE: { "header":"Deutsch"} en-EN: { "header":"English" } I have created four events for selectMenu component as follow: a. selectMenu > click > set local storage variable: variable name: language value: var language = Appery("mobileselectmenu_10").find(":selected").text(); b. selectMenu > click > set local storage variable: variable name: language value: var language = Appery("mobileselectmenu_10").find(":selected").text(); c. selectMenu > change value > run java script: localStorage.getItem("language"); var option = {lng: language, resGetPath: 'locales/_lng/ns.json', fallbackLng: 'en-US'}; //Pass the initialization language, //set the translation files path and fallback language $.i18n.init(option, function(t) { $(document).i18n(); //Once the translations are loaded translate the whole document }); d. selectMenu > change value run java script: localStorage.getItem("language"); var option = {lng: language, resGetPath: 'locales/_lng/ns.json', fallbackLng: 'en-US'}; //Pass the initialization language, //set the translation files path and fallback language $.i18n.init(option, function(t) { $(document).i18n(); //Once the translations are loaded translate the whole document }); When I test the App, I get the following error in the console: Uncaught Error: Syntax error, unrecognized expression: unsupported pseudo: German jquery-1.9.1.js:4421 Sizzle.error jquery-1.9.1.js:4421 Sizzle.selectors.filter.PSEUDO jquery-1.9.1.js:4776 matcherFromTokens jquery-…

http://stackoverflow.com/a/25250596
has comment: http://stackoverflow.com/comment/112629282
has comment: http://stackoverflow.com/comment/39340281
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39340508
has comment: http://stackoverflow.com/comment/39340487
type: Answer
has comment: http://stackoverflow.com/comment/113748798
has comment: http://stackoverflow.com/comment/123266061
has comment: http://stackoverflow.com/comment/39340361
upvote count: 202
answers question: http://stackoverflow.com/q/25250551
score: 202
accepted answer of: http://stackoverflow.com/q/25250551
has body: The native JavaScript Date system works in milliseconds as opposed to seconds, but otherwise, it is the same "epoch time" as in UNIX. You can round down the fractions of a second and get the UNIX epoch by doing: Math.floor(+new Date() / 1000) Update: As Guillermo points out, an alternate syntax may be more readable: Math.floor(new Date().getTime() / 1000) The + in the first example is a JavaScript quirk that forces evaluation as a number, which has the same effect of converting to milliseconds. The second version does this explicitly.

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/25279639
tags question: http://stackoverflow.com/q/25367987
type: Tag

http://stackoverflow.com/comment/39493761
score: 0
has text: Awesome, works perfectly, thanks! Just so I understand: (1) why do you pass `['$scope', 'MyService', function()]` to `app.controller()`? I've used only the `function()` and it works too. (2) Why the `var cm = $window.customModule();` in the `MyService`? It works without as well.
type: Comment
comment on: http://stackoverflow.com/a/25318165
type: AnswerComment

http://stackoverflow.com/q/25328771
type: Question
has comment: http://stackoverflow.com/comment/39485298
has answer: http://stackoverflow.com/a/25328899
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/39485502
answer count: 3
has answer: http://stackoverflow.com/a/25328966
downvote count: 1
has comment: http://stackoverflow.com/comment/39485380
has comment: http://stackoverflow.com/comment/39485434
favorite count: 0
has title: Function definition on one line
possible better answer: http://stackoverflow.com/a/25328966
has comment: http://stackoverflow.com/comment/39485941
has body: If we have a function that contains one short statement, what reasons may we consider against putting the function definition on one line? function addTwo(x,y){ return x + y; } vs function addTwo(x,y){ return x + y; } The reason I'm asking is that I have scripts with ~100 function definitions, many of which could be one-liners. However, I have doubts whether mixing them with multiline functions will eventually decrease readability. Reading JS code, I usually see short functions (that would fit well in one line) written on multiple lines, but I have never seen a reason against one-liners. So, my question addresses those who in such a situation considered using one-liners, and eventually settled for or against it, for a good reason.
type: AnsweredQuestion
tagged with: coding-style
has comment: http://stackoverflow.com/comment/39486568
has comment: http://stackoverflow.com/comment/39485353
has answer: http://stackoverflow.com/a/25329568
score: 1
has comment: http://stackoverflow.com/comment/39485537
accepted answer: http://stackoverflow.com/a/25329568

http://stackoverflow.com/q/25358510
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39538720
favorite count: 0
has answer: http://stackoverflow.com/a/25358586
has comment: http://stackoverflow.com/comment/39539026
upvote count: 6
has title: Why can't console.log be called using .call()
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25358586
type: Question
has comment: http://stackoverflow.com/comment/61533621
has comment: http://stackoverflow.com/comment/39538752
has body: The below code returns a pop-up window with 'hello'. alert.call(this, 'hello'); But the below code returns an error "TypeError: Illegal invocation". console.log.call(this, 'hello'); What is the difference in the implements of alert and console.log?
tagged with: javascript
score: 6
has comment: http://stackoverflow.com/comment/39538710

http://stackoverflow.com/q/25237146
has body: I am trying to convert canvas into pdf but i get clean white pdf in result Here is the code, I am not being able to figure out what i am missing.. function HtmlToImage(){ html2canvas(document.body, { onrendered: function(canvas) { var img =canvas.toDataURL("image/jpeg,1.0"); var pdf = new jsPDF(); pdf.addImage(img, 'JPEG', 0, 0); pdf.output('datauri'); } }); }
has answer: http://stackoverflow.com/a/25241140
has comment: http://stackoverflow.com/comment/57993512
accepted answer: http://stackoverflow.com/a/25241140
has comment: http://stackoverflow.com/comment/78232802
tagged with: jspdf
answer count: 2
possible better answer: http://stackoverflow.com/a/71799126
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/pdf
tagged with: html5-canvas
favorite count: 0
upvote count: 14
has comment: http://stackoverflow.com/comment/58014314
has answer: http://stackoverflow.com/a/71799126
has title: Converting Canvas to Pdf using JsPDF
type: Question
score: 14
type: AnsweredQuestion

http://stackoverflow.com/comment/39343111
comment on: http://stackoverflow.com/q/25240244
has text: yes, I want to use the filters form the toolbar search, as shown in this example: http://www.ok-soft-gmbh.com/jqGrid/SimpleLocalGridWithSearchingToolbarMultilpe.htm
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39592183
has text: @DanielSanchez The preventDefault() almost worked, but still closed the dialog on the 1st page as soon as the 2nd page was done rendering. I verified that it was activated. If I just put in an alert('Test') in the script after preventDefault, it works, and keeps the dialog open. But there's something about rendering a page or submitting a request that closes it automatically.
comment on: http://stackoverflow.com/q/25332233
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39449562
has text: @Sam Yes I am using the helper. As You can see it has added some data attributes.
comment on: http://stackoverflow.com/q/25308239
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39344262
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25252397
has text: See http://stackoverflow.com/questions/8658222/how-can-i-use-coffeescript-this-from-within-jquery-bind
type: Comment

http://stackoverflow.com/q/25344699
has body: Is it possible to get the "device id" to identify the user's PC/mobile phone with javascript in a PDF file? I intend to send this device id to the server for simple authentication, after I open the file (sending to server is not an issue).
has comment: http://stackoverflow.com/comment/39528081
type: AnsweredQuestion
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39515559
linked to: http://stackoverflow.com/q/25302113
type: Question
has title: get device id for PDF with javascript
possible better answer: http://stackoverflow.com/a/25348128
accepted answer: http://stackoverflow.com/a/25345405
tagged with: javascript
upvote count: 2
answer count: 2
tagged with: http://stackoverflow.com/tag/pdf
has answer: http://stackoverflow.com/a/25345405
favorite count: 0
has answer: http://stackoverflow.com/a/25348128

http://stackoverflow.com/comment/39307085
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25233120
has text: I try this library, but generate a PDF with only text, without css styles.
type: AnswerComment

http://stackoverflow.com/q/25344974
upvote count: 1
has body: There is a need to perform an anonymous function (on the client) to a limited scope with its own environment variables (without access to the global variables). Overriding context this is not a problem, but with variable I see only one option - a eval. But as eval should be left to the edge, I decided to ask the community if there are other solutions to the problem. Actually the problem: function sandbox(fn){ // with eval fn = fn.toString(); // need to dynamically create variables inside fn fn = '(function(){"use strict"; var window, document; (' + fn + ').call(this);}) '; fn = eval(fn); fn.call({}); // example } sandbox(function(){ console.log(window, document, this); // return undefined, undefined, Object {} }); For a redefinition of the variables must respond to the function sandbox(). I mean the one with a clear redefinition of variables within functions are not transmitted to offer. Dining with the dynamic creation of the frame with its own environment, as well as transferring variable parameters to a function (function(window, document){...})(null, null) also not suitable for it, and so everything is clear, and is needed here dynamization of this process by the sandbox(). There are other ways to solve without using eval? Thanks in advance.
favorite count: 0
tagged with: dynamic-variables
has comment: http://stackoverflow.com/comment/39514800
has comment: http://stackoverflow.com/comment/39514801
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39514899
answer count: 0
has comment: http://stackoverflow.com/comment/39514806
downvote count: 0
score: 1
tagged with: sandbox
type: Question
has title: Dynamic variables, scope, sandbox?
linked to: http://stackoverflow.com/q/195149
has comment: http://stackoverflow.com/comment/39514820
tagged with: javascript
tagged with: scope

http://stackoverflow.com/comment/39558349
score: 0
type: Comment
type: QuestionComment
has text: @Larkeith __YES__ it slows down the browser like __!#@!__ I'm surprised it doesn't kill your browser... _Answer edited._
comment on: http://stackoverflow.com/q/25367834

http://stackoverflow.com/a/25266661
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25266372
has body: If you define your seperators, below code can return all alternatives for you. var arr = ["_",".","-"]; var email = letters.substr(0, letters.indexOf('@')); arr.map(function(val,index,rest){ var r = email.split(val); if(r.length &gt; 1){ return r.join(' '); } return ""; } );

http://stackoverflow.com/comment/39425339
comment on: http://stackoverflow.com/a/25294909
score: 0
type: AnswerComment
has text: If you want you can remove the logic that specifically looks for an element with an id of "I". That will remove all div's that do not have a ul element inside of them. You will of course need to adjust the logic to suit your needs.
type: Comment

http://stackoverflow.com/comment/39325731
comment on: http://stackoverflow.com/a/25243093
type: Comment
has text: You don't have to write double code - there's plenty of shims already written. The point is that developers should use modern APIs whenever available and monkey patch the older browsers that don't have them. On newer browsers the modern code will just run natively and on older browsers the same code still works. See the link in my answer for more context.
type: AnswerComment
score: 0

http://stackoverflow.com/q/25343388
score: 1
tagged with: javascript
type: Question
downvote count: 0
favorite count: 0
tagged with: proxy
has title: how to make proxy server listen to itself
tagged with: node.js
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39514330
upvote count: 1
has body: I have used https://github.com/greim/hoxy proxy server to intercept the request and responses. But for some reasons i also want to mock it for some functions, that it returns some response to the client when client requests on 9000 port. as my proxy server listening at 9000 port. Now when i request on a 9000 port, i get : request GET : 'http://localhost:9000' ERROR: Error: invalid protocol: null and then ERROR: Error: connect ECONNREFUSED How to get rid of these errors?? EDIT : Here is a few lines: var proxy = new hoxy.Proxy({ port : 9000 }); proxy._server.on('request', function(){ console.log('Request Recieved'); }); proxy.intercept({ phase : 'request' }, function(){ //interception logic }); I am not able to figure out what is the issue??

http://stackoverflow.com/comment/39558318
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25368765
score: 0
has text: I'll add to that the OP should remember to make calls to reject when the deferreds fail or the failure callbacks will never be called.

http://stackoverflow.com/q/25283120
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25283242
accepted answer: http://stackoverflow.com/a/25283313
tagged with: javascript
tagged with: jquery
has body: I am trying to get more field filled with a select2 drop-down menu. Check this fiddle: http://jsfiddle.net/ws3tjp5f/ I want the "Select extra" to be populated too. But with a different value. Now I can print id & text, I want to store and print one more value "extra" html: Selected IDs: Selected Options: Selected Extra Field: js: var test = $('#test'); $(test).select2({ placeholder: "Choose", data:[ {id:0,text:"enhancement"}, {id:1,text:"bug"}, {id:2,text:"duplicate"}, {id:3,text:"invalid"}, {id:4,text:"wontfix"} ], width: "300px" }); $(test).change(function() { var theID = $(test).select2('data').id; var theSelection = $(test).select2('data').text; var theExtra = $(test).select2('data').text; $('#selectedID').val(theID); $('#selectedText').val(theSelection); $('$selectedExtra').val(theExtra); });
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
tagged with: jquery-select2
upvote count: 2
has answer: http://stackoverflow.com/a/25283313
has title: How can i add extra field on this select2 form
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39399781
possible better answer: http://stackoverflow.com/a/25283242

http://stackoverflow.com/comment/39410103
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25288540
has text: well then after you declare your object on foo, set your `this` property `bar` to the `foo.bar`

http://stackoverflow.com/a/25285238
downvote count: 0
has body: You initialised the Angular application after setting ng-style!!! Make sure to include ng-app="app" on the body tag and you should be fine.
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25285143

http://stackoverflow.com/comment/39514962
has text: What have you already found to solve this problem ? Have you already heard about symmetric-keys and asymmetric-keys encryption ? And mostly, what's the point of having an encrypted string that cannot be decrypted ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25345081

http://stackoverflow.com/a/25296713
type: Answer
has comment: http://stackoverflow.com/comment/39437212
has body: readFile should work for any content type. Presumably the "scrambled characters" you see are exactly the content of the .docx or .doc file you're reading. (If you looked at the file via type on Windows or cat on Mac/Linux, you would see the same thing.) So I think the issue you're having is that you want to somehow extract the text from a variety of file formats. Dropbox (and dropbox.js) won't help you with that particular problem... you'll need to find software that understands all those file formats and can convert them to the form you need. For example, textract is a Python library that can do this.
answers question: http://stackoverflow.com/q/25296400
score: 0
has comment: http://stackoverflow.com/comment/39445030
has comment: http://stackoverflow.com/comment/39445104

http://stackoverflow.com/comment/39580019
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25379699
has text: If you want to change `og:title` so that Facebook will pick it up when a page is shared – that is of course pointless, because FB’s scraper tool does not execute client-side code.

http://stackoverflow.com/comment/39520060
has text: I understand what you're saying but I'm afraid this doesn't work either.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25348137

http://stackoverflow.com/q/25235427
score: -1
answer count: 2
possible better answer: http://stackoverflow.com/a/25235467
downvote count: 1
has answer: http://stackoverflow.com/a/25235467
has body: Currently I only have one image onLoad everytime when i run my animation. var imgFish = new Image(); imgFish.onload = init; imgFish.src = 'Image'; I'm try to make two or more different image to load at the same time. I have only one orange fish moving on the canvas when i press on the 'Add a fish!' button. I want to make more different fish swimming on the canvas too. I have created another button called 'Add a different color fish!', I want to add a fish but with a different image with the same code to allow the fish to animation on the canvas. Anyone knows how can i achieve it?
has title: Two different image onLoad
has answer: http://stackoverflow.com/a/25235545
tagged with: canvas
type: AnsweredQuestion
upvote count: 0
tagged with: javascript
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25235545

http://stackoverflow.com/comment/39394839
type: QuestionComment
comment on: http://stackoverflow.com/q/25280168
has text: The html in the browser is very big. This is only the input field which i am trying to bind: If you need the whole HTML I can paste it here... PS: Or you mean how i use the directive?
score: 0
type: Comment

http://stackoverflow.com/comment/39402685
has text: which version of browser you are using?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25284450
score: 0

http://stackoverflow.com/comment/39797031
score: 0
comment on: http://stackoverflow.com/q/25288434
type: Comment
type: QuestionComment
has text: sorry I didn't try that, I had to move on, that was just too much labor for something so simple, but feel free to fill it as an answer as other readers will find it a viable solution.

http://stackoverflow.com/q/25303556
has answer: http://stackoverflow.com/a/25303758
accepted answer: http://stackoverflow.com/a/25303758
has comment: http://stackoverflow.com/comment/39438057
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25303626
has body: Every table row has a button "Show" located in a cell. On click of that button, I need to extract The text, contained in other cells of that exact row. Example HTML: 1 Info1 2 Info2 3 Info3 What I want is: when I press (for example) the button on the 3rd row, to extract the text in the other 2 cells ("3" and "Info3"). I am looking for the implementation of the showRowInfo() in JavaScript, or at least a way to get the cells from the selected row.
type: Question
has title: JavaScript get Info from table cells on button click
answer count: 2
tagged with: javascript
tagged with: jquery
downvote count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39438150
favorite count: 0
upvote count: 0
has answer: http://stackoverflow.com/a/25303626
score: -3

requirejs
tags question: http://stackoverflow.com/q/25348831
tags question: http://stackoverflow.com/q/25358897
tag name: requirejs
tags question: http://stackoverflow.com/q/25301810
tags question: http://stackoverflow.com/q/25364008
tags question: http://stackoverflow.com/q/25361752
type: Tag
tags question: http://stackoverflow.com/q/25283714
tags question: http://stackoverflow.com/q/25274030
tags question: http://stackoverflow.com/q/25274313
tags question: http://stackoverflow.com/q/25262850
tags question: http://stackoverflow.com/q/25282117
tags question: http://stackoverflow.com/q/25273951
tags question: http://stackoverflow.com/q/25289662
tags question: http://stackoverflow.com/q/25352767
tags question: http://stackoverflow.com/q/25334944
tags question: http://stackoverflow.com/q/25322971
tags question: http://stackoverflow.com/q/25260935
tags question: http://stackoverflow.com/q/25343730
tags question: http://stackoverflow.com/q/25239819
tags question: http://stackoverflow.com/q/25230752
tags question: http://stackoverflow.com/q/25274976
tags question: http://stackoverflow.com/q/25286284
tags question: http://stackoverflow.com/q/25274930
tags question: http://stackoverflow.com/q/25240273
tags question: http://stackoverflow.com/q/25319657
tags question: http://stackoverflow.com/q/25364563
tags question: http://stackoverflow.com/q/25267916
tags question: http://stackoverflow.com/q/25302363

http://stackoverflow.com/q/25386970
has comment: http://stackoverflow.com/comment/39592903
accepted answer: http://stackoverflow.com/a/25387165
possible better answer: http://stackoverflow.com/a/25387128
has answer: http://stackoverflow.com/a/25387128
downvote count: 1
type: Question
type: AnsweredQuestion
score: -1
has body: I'm using this example to add markers on my direction A to B. How can I remove "old" markers, when I add new start and end points. I try to change gmarkers[j].setMap(null); but not working. for (var j=0; j&lt; gmarkers.length; j++) { if (boxes[i].contains(gmarkers[j].getPosition())) gmarkers[j].setMap(map); } fiddle/original code from this question
tagged with: google-maps
tagged with: google-maps-markers
upvote count: 0
tagged with: javascript
has title: How can I remove old markers from direction A to B
favorite count: 0
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/25387315
answer count: 3
linked to: http://stackoverflow.com/q/24912796
has answer: http://stackoverflow.com/a/25387165

http://stackoverflow.com/a/25366557
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/74185750
type: Answer
upvote count: 73
has body: Your first solution is possible, AngularJS allow to change the start/end symbols of text interpolation like this: appModule.config(function($interpolateProvider) { $interpolateProvider.startSymbol('{[{'); $interpolateProvider.endSymbol('}]}'); }); Then you could use it in your template: &lt;div&gt;{[{message}]}&lt;/div&gt; Also see: $interpolateProvider documentation Hope this helps.
score: 73
accepted answer of: http://stackoverflow.com/q/25366412
downvote count: 0
answers question: http://stackoverflow.com/q/25366412

http://stackoverflow.com/comment/39581386
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25381214
has text: Take a look into >document.referrer< and >navigation.userAgent<.
score: 0

http://stackoverflow.com/a/25251371
has body: Your function should be like this: function fun() { var ddl = document.getElementById("cardtype"); var valor = ddl.options[ddl.selectedIndex].text; if (valor == "--- Please select ---") { alert("Please select a card type"); } } Working fiddle:http://jsfiddle.net/robertrozas/XFtBD/169/
type: Answer
has comment: http://stackoverflow.com/comment/39341818
accepted answer of: http://stackoverflow.com/q/25251215
has comment: http://stackoverflow.com/comment/39341895
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/39341833
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25251215

http://stackoverflow.com/comment/39330879
comment on: http://stackoverflow.com/q/25245712
score: 0
type: Comment
type: QuestionComment
has text: What, *exactly* is the error message?

http://stackoverflow.com/comment/39509931
type: QuestionComment
comment on: http://stackoverflow.com/q/25341776
score: 0
type: Comment
has text: possible duplicate of [Why is my variable unaltered after I modify it inside of a function? - Asynchronous code reference](http://stackoverflow.com/questions/23667086/why-is-my-variable-unaltered-after-i-modify-it-inside-of-a-function-asynchron)

http://stackoverflow.com/a/25316061
score: 0
answers question: http://stackoverflow.com/q/25315107
type: Answer
has body: The way I have written is in the following steps: 1)Find which radio button is selected. 2)If the check boxes are selected previously and the count of selected check boxes is greater than 1, then clear all the check boxes. 3)When Single option is selected, then Call a method which deselects the rest of the check boxes. 4)When multi option is selected, then unbind the method which causes to deselect other check boxes enabling to check more than one check box. I know that my code is lengthy bu however, I think it would get you started and it is readable as well. Sample example from fiddle would be $('.language_options').on('click', function() { ClearCheckBoxes(); if(this.id=='langOptionRadioBtn_0') { $('input[name="langCheckBoxes"]').on('change', function() { ClearOtherCheckBoxes(this,'single'); }); } else { $('input[name="langCheckBoxes"]').unbind(); } }); Here is the fiddle link. http://jsfiddle.net/5wadfh3o/16/ This is been tested on FireFox 31.0 Thank you.

http://stackoverflow.com/comment/39777558
score: 0
has text: @NicolasR yes my code works on browser but not in simulator
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25387644

http://stackoverflow.com/comment/39521301
type: QuestionComment
comment on: http://stackoverflow.com/q/25347198
has text: You have to remove `window.onload = function(){` and `};` at the end as well. By default a content script runs at `document_idle`, when `window.onload` has already run.
score: 0
type: Comment

http://stackoverflow.com/comment/39470303
score: 0
has text: http://digwp.com/2011/09/using-instead-of-jquery-in-wordpress/
comment on: http://stackoverflow.com/q/25320795
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39376091
comment on: http://stackoverflow.com/a/25269778
type: AnswerComment
score: 0
type: Comment
has text: i did attempt to swap all the older version numbers to 1.9.1 but it failed. I'll try and work out your migrate solution. Thanks.

http://stackoverflow.com/q/25230232
favorite count: 0
has answer: http://stackoverflow.com/a/25231112
has comment: http://stackoverflow.com/comment/39301498
has body: I want a function checkPassword function, which should check if the password parameter adheres to the following rules: Must be longer than 6 characters Allowed characters are lower or upper case Latin alphabet characters (a-z), numbers (0-9), and special characters +, $, #, \, / only Must not have 3 or more consecutive numbers (e.g. "pass12p" is fine, but "pass125p" is not, because it contains "125") checkPassword should print "true" to the console if the password parameter adheres to the said rules, and "false" if it does not.
upvote count: 2
has title: regular expression for password with few rules
answer count: 3
has answer: http://stackoverflow.com/a/25230717
downvote count: 1
has comment: http://stackoverflow.com/comment/39300978
accepted answer: http://stackoverflow.com/a/25230717
linked to: http://stackoverflow.com/q/25190108
tagged with: javascript
score: 1
has comment: http://stackoverflow.com/comment/39301338
type: Question
possible better answer: http://stackoverflow.com/a/25230464
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25230464
tagged with: regex
has comment: http://stackoverflow.com/comment/39301435

http://stackoverflow.com/q/25331087
has comment: http://stackoverflow.com/comment/113416237
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39492530
favorite count: 0
has answer: http://stackoverflow.com/a/25331925
has title: Fetch JSON object from Google WebApp from another Google WebApp
upvote count: 1
type: AnsweredQuestion
tagged with: urlfetch
score: 1
tagged with: http://stackoverflow.com/tag/json
type: Question
accepted answer: http://stackoverflow.com/a/25331925
tagged with: google-apps-script
has body: I have two Google Spreadsheets, each of which with some Apps Script attached. Eventually I want to deploy both as WebApps so they can communicate with one another through their public URLs. For now, I have only deployed one of them so I can test this functionality. We'll call Script A the one that's deployed as a WebApp and Script B the one that is trying to send a request to Script A's URL. The goal here is for Script A to return a JSON object to Script B. In Script A, I have this code: function doGet(request) { var data = [[1, 2, 3], [4, 5, 6]]; //dummy JSON object return ContentService.createTextOutput(JSON.stringify(data)) .setMimeType(ContentService.MimeType.JSON); } In Script B, I have this code: function pullJSON(URL) { var data = UrlFetchApp.fetch(URL, {"contentType": "application/json"}); Logger.log(data); } When I access Script A's exec URL, I get a JSON object. However, when I run pullJSON() in Script B (feeding it the same URL), the Logger shows a long HTML file filled with metadata (there's no visible content when I view it in my browser). I'm confused as to why this is the case...I know there are a couple of redirects to return JSON, but it is my understanding that the UrlFetchApp.fetch() method defaults to following all redirects. Could this be an OAuth issue? Script A is published to run as User Accessing the App, though I also tried running it as me. Thoughts?
linked to: http://stackoverflow.com/q/64130847

http://stackoverflow.com/comment/39590141
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25385544
has text: Have you heard about JS [arguments object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions#Using_the_arguments_object)?

http://stackoverflow.com/a/25290266
type: Answer
has body: If div doesn't contain a child it's throwing an error. Check if child exists remove the child. use this rightDiv.firstChild &amp;&amp; rightDiv.removeChild(rightDiv.firstChild); DEMO
score: 0
answers question: http://stackoverflow.com/q/25290017

http://stackoverflow.com/comment/39375472
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25266114
has text: @Bergi: 1000 is just a random number, question is about preventing unresponsiveness due to heavy DOM manipulations.

http://stackoverflow.com/a/25235056
has comment: http://stackoverflow.com/comment/39311185
has comment: http://stackoverflow.com/comment/39311246
type: Answer
answers question: http://stackoverflow.com/q/25234978
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/39311175
has body: It's not clear from your question if your dictionary is a JS object or a JSON string. If it's JSON, you'll have to first parse it: var dictionary = JSON.parse(theJSONstring); then follow the instructions below. If you're supporting IE8-, you'll have to polyfill JSON support. var dictionary = { "test1": ["a","b","c"], "test2": ["c","d"], "test3": ["f"], }; var commands = Object.keys(dictionary).map(function (key) { return { user: key, cmd: dictionary[key] }; }); If you're unfortunate enough that you have to support ancient browsers (IE8-), use this: var dictionary = { "test1":["a","b","c"], "test2":["c","d"], "test3":["f"], }; var commands = []; for (var key in dictionary) { if (Object.prototype.hasOwnProperty.call(dictionary, key)) { commands.push({ user: key, cmd: dictionary[key] }); } }
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25234978

http://stackoverflow.com/q/25328247
has answer: http://stackoverflow.com/a/25328293
tagged with: javascript
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25328297
has comment: http://stackoverflow.com/comment/39484339
tagged with: jquery
has comment: http://stackoverflow.com/comment/39484299
possible better answer: http://stackoverflow.com/a/25328293
has answer: http://stackoverflow.com/a/25328297
has title: Jquery .on() method not working
has comment: http://stackoverflow.com/comment/39484309
has body: Fiddle Please have a look at the above fiddle. The .on method seems to be not working. I'm sure I must be missing something obvious.? JS var rand; $('button').click(function(){ rand = Math.floor((Math.random() * 100) + 1); $('#maindiv').append('&lt;div style="cursor:pointer" id="dyn_user_'+rand+'"&gt;'+rand+'&lt;/div&gt;'); }); $("[id^='dyn_user_']").on('click',function(event){ console.log('On method!'); $('#maindiv').append('&lt;div style="cursor:pointer" id="dyn_user_"'+rand+'"&gt;'+rand+'&lt;/div&gt;'); }); My main objective was to try to see in .on() is working if I generate the same element (in this case 'div' with id="dyn_user_somerandnumber") inside .on() . But I got stuck with .on() method not working. I'm sorry if it sounds confusing.
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/39478223
type: Comment
has text: I did, Your questions is showing significant lack of research, that is why I down voted it. Please spare me from your bad words, the internet has enough already.
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/25324660

http://stackoverflow.com/a/25342734
type: AcceptedAnswer
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39511915
has comment: http://stackoverflow.com/comment/39512188
has body: seems you are looking for something like this: http://jsfiddle.net/InferOn/Lrwur3ek/ function message(dest) { if(dest===5) window.setTimeout(alert, 5000, "Great start."); else if (dest===134) { window.setTimeout(alert, 3000,"You made it."); window.setTimeout(MyConfirm, 5000); } } function MyConfirm(){ if(confirm("Game over. Do you want to play again?")) reset(); else noReset(); } function reset(){alert('reset');} function noReset(){alert('no reset');} message(134); btw I think setTimeout is not the right way to manage your events
accepted answer of: http://stackoverflow.com/q/25341755
answers question: http://stackoverflow.com/q/25341755

http://stackoverflow.com/a/25315111
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25313095
answers question: http://stackoverflow.com/q/25313095
score: 0
type: Answer
has body: So from other questions posted on StackOverflow, and some that I posted myself, some great users have helped me out and I've solved it. Here's the code that I have to use - &lt;script&gt; $(function(){ var hideMany = function () { var toHide = [].slice.call(arguments); toHide.forEach(function (id) { if(id === null) { return } var elem = document.getElementById(id); if(elem) { elem.className = "hide"; } }); }; var Workspace = Backbone.Router.extend({ routes: { "hide(/:a)(/:b)(/:c)" : "test" }, test: hideMany }); var router = new Workspace(); Backbone.history.start(); }); &lt;/script&gt; So when you type "www.website.com/index.html#hide/ID1/ID2/ID3", it'll hide the elements with the IDs that you typed in. I don't fully understand it, but I'm working on breaking it down and figuring out how it works. Thanks for all the help, guys!

google-maps-api-3
tags question: http://stackoverflow.com/q/25376513
tags question: http://stackoverflow.com/q/25377136
tags question: http://stackoverflow.com/q/25347832
tags question: http://stackoverflow.com/q/25329736
tags question: http://stackoverflow.com/q/25357370
tags question: http://stackoverflow.com/q/25320709
tags question: http://stackoverflow.com/q/25297923
tags question: http://stackoverflow.com/q/25354288
tags question: http://stackoverflow.com/q/25269025
tags question: http://stackoverflow.com/q/25248061
tags question: http://stackoverflow.com/q/25297604
tags question: http://stackoverflow.com/q/25331341
tags question: http://stackoverflow.com/q/25234976
tags question: http://stackoverflow.com/q/25373709
tags question: http://stackoverflow.com/q/25368851
tags question: http://stackoverflow.com/q/25338940
tags question: http://stackoverflow.com/q/25367542
tags question: http://stackoverflow.com/q/25267146
tags question: http://stackoverflow.com/q/25326182
tags question: http://stackoverflow.com/q/25266005
tags question: http://stackoverflow.com/q/25272247
tags question: http://stackoverflow.com/q/25238492
tags question: http://stackoverflow.com/q/25370417
tags question: http://stackoverflow.com/q/25386970
tags question: http://stackoverflow.com/q/25332674
tags question: http://stackoverflow.com/q/25287816
tags question: http://stackoverflow.com/q/25303797
tag name: google-maps-api-3
tags question: http://stackoverflow.com/q/25307679
type: Tag
tags question: http://stackoverflow.com/q/25388174
tags question: http://stackoverflow.com/q/25353873
tags question: http://stackoverflow.com/q/25232012
tags question: http://stackoverflow.com/q/25300146
tags question: http://stackoverflow.com/q/25388131
tags question: http://stackoverflow.com/q/25326116
tags question: http://stackoverflow.com/q/25362010
tags question: http://stackoverflow.com/q/25233378
tags question: http://stackoverflow.com/q/25324180
tags question: http://stackoverflow.com/q/25245914
tags question: http://stackoverflow.com/q/25297374

http://stackoverflow.com/comment/69777651
score: 2
has text: @DavidDiez If you care about this, you can use `var arr = [...str]` instead of `split`.
comment on: http://stackoverflow.com/a/25345121
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25314797
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25314740
downvote count: 0
answers question: http://stackoverflow.com/q/25314740
type: Answer
has comment: http://stackoverflow.com/comment/39459914
has body: You are comparing the number with boolean expressions. The switch would be equivalent with: if (number == (number % 3 == 0)) { console.log('Fizz'); } else if (number == (number % 5 == 0)) { console.log('Buzz'); } else if (number == (number % 5 == 0 &amp;&amp; number % 3 == 0)) { console.log('FizzBuzz'); } else { console.log(number); } Use if statements instead of a switch, and check the double condition first: if (number % 5 == 0 &amp;&amp; number % 3 == 0) { console.log('FizzBuzz'); } else if (number % 3 == 0) { console.log('Fizz'); } else if (number % 5 == 0) { console.log('Buzz'); } else { console.log(number); }
has comment: http://stackoverflow.com/comment/39459392
score: 4
upvote count: 4

http://stackoverflow.com/a/25362759
has comment: http://stackoverflow.com/comment/39546621
has body: I think the answer would be to say that there is no single regex(or rather a bad idea to approach with as it would be very tricky and difficult) that would match all the formats which are listed in the RFC 2822 or ISO 8601. Also it would not be a safe and good approach having a regex for all the formats. However, if you have any specific format then yes we can go for a regex. You may check date.js and moment.js EDIT: The same MDN says: Parameters dateString A string representing an RFC822 or ISO 8601 date. Description The parse method takes a date string (such as "Dec 25, 1995") and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC. The local time zone is used to interpret arguments that do not contain time zone information. This function is useful for setting date values based on string values, for example in conjunction with the setTime method and the Date object. Given a string representing a time, parse returns the time value. It accepts the RFC822 / IETF date syntax (RFC 1123 Section 5.2.14 and elsewhere), e.g. "Mon, 25 Dec 1995 13:30:00 GMT". It understands the continental US time-zone abbreviations, but for general use, use a time-zone offset, for example, "Mon, 25 Dec 1995 13:30:00 GMT+0430" (4 hours, 30 minutes east of the Greenwich meridian). If you do not specify a time zone, the local time zone is assumed. GMT and UTC are considered equivalent. Alternatively, the date/time string may be in ISO 8601 format. Starting with JavaScript 1.8.5 / Firefox 4, a subset of ISO 8601 is supported. For example, "2011-10-10" (just date) or "2011-10-10T14:48:00 (date and time) can be passed and parsed. Timezones in ISO dates are not yet supported, so e.g. "2011-10-10T14:48:00+0200" (with timezone) does not give the intended result yet. From here This format includes date-only forms: YYYY YYYY-MM YYYY-MM-DD ... All numbers must be base 10. If the MM or DD fields are absent “01” is used as the value. If the mm or ss fields are absent “00” is used as th…
downvote count: 0
score: 7
type: Answer
answers question: http://stackoverflow.com/q/25362713
upvote count: 7

http://stackoverflow.com/comment/39527484
type: Comment
score: 1
has text: This will create a interval each 100 seconds.. Good luck crashing user's IE.
comment on: http://stackoverflow.com/a/25352363
type: AnswerComment

http://stackoverflow.com/q/25322905
accepted answer: http://stackoverflow.com/a/25323449
tagged with: socket.io
type: Question
tagged with: javascript
score: 4
tagged with: express
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/70535512
has body: I'm experimenting on an app that is running with nodejs, express and socket.io Server Side: var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')(http); io.on('connection', function(socket){ socket.on('send_stuff', function(stuff){ io.emit('log_stuff',newStuff); }); }); http.listen(54123, function(){ console.log('listening on *:54123'); }); Client Side: var socket = io.connect('http://example.com:12345'); socket.emit('send_stuff',stuff); My question is How do I get the details of the client (ip,user-agent,etc.) that executed socket.emit('send_stuff',stuff)? I want to pass it to the newStuff variable. socket.on('send_stuff', function(stuff){}); in this line stuff only returns the value that was send by client emit(). Any ideas how to do this?
downvote count: 0
has answer: http://stackoverflow.com/a/25323449
favorite count: 0
possible better answer: http://stackoverflow.com/a/70535512
tagged with: sockets
has title: How to get details of the user that sent data (.emit()) to nodejs server?
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/a/25334232
upvote count: 5
has comment: http://stackoverflow.com/comment/39496132
score: 5
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25334211
has comment: http://stackoverflow.com/comment/39496099
answers question: http://stackoverflow.com/q/25334211
has body: Remove the single quotes from here: var out = '{ "hour":'+date.getHours()+', "minute":'+date.getMinutes()+', "second":'+date.getSeconds()+', }'; Change the above to: var out = { "hour": date.getHours(), "minute": date.getMinutes(), "second": date.getSeconds(), }; Or if I may be mistaken for the string to contain a JSON object, you need to do declare the out that way and stringify using: out = JSON.stringify(out);
has comment: http://stackoverflow.com/comment/39496239

http://stackoverflow.com/comment/39569879
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25374280
has text: @Derek朕會功夫 Not working though

http://stackoverflow.com/q/25317912
tagged with: google-chrome
type: Question
tagged with: javascript
has title: how to customize the PDF viewer toolbar in Chrome
score: 0
tagged with: http://stackoverflow.com/tag/pdf
answer count: 1
tagged with: toolbar
type: UnansweredQuestion
tagged with: pdf-viewer
has answer: http://stackoverflow.com/a/25318013
has body: Does anyone know where I can find information on customizing the toolbar of Chrome's built-in PDF viewer? I have seen various posts concerning openParameters as defined by Adobe, but Chrome only seems to support the #page parameter. I can't seem to find any Google API documentation on controlling the viewer from JavaScript, or via parameters.

iphone
tags question: http://stackoverflow.com/q/25362872
tags question: http://stackoverflow.com/q/25345041
tags question: http://stackoverflow.com/q/25325724
tag name: iphone
tags question: http://stackoverflow.com/q/25386508
tags question: http://stackoverflow.com/q/25241932
type: Tag

http://stackoverflow.com/a/25314017
answers question: http://stackoverflow.com/q/25313922
score: 5
type: AcceptedAnswer
upvote count: 5
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25313922
has comment: http://stackoverflow.com/comment/39458668
has body: Try it again after removing ending \b online demo OR use (\b|$) to match either word boundary or end of the line Corrected online demo Your regex will not work correctly if cat=203604 is some where in between pricerange query parameters. for example: http://www.test.com/directory/?pricerange=-10&amp;cat=203604&amp;pricerange=10-20&amp;pricerange=20-30&amp;pricerange=30-40&amp;pricerange=40- Output: (Query parameter should be started by ?) http://www.test.com/directory/&amp;cat=203604 You can correct it, using &amp;*\bpricerange\=[0-9]*-[0-9]*&amp;* Here is online demo
has comment: http://stackoverflow.com/comment/39458563
has comment: http://stackoverflow.com/comment/39457565
has comment: http://stackoverflow.com/comment/39457653
has comment: http://stackoverflow.com/comment/39461708
has comment: http://stackoverflow.com/comment/39459449
type: Answer
has comment: http://stackoverflow.com/comment/39458052
has comment: http://stackoverflow.com/comment/39463393

yui-datatable
type: Tag
tag name: yui-datatable
tags question: http://stackoverflow.com/q/25248135

http://stackoverflow.com/comment/39590966
type: QuestionComment
has text: You have to show the result html, not template
score: 0
comment on: http://stackoverflow.com/q/25386032
type: Comment

http://stackoverflow.com/comment/39369315
has text: This works great however it doesn't clear the checkboxes if something else is selected ^^ I think I can fix that myself though :3
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25266154
type: Comment

http://stackoverflow.com/comment/39382299
score: 0
type: QuestionComment
type: Comment
has text: @AleksiAsikainen in Bluebird promises promises can have a form of context with `Promise.bind` - that feature is unavailable in Q.
comment on: http://stackoverflow.com/q/25270917

http://stackoverflow.com/comment/39453842
has text: I rarely use Jade, but do you have `/frontend/views/index.html` file, isn't that what you're referencing ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25311937

http://stackoverflow.com/a/25344218
type: Answer
has comment: http://stackoverflow.com/comment/39515477
answers question: http://stackoverflow.com/q/25344192
score: 0
has body: Use a &lt;canvas&gt;, and draw only the elements which should actually be visible at a given time.
has comment: http://stackoverflow.com/comment/39515570

http://stackoverflow.com/q/25242671
has comment: http://stackoverflow.com/comment/39376471
linked to: http://stackoverflow.com/q/4862193
has answer: http://stackoverflow.com/a/25242694
downvote count: 0
score: 1
has title: How come cheerio $ variable doesn't affect to other sessions?
type: Question
tagged with: cheerio
has comment: http://stackoverflow.com/comment/39325000
tagged with: javascript
has body: I use cheerio module on node.js. And I've known that a variable declared in a function without 'var' keyword is global scope. Today I recognized when cheerio loads http body into $ variable, the variable doesn't use the keyward 'var'. I'm not having any problem with it. But suddenly I got confused. In my opinion the variable $ is global scope so all session connects to server must share the same variable. I think I have wrong concept with javascript. please let me fix this problem. var cheerio = require('cheerio'); request(url, function(err, resp, body){ if (err) throw err; $ = cheerio.load(body); });
upvote count: 1
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: node.js
linked to: http://stackoverflow.com/q/111102

http://stackoverflow.com/comment/39465989
score: 0
comment on: http://stackoverflow.com/q/25318198
type: Comment
type: QuestionComment
has text: Try this `myDict = dict(data.iterlists())` and see what happens (It seems like you have a QueryDict http://stackoverflow.com/questions/13349573/how-to-change-a-django-querydict-to-python-dict )

http://stackoverflow.com/comment/39438364
comment on: http://stackoverflow.com/q/25253834
score: 0
type: Comment
type: QuestionComment
has text: You can use [`stack.order()`](https://github.com/mbostock/d3/wiki/Stack-Layout#order), but this will affect the order for *all* bars. I don't think D3 allows you to sort each bar differently (unless you use separate stack layouts for each).

http://stackoverflow.com/q/25344885
has title: Use node.js plugin in Cordova
type: Question
downvote count: 0
tagged with: javascript
has body: I'm new to Cordova and am figuring out how to include a Node.JS Plugin, this one: https://github.com/mateodelnorte/forecast.io I've tried to include the JS file manually, but when running the code, of course I get the error that "require is not defined". After Googling I found out that I have to use Cordova package manager to install such plugins. however, there is no plugin for Forecast.io... So, how to use this nodejs-plugin? Do I need to create a Cordova plugin myself?
has comment: http://stackoverflow.com/comment/39533276
tagged with: http://stackoverflow.com/tag/html
tagged with: node.js
favorite count: 0
score: 2
tagged with: cordova
answer count: 0
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/q/25359600
has comment: http://stackoverflow.com/comment/39567384
downvote count: 2
accepted answer: http://stackoverflow.com/a/25359759
linked to: http://stackoverflow.com/q/13883553
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39540855
has title: What purpose does a tag serve inside of a tag?
type: Question
has comment: http://stackoverflow.com/comment/39571669
tagged with: javascript
upvote count: 143
has answer: http://stackoverflow.com/a/25359759
score: 141
tagged with: noscript
has comment: http://stackoverflow.com/comment/39557562
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I've been on a "view source" spree lately on websites with interesting design and content. One of those websites, Squarespace, has blocks of ... ... It struck me as odd, and got me googling for info to see if there's some kind of hidden functionality/purpose for such an odd bit of HTML, but to no avail. Is there some kind of purpose to having tags inside of elements, or is this just an example of bad HTML?
has comment: http://stackoverflow.com/comment/39571708
favorite count: 0
has comment: http://stackoverflow.com/comment/39540757
has comment: http://stackoverflow.com/comment/39540733

http://stackoverflow.com/comment/39528025
type: AnswerComment
comment on: http://stackoverflow.com/a/25334547
type: Comment
has text: Ok thanks for the code, I will try to adapt mine similarly, and figure out what the problem was. Thanks again for all the help!
score: 0

http://stackoverflow.com/q/25262245
has answer: http://stackoverflow.com/a/25265545
score: 0
answer count: 2
upvote count: 1
downvote count: 1
has title: Certain values resulting in infinite loop
tagged with: javascript
type: UnansweredQuestion
has body: I'm trying to build a Javascript calculator for energy calculations, and it mostly works but certain numbers cause the browser tab to crash. My jsfiddle: http://jsfiddle.net/qdjfrjLr/ Try entering an 8 for any day's discharge time or a 15 for any time at all. I suspect the problem relates to my loop (under the 'do the loop' comment) but I can't see the problem. The purpose of the loop is to determine what value liq_capacity needs to be in order to get fri_ending_balance to (or near) 0. function calculate() { // user inputs var sat_charge = parseInt(document.getElementById('sat_charge').value); var sat_discharge = parseInt(document.getElementById('sat_discharge').value); var sun_charge = parseInt(document.getElementById('sun_charge').value); var sun_discharge = parseInt(document.getElementById('sun_discharge').value); var mon_charge = parseInt(document.getElementById('mon_charge').value); var mon_discharge = parseInt(document.getElementById('mon_discharge').value); var tue_charge = parseInt(document.getElementById('tue_charge').value); var tue_discharge = parseInt(document.getElementById('tue_discharge').value); var wed_charge = parseInt(document.getElementById('wed_charge').value); var wed_discharge = parseInt(document.getElementById('wed_discharge').value); var thu_charge = parseInt(document.getElementById('thu_charge').value); var thu_discharge = parseInt(document.getElementById('thu_discharge').value); var fri_charge = parseInt(document.getElementById('fri_charge').value); var fri_discharge = parseInt(document.getElementById('fri_discharge').value); // back-end variables var sys_power_rating = 100; var noak = 1; var efficiency = 60; // expressed as a percentage var tank_escalation_factor = 0.9; var liq_reference_cost = 16300000; var experience_coefficient = 0.175; // expressed as a decimal var liq_reference_size = 300; var liq_and_pru_escalation_factor = 0.6; var power_recovery_reference_cost = 5705000; var power_recovery_reference_size = 3.5; var tank_coldstore_…
has comment: http://stackoverflow.com/comment/39361438
favorite count: 0
has answer: http://stackoverflow.com/a/25262481
type: Question

http://stackoverflow.com/q/25350761
has body: I'm trying render a simple map using Polymaps, but CORS issue is getting in the middle: Server Side For the server, I am using TileStache with the following configuration file: { "cache": { "name": "Test", "path": "/home/jose/data/maps", "umask": "0000" }, "layers": { "local": { "provider": {"name": "mbtiles", "tileset": "mundo.mbtiles" } }, "arpt": { "allowed origin": "*", "provider": { "name": "vector", "driver": "GeoJSON", "parameters": {"file": "/home/user/data/data.geojson"}, "properties": ["ICAO"] } } } } I am executing such server by means of: $ tilestache-server.py -c config.cfg -i localhost -p 8080 This server seems to work properly given that I am able to actually see the map tiles and I'm able to get geojson tiles. Client Side Here is where I am having the issue. Firefox complains about: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://127.0.0.1:8080/arpt/5/15/12.geojson. This can be fixed by moving the resource to the same domain or enabling CORS. (repeated for every GeoJSON tile requested) The JavaScript code that I am running is: Comienzo Fin <!--div id="map"> <!-- script type="text/javascript" src="ex01.js"> I'm just a newbie learning JavaScript and playing with these technologies. I don't really understand the CORS issue given that I'm running all localhost within a virtual machine. Any clue about what I did wrong will be appreciated. Kind regards, José M.
downvote count: 0
tagged with: javascript
tagged with: same-origin-policy
has comment: http://stackoverflow.com/comment/39530748
tagged with: tilestache
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/39524799
answer count: 0
score: 1
tagged with: geojson
has title: Unable to render GeoJSON tile with Polymaps due to CORS
type: Question
tagged with: cors

http://stackoverflow.com/comment/39594609
score: 2
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25387909
has text: There is no way to do that, the malicious user controls the whole environment. Even if you manage that they can just modify the code.

http://stackoverflow.com/q/25260764
has comment: http://stackoverflow.com/comment/39358835
has title: check element of one array in another array
has body: I have 3 arrays, I want to check if any element of subarray in mainArray is exist - then it should return true. I have tried this, but it is returning true only if mainArray containing all the item of sub array. MY js: var sub1 = ["0", "10"]; var sub2 = ["18", "3", "13", "4"]; var mainArr = ["0", "1", "5", "8", "9", "10"]; if (containsChk(sub1, mainArr)) { alert('yes'); } else { alert('no'); } function containsChk(sub, main) { for (var i = 0, len = sub.length; i &lt; len; i++) { if ($.inArray(sub[i], main) == -1) return false; } return true; } Jsfiddle
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25260895
tagged with: arrays
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25261084
accepted answer: http://stackoverflow.com/a/25260895
has answer: http://stackoverflow.com/a/25261084
score: 0
answer count: 2

http://stackoverflow.com/comment/39544453
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25359882
has text: Thank you for the response. Yes, with wss the same situation. The interesting thing, that websockets connection working for me with the latest version of the Iceweasel browser (Firefox), but it does not work with Google Chrome or Chromium
score: 1

http://stackoverflow.com/q/25278597
tagged with: hapi.js
tagged with: javascript
tagged with: subdomain
has body: I am looking for a way to route different subdomains to different plugins. I looked through the API docs, and didn't find anything helpful.
answer count: 1
downvote count: 0
has title: Hapi.js Subdomain Routing to Plugins
favorite count: 0
has answer: http://stackoverflow.com/a/25322969
tagged with: url-routing
tagged with: node.js
type: AnsweredQuestion
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39405907
accepted answer: http://stackoverflow.com/a/25322969
type: Question

http://stackoverflow.com/q/25278768
type: UnansweredQuestion
has title: jquery convert number into string in a form
type: Question
has comment: http://stackoverflow.com/comment/39391745
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39391916
answer count: 1
has answer: http://stackoverflow.com/a/25278978
has body: there is a form for printing cheques. I need when I enter amount in numeric format in a input field there should be auto fill that particular number in string format in a another field.here is the form,it's very simple form name: Date: Amount: Amount in Letters:

http://stackoverflow.com/comment/39492317
type: QuestionComment
comment on: http://stackoverflow.com/q/25332203
has text: First step would be to make sure your RegExp works. I think `{}` is for repeat count so that would work for number of digits, but not for more limiting. I think your best bet would be to check it in code.
score: 0
type: Comment

http://stackoverflow.com/a/25381118
answers question: http://stackoverflow.com/q/25381096
score: 5
upvote count: 5
downvote count: 0
type: Answer
has body: You are using this in document-ready handler, where it referees to document. You should bind change event with select and trigger it on page load. Use $(document).ready(function() { //Bind change event $('.selector').change(function() { if ($(this).val() == "volvo") { $(this).next('.show').show(); } }).change(); //Trigger on page load });

http://stackoverflow.com/comment/39542888
comment on: http://stackoverflow.com/a/25360742
type: AnswerComment
has text: it is same as used for example, you can find your object at 0 index of array...further multi-dimesional array can be find with key data. Note:label has no use, your data is always at 0 index object, as map function return single object
score: 0
type: Comment

internet-explorer
tags question: http://stackoverflow.com/q/25288443
tags question: http://stackoverflow.com/q/25259783
tags question: http://stackoverflow.com/q/25367722
tags question: http://stackoverflow.com/q/25293609
tags question: http://stackoverflow.com/q/25309610
tags question: http://stackoverflow.com/q/25319066
tags question: http://stackoverflow.com/q/25379226
tags question: http://stackoverflow.com/q/25268626
tags question: http://stackoverflow.com/q/25312751
tags question: http://stackoverflow.com/q/25325380
tag name: internet-explorer
tags question: http://stackoverflow.com/q/25247555
tags question: http://stackoverflow.com/q/25303448
tags question: http://stackoverflow.com/q/25295426
tags question: http://stackoverflow.com/q/25282262
tags question: http://stackoverflow.com/q/25380093
tags question: http://stackoverflow.com/q/25303629
tags question: http://stackoverflow.com/q/25374042
tags question: http://stackoverflow.com/q/25285501
tags question: http://stackoverflow.com/q/25295762
tags question: http://stackoverflow.com/q/25263076
tags question: http://stackoverflow.com/q/25355022
tags question: http://stackoverflow.com/q/25255204
tags question: http://stackoverflow.com/q/25303750
tags question: http://stackoverflow.com/q/25294363
tags question: http://stackoverflow.com/q/25308647
tags question: http://stackoverflow.com/q/25376595
tags question: http://stackoverflow.com/q/25318638
tags question: http://stackoverflow.com/q/25314152
tags question: http://stackoverflow.com/q/25312290
tags question: http://stackoverflow.com/q/25246790
tags question: http://stackoverflow.com/q/25266993
tags question: http://stackoverflow.com/q/25293064
tags question: http://stackoverflow.com/q/25252949
tags question: http://stackoverflow.com/q/25379746
tags question: http://stackoverflow.com/q/25319983
tags question: http://stackoverflow.com/q/25245470
tags question: http://stackoverflow.com/q/25356199
tags question: http://stackoverflow.com/q/25264608
type: Tag
tags question: http://stackoverflow.com/q/25317127
tags question: http://stackoverflow.com/q/25385525
tags question: http://stackoverflow.com/q/25383340
tags question: http://stackoverflow.com/q/25233667
tags question: http://stackoverflow.com/q/25247499

http://stackoverflow.com/comment/39880102
comment on: http://stackoverflow.com/a/25377837
type: Comment
has text: Is the comment for me?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39807627
has text: Yes, that is why I don't always agree with that principle ;-). But this seems to be the best option to me, since there is no multiple inheritance and changing the parent-prototype of Array would apply globally (change all Arrays).
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25381200

http://stackoverflow.com/comment/39354691
type: QuestionComment
has text: i developed the website and it has javascript keypress events.while i press the keys in the textbox having the keypress event in windows phone 8 ie browser, keypress event is not triggered and i cant able to get the event.keycode in keypress event.
comment on: http://stackoverflow.com/q/25243285
score: 0
type: Comment

http://stackoverflow.com/a/25387964
score: 2
upvote count: 2
has body: For both functions you're having a problem with, you're trying to use this inside of a jQuery function, so this's scope is to the DOM element, not the Site class. triggerDialog: function(){ var site = this; $j("[title='Create New Customer']").click(function(){ $j('#findPrimaLink').show(); site.openDialog(); console.log(this); //remove this for production, but you can see that `this` points to a DOM element }) }, openLink: function(){ var site = this; $j('#findPrimaLink').click(function(){ site.openDialog(); }); }, To understand why this happens, you should read about javascript Closures. Here and here. P.S. you have an extra comma after your openDialog function. P.P.S. It's also worth noting that this is exactly what're you're doing inside the start method. var me = this; $j(window).load(function() { me.windowLoaded = true; });
answers question: http://stackoverflow.com/q/25387891
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25387891
type: Answer

http://stackoverflow.com/comment/39470348
comment on: http://stackoverflow.com/q/25320373
has text: @Mathletics, nothing's wrong with lib.notGlobalFn(), I was wondering if there was a way I could invoke the function without having to qualify it with the "lib." part (i.e. be as brief as possible). For example, Solution #2 is able to achieve this - http://jsbin.com/denawa/7/edit?javascript,console .
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25299861
accepted answer: http://stackoverflow.com/a/25299933
tagged with: prototype
type: Question
has title: Calling this.function inside of jquery context
has answer: http://stackoverflow.com/a/25299881
answer count: 3
upvote count: 1
tagged with: this
has body: I am trying to call a function via this reference inside of jquery scope: var Person = function(){ this.hello = function(){ console.log("hello!"); } this.jump = function(){ $('.jump').on('click', function(){ this.hello(); }); } } Then I do: var p = new Person(); When I click over the .jump element, the console prints an error describing that hello is not a function. I am not sure what is happening here, I am assumming that this is trying to call a function inside of jquery (not sure about it). So, googling a little bit I found the Jquery.proxy() function that could be helpfull in my situation, but every time I try to understand it my head want to explote.
tagged with: jquery
favorite count: 0
duplicate of: http://stackoverflow.com/q/20279484
possible better answer: http://stackoverflow.com/a/25299881
has answer: http://stackoverflow.com/a/25299979
downvote count: 0
score: 1
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/20279484
tagged with: javascript
has answer: http://stackoverflow.com/a/25299933

http://stackoverflow.com/comment/39330390
score: 1
has text: JSFiddle has always been 100% reliable for me. It's just that a lot of people don't use it properly and aren't caring enough to learn how to use a powerful tool.
type: AnswerComment
comment on: http://stackoverflow.com/a/25245556
type: Comment

http://stackoverflow.com/a/25307182
type: Answer
score: 0
has body: The easiest KISS solution would be to keep the code responsible for adding tasks (and validating the form) in same file as the form. This will also make it easy for you to keep all the form elements filled with submitted data if the task couldn't be added. You can check if form was submited by naming the submit button (adding name attribute) and then checking, if it's set in $_POST array.
answers question: http://stackoverflow.com/q/25306998

http://stackoverflow.com/comment/39514436
comment on: http://stackoverflow.com/q/25344603
has text: I spot #20 of the [Falsehoods Programmers Believe About Names](http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/) here.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39313022
comment on: http://stackoverflow.com/q/25236095
score: 3
has text: `preventDefault()` is user defined function where it using `e.preventDefault()`
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25340987
has comment: http://stackoverflow.com/comment/39509039
has comment: http://stackoverflow.com/comment/39508820
downvote count: 0
has comment: http://stackoverflow.com/comment/39508962
has body: Try this: SuperObject.prototype.definition = function(dim){ this.width(200).height(200) .dimension(SourceData.dimension(function (d) {return d[dim];})) .group(SourceData.dimension(function (d) {return d[dim];}).group().reduceSum(function (d) {return d.Amount;})) }; Also you should define the following functions as well: SuperObject.prototype.width() SuperObject.prototype.height() SuperObject.prototype.dimenstion() SuperObject.prototype.group() Or put them in the SuperObject prototype chain. Note that SuperObject is the constructor of Object1, Object2,... UPDATE #1 Usage: var obj = new SuperObject(); obj.definition("Dimension1");
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39508280
upvote count: 2
has comment: http://stackoverflow.com/comment/39508374
has comment: http://stackoverflow.com/comment/39509286
has comment: http://stackoverflow.com/comment/39508783
answers question: http://stackoverflow.com/q/25340916
has comment: http://stackoverflow.com/comment/39508727

http://stackoverflow.com/q/25383108
has title: Why Sock.js use double json encoding?
score: 2
has body: var sock = new SockJS(url, {'protocols_whitelist': ['xhr-polling']}); sock.onopen = function() { var msg = {msg: "hello"}; sock.send(msg); // 1. example sock.send(JSON.stringify(msg)); // 2.example }; 1. example google chrome payload ["[object Object]"] 2. example google chrome payload ["{\"msg\":\"hello\"}"] I found that the explicit conversion to string happened in sock.js here (line 253): https://github.com/sockjs/sockjs-client/blob/master/lib/sockjs.js#L253 that is why i see ["[object Object]"] when js object is sended directly(because '' + data converts data to string). that._transport.doSend(utils.quote('' + data)); SockJS.prototype.send = function(data) { var that = this; if (that.readyState === SockJS.CONNECTING) throw new Error('INVALID_STATE_ERR'); if (that.readyState === SockJS.OPEN) { that._transport.doSend(utils.quote('' + data)); // here } return true; }; But that utils.quote does https://github.com/sockjs/sockjs-client/blob/master/lib/utils.js#L292 // Quote string, also taking care of unicode characters that browsers // often break. Especially, take care of unicode surrogates: // http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates utils.quote = function(string) { var quoted = quoteJSON(string); // In most cases this should be very fast and good enough. extra_escapable.lastIndex = 0; if(!extra_escapable.test(quoted)) { return quoted; } if(!extra_lookup) extra_lookup = unroll_lookup(extra_escapable); return quoted.replace(extra_escapable, function(a) { return extra_lookup[a]; }); }; and finally: https://github.com/sockjs/sockjs-client/blob/master/lib/utils.js#L261 var quoteJSON = (JSON3 &amp;&amp; JSON3.stringify) || function(string) { json_escapable.lastIndex = 0; if (json_escapable.test(string)) { string = string.replace(json_escapable, function(a) { return json_lookup[a]; }); } return '"' + string + '"'; }; As you can see that when you want to send JSON, you need to explicit call JSON.stringify by your self and the same is happened …
tagged with: http://stackoverflow.com/tag/json
tagged with: sockjs
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25606362
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/comment/39342056
type: QuestionComment
has text: @CroaToa I believe that dandavis was implying that changing the user's scrolling behavior is not the best for your UX.
score: 0
comment on: http://stackoverflow.com/q/25251163
type: Comment

http://stackoverflow.com/q/25312747
tagged with: jquery
has comment: http://stackoverflow.com/comment/39455400
has comment: http://stackoverflow.com/comment/39455714
has answer: http://stackoverflow.com/a/25312842
has comment: http://stackoverflow.com/comment/39455278
has comment: http://stackoverflow.com/comment/39455340
has title: jQuery if condition doesn't return expected result
has comment: http://stackoverflow.com/comment/39455230
accepted answer: http://stackoverflow.com/a/25312842
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39455304
has comment: http://stackoverflow.com/comment/39455292
has comment: http://stackoverflow.com/comment/39455263
has comment: http://stackoverflow.com/comment/39455720
has comment: http://stackoverflow.com/comment/39455819
type: AnsweredQuestion
score: -5
has comment: http://stackoverflow.com/comment/39455164
has comment: http://stackoverflow.com/comment/39455197
has comment: http://stackoverflow.com/comment/39455181
has comment: http://stackoverflow.com/comment/39455833
has body: I am confused why the if condition not producing the result Return result of fxresult value = " Call for price " this is not code and just for reference of variable result. var fxresult = $(".price").html(); var fxRate = fxresult.replace(/ /g,""); if (fxRate == 'Callforprice'){ alert("found") }
type: Question
has comment: http://stackoverflow.com/comment/39455157
upvote count: 0
downvote count: 5
tagged with: javascript

http://stackoverflow.com/a/25290706
upvote count: 1
answers question: http://stackoverflow.com/q/25282034
type: Answer
downvote count: 0
score: 1
has body: Try this technique: $.post('log.php', {hello:'world'}, function() { sleepy.abort(); }); var sleepy = $.ajax({ url: '/sleep.php', async: false, });

http://stackoverflow.com/q/25374034
type: Question
has comment: http://stackoverflow.com/comment/39568572
tagged with: asp-classic
has comment: http://stackoverflow.com/comment/39568596
tagged with: javascript
has answer: http://stackoverflow.com/a/25374112
score: 0
answer count: 2
has title: How to get a asp variable into a html input variable
has body: I'm trying to get a asp variable in a JavaScript function, I'm trying to pass the variable through this &lt;input type="hidden" id="abc" value="&lt;% variable %&gt;"&gt; and then I get the value through document.getElementById('abc').value; but gives me error, is there a better way or how can I put the asp variable as the input value?
tagged with: variables
accepted answer: http://stackoverflow.com/a/25374112
tagged with: http://stackoverflow.com/tag/html
tagged with: input
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/45777467
has answer: http://stackoverflow.com/a/45777467

http://stackoverflow.com/comment/39444893
type: QuestionComment
has text: @mulla.azzi no, that does not work if it fires a POST. After the post the page is reloaded and the information of the second form will be lost. You need to safe the information from the second form before sending one
score: 0
comment on: http://stackoverflow.com/q/25307172
type: Comment

http://stackoverflow.com/q/25315140
has answer: http://stackoverflow.com/a/25315214
has title: Javascript missing semicolon?
favorite count: 0
has comment: http://stackoverflow.com/comment/39459736
has comment: http://stackoverflow.com/comment/39459667
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25315194
accepted answer: http://stackoverflow.com/a/25315194
possible better answer: http://stackoverflow.com/a/25315214
type: Question
has comment: http://stackoverflow.com/comment/39459728
tagged with: javascript
has body: So I am using jsfiddle.net to test my javascript code. I am working with google maps API but that doesn't really matter with respect to my question. Once I added this function: function testCoord(points) { var result = false; for (var i = 0, var j = points.length - 1; i &lt; points.length; j = i++) { if ((points[i].latLng.lat() &gt; testCoord[0].latLng.lat()) != (points[j].latLng.lat() &gt; testCoord[0].latLng.lat()) &amp;&amp; (testCoord[0].latLng.lng() &lt; (points[j].latLng.lng() - points[i].latLng.lng()) * (testCoord[0].latLng.lat() - points[i].latLng.lat()) / (points[j].latLng.lat() - points[i].latLng.lat()) + points[i].latLng.lng())) { result = true; break; } } return result; } When I use the JSHint tool it tells me I'm missing a semicolon on the for loop line and when I call break it says its unexpected. I really don't think I am missing any semicolons, but something is wrong because not the map doesn't display, even though I never call the function. Am I not allowed to declare the for loop with both i and j? I am lost after struggling with this for hours...
upvote count: 2
has comment: http://stackoverflow.com/comment/39459737
score: 0
downvote count: 2
answer count: 2

http://stackoverflow.com/comment/52257436
has text: Well I'll be, that's inconvenient. In any case my example was probably a poor one, since you must explicitly size an `svg` element anyway. AFAIK for anything you'd be looking for the dynamic size of you can probably rely on `offsetWidth`.
type: Comment
comment on: http://stackoverflow.com/a/25410176
score: 1
type: AnswerComment

http://stackoverflow.com/comment/39549629
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25363988
has text: Which one? on creating a directive?

http://stackoverflow.com/a/25335358
has body: In javascript, you cannot loop waiting for a condition to change unless the code that actually changes the condition is inside that very loop or a side effect of some function called in the loop. That's because javascript is single threaded (except for webworkers which aren't being considered here) so as long as a loop is looping in javascript, no other code can run so no other code can ever change your condition variable. You will simply have an infinite loop as the loop waits for something that can never change. Eventually the browser will complain that you have unresponsive code running and shut it down. Because of that, there aren't indeterminate or long wait loops in javascript. It is possible to loop for a second or so just to let some time pass, but that's rarely useful, productive or the best way to write JS code. Instead, you have to either trigger an event or callback when the condition changes and the interested code can subscribe to that event or register its callback. Or, you have to poll on a timer to see what the condition has changed (the first option is the preferred choice). If you were designing an API where you wanted to be able to allow some calling code to know when a state changes, usually you would implement either a callback or a promise. The callback approach could look like this: device.registerStateChangeCallback("type of state interested in", fn); Then, the API will call the passed in callback function whenever the specified state changes to a new value. It's up to the API whether this is a one-time notification or whether it happens every time the state changes until the callback is deregistered. So, rather than having the caller wait in a busy loop until the state changes, the caller writes async code (this is how javascript works for this kind of stuff) with a callback that will be called sometime later when the state changes. For example, a caller's code might look like this: device.registerStateChangeCallback("syncState", function(n…
upvote count: 4
downvote count: 0
score: 4
type: Answer
answers question: http://stackoverflow.com/q/25335203

http://stackoverflow.com/q/25334931
favorite count: 0
has comment: http://stackoverflow.com/comment/39497842
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/53612091
tagged with: geojson
has title: loading a local GeoJSON file and using it with the Google Maps Javascript API v3 data layer
type: Question
has answer: http://stackoverflow.com/a/41924624
score: 7
has body: I have created a JSON FeatureCollection that works in the DataLayer: Drag and Drop tutorial. It is just a collection of 2 roads so far, but I cannot figure out how to get the JSON file to load. It is a local file for now, so I thought calling it up and styling it ala tutorial would put me on the right path. But it isn't working. Here are the HTML and the JSON files. FMRE Main Map GeoJSON File { "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [ [ -95.499287099037943, 29.633775903201652 ], [ -95.510219429084501, 29.6295756444228 ], [ -95.518154168081537, 29.62651674184098 ], [ -95.528712867431707, 29.622445431000013 ], [ -95.53826064293483, 29.618771022138741 ], [ -95.541035517360555, 29.617702728232437 ], [ -95.544447072307435, 29.616381372726607 ], [ -95.544625899177007, 29.616307579994842 ], [ -95.545790211351189, 29.61607301050708 ], [ -95.547077549792974, 29.615738432024486 ], [ -95.547631713233685, 29.615622392826097 ], [ -95.547932671532564, 29.614939407889889 ], [ -95.548190053370064, 29.615522451738965 ], [ -95.548392624456909, 29.614769174869338 ], [ -95.548751780273136, 29.615438758779774 ], [ -95.548862903461526, 29.614619498527343 ], [ -95.549316099095989, 29.615371466668105 ], [ -95.549340348276871, 29.614490639557527 ], [ -95.5498249417235, 29.614383114417095 ], [ -95.549883013326678, 29.615320575455101 ], [ -95.550315113633715, 29.614296882540973 ], [ -95.550453893576616, 29.615268752955089 ], [ -95.55080927908358, 29.614232245311893 ], [ -95.55102561034731, 29.615238786782307 ], [ -95.551307430876705, 29.614189377168234 ], [ -95.551598948336235, 29.615230699957547 ], [ -95.551806412103673, 29.614168537600264 ], [ -95.552172327563156, 29.615244792636013 ], [ -95.552307012242224, 29.614169749750467 ], [ -95.552763416973363, 29.615270518318706 ], [ -95.553058820618347, 29.614214575493488 ], [ -95.553353931280569, 29.615313248914024 ], [ -95.553809129103215, 29.614280510927649 ], [ -95.553…
tagged with: javascript
has comment: http://stackoverflow.com/comment/39497391
answer count: 2
tagged with: google-maps
upvote count: 7
has answer: http://stackoverflow.com/a/25335135
tagged with: styling

http://stackoverflow.com/a/25313080
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25312751
downvote count: 0
has body: By definition Date.toLocaleTimeString() produces output according to user's preferences/defaults. So the result (position of : ) can vary on different platforms, locales and even time of the day. This is how Korean time looks like for example: "오후 12:00:00" Apparently in your case Chrome and IE have different opinion on default locale formatting. If you have any code that relies on position of : in toLocaleTimeString() it must be refactored to something more reliable. In some locales/settings toLocaleTimeString() may not contain : at all.

http://stackoverflow.com/q/25253086
tagged with: javascript
has comment: http://stackoverflow.com/comment/39348604
score: 0
answer count: 2
has body: My company recently purchased an Enterprise Licence for the HERE Platform. In the application I'm working on, I need to solve the Travelling Salesman Problem, which means that given a starting point, a destination point and several "waypoints" between them, it has to calculate me the most optimal route to go from A-n-B. For example, if I have these three addresses in the following order 1. London 2. Moscow 3. Paris Without optimizing it I would get a route that goes from London to Moscow, and from there back to Paris. The optimal route for these addresses would be 1. London 2. Paris 3. Moscow A real world example would be - Start: Budapest - End: Paris - Waypoint 1: Berlin - Waypoint 2: Vienna - Waypoint 3: Stockholm - Waypoint 4: Madrid - Waypoint 5: Rome - Waypoint 6: Bucharest - Waypoint 7: Frankfurt - Waypoint 8: Munchen - Waypoint 9: Caen - Waypoint 10: Barcelona So the application takes in the addresses and outputs the shortest A.K.A the "optimal" route to go from Budapest to Paris. I've spoken with HERE's support, and they told me that I need to use the Matrix Routing API for this (developers guide PDF here), however I don't really understand how can it solve my problem. In the documentation as far as I can see you can define multiple starting points and multiple destinations, so it would compute the distances between these, but I don't see any way to have one fixed starting position and another fixed destination with multiple waypoints in between them. Is what we need possible with the Matrix Routing API? If yes, could someone show me some pseudo code how to use it?
has comment: http://stackoverflow.com/comment/39426496
type: UnansweredQuestion
tagged with: maps
has answer: http://stackoverflow.com/a/25355647
has answer: http://stackoverflow.com/a/25256677
has comment: http://stackoverflow.com/comment/39389241
tagged with: here-api
has comment: http://stackoverflow.com/comment/39355472
has title: Travelling Salesman: Using Matrix Routing API (HERE Maps)
has comment: http://stackoverflow.com/comment/39389254
type: Question
tagged with: algorithm

http://stackoverflow.com/comment/39488377
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25330193
has text: @RohanBüchner: thanks but it did not work.

http://stackoverflow.com/comment/39546607
type: AnswerComment
has text: I came to a similar conclusion and created a bootstrapper. Just feels like a lot of unnecessary config variables are being created inflating the size of my config file.
type: Comment
comment on: http://stackoverflow.com/a/25362087
score: 0

http://stackoverflow.com/comment/39475854
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25323036
has text: @ValentinWaeselynck any idea..?

http://stackoverflow.com/a/61750339
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25236922
has body: To avoid render blocking you need to arrange your CSS and Javascript efficiently. Adding async to js and moving it to bottom mostly does the job. But in a dynamic CMS like Joomla and Wordpress it is not easy. Extensions add css and js sometimes in non-standard ways. If you are looking for a plugin to do it out of the box, I suggest trying Speed plugin from Codingmall.com. It is not free but you can get a free trial. Speed up Joomla

http://stackoverflow.com/a/25327630
score: 1
type: AcceptedAnswer
downvote count: 0
has body: The resize function needed to be changed. The error was calling refresh on the grid, rather than resize. The corrected function looks like: function resizeGrid() { var gridElement = $("#boxesgrid"); var newGridHeight = $(window).height() &gt; 800 ? 800 : $(document).height() * .75; gridElement.height(newGridHeight); gridElement.data("kendoGrid").resize(); } Setting the data area separately was incorrect, as well.
accepted answer of: http://stackoverflow.com/q/25295426
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25295426

http://stackoverflow.com/comment/39449888
type: Comment
type: QuestionComment
has text: use javascript for validation
score: 1
comment on: http://stackoverflow.com/q/25309998

http://stackoverflow.com/a/25375981
type: Answer
answers question: http://stackoverflow.com/q/25375699
has body: Another solution is remove var countryList = from your json file. use json like a service anyone can use easily. by writing var countryList this json will limited to javascript only. Preferred solution is: read file using $get like var items = []; $.get("https://dl.dropboxusercontent.com/u/100011869/country.js", function(data) { var gList = eval("(" + contryList + ")"); for (var i = 0; i &lt; gList.length; i++) { items.push("&lt;li id='" + gList[i].countryCode + "'&gt;" + gList[i].countrName + "&lt;/li&gt;"); } alert(items.join("")); });
score: 0

http://stackoverflow.com/comment/39369385
type: AnswerComment
comment on: http://stackoverflow.com/a/25266213
has text: Could you elaborate on what you mean by 'return'? It's an async operation, so it won't return anything to outer code. The plugin could be broken, as well --
type: Comment
score: 0

http://stackoverflow.com/comment/39518840
score: 0
type: Comment
type: QuestionComment
has text: @Supun then write in question..not in comments.
comment on: http://stackoverflow.com/q/25347339

http://stackoverflow.com/a/25380252
has body: Use addClass() and removeClass() for this purpose $(".btn-default").click(function() { $(".active").removeClass("active"); $(this).addClass("active"); }); Demo
upvote count: 5
score: 5
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25380198

http://stackoverflow.com/comment/39455723
type: AnswerComment
type: Comment
has text: please give some fiddle .
comment on: http://stackoverflow.com/a/25312977
score: 0

http://stackoverflow.com/comment/39553996
type: Comment
has text: The users need to be logged in for the repsonse to anything but empty: **Response Data** _Only available if the user is logged into your app using Facebook and has granted publish_actions. If present, this is the ID of the published Open Graph story_. See:[link]https://developers.facebook.com/docs/sharing/reference/share-dialog#response
comment on: http://stackoverflow.com/q/25318260
score: 0
type: QuestionComment

http://stackoverflow.com/q/25259031
has answer: http://stackoverflow.com/a/25277840
accepted answer: http://stackoverflow.com/a/25277840
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25259145
tagged with: ajax
tagged with: promise
has comment: http://stackoverflow.com/comment/39356942
answer count: 4
tagged with: foreach
type: AnsweredQuestion
has body: I have try for the following for a long time and i have no more idea now, anyone can help me please. I just want to reload the current page after add items to the cart, I have try the stupid way by count, promise then and other else, but all fail. The problem is... the page already reloaded before the item add to the cart...! The following is my sample:- $("#Button").click(function () { var CurrentURL = window.location.href; var SelectedProduct = $('.SelectedProduct').length; $('.SelectedProduct').each(function () { $.ajax({ url: "/ShoppingCart/AddToCart", data: { id: $(this).attr('id')}, datatype: "json" }); --SelectedProduct if (SelectedProduct === 0) { window.location.href = CurrentURL; $('#CartListContent').slideDown() } }); }); $("#Button").click(function () { var CurrentURL = window.location.href; var promise = $('.SelectedProduct').each(function () { $.ajax({ url: "/ShoppingCart/AddToCart", data: { id: $(this).attr('id')}, datatype: "json" }); promise.done(function () { window.location.href = CurrentURL; $('#CartListContent').slideDown() }); }); }); } });
has comment: http://stackoverflow.com/comment/39355812
has answer: http://stackoverflow.com/a/25259145
type: Question
has answer: http://stackoverflow.com/a/25260450
has title: How to fire anothing action before a each loop (with ajax) complete
has answer: http://stackoverflow.com/a/25259156
tagged with: javascript
score: 0

http://stackoverflow.com/q/25356139
has comment: http://stackoverflow.com/comment/39689159
has comment: http://stackoverflow.com/comment/39535509
tagged with: javascript
linked to: http://stackoverflow.com/q/25297590
has answer: http://stackoverflow.com/a/25438240
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39560119
tagged with: parse-platform
type: Question
has body: I'm trying to upload several user photos to parse.com and associate them with a user object. I'm using the javascript sdk https://www.parse.com/docs/js_guide#objects-types I'm able to successfully save the photo as a file object. But when I try to build an array column in the user object/table the sdk errors out. I get the error JSON.stringify cannot serialize cyclic structures. upon saving the user object. profileController.js // uploads photo to rest api given local file_uri $scope.addPhoto = function() { var file = new Parse.File("profile-image.jpeg", { base64: $scope.imageData }); file.save().then(function(res) { console.log('success', res); var array = ['foo', file]; $scope.user.set('photos', array); $scope.user.save(); }, function(error) { console.log('error', error); }); }; This error arises when the object being serialized holds references to itself. My question then is - Is there a way to associate all user image files with a user object on parse.com? Ideally as an array column because I know there will never be more than 5 profile images per user.
has comment: http://stackoverflow.com/comment/39688412
accepted answer: http://stackoverflow.com/a/25438240
has comment: http://stackoverflow.com/comment/39687844
has title: associating an array of photos with a user on parse.com
score: 0
has comment: http://stackoverflow.com/comment/39688332
answer count: 1

http://stackoverflow.com/comment/39597437
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25389038
has text: can you tell me how to do the validation as well
type: AnswerComment

http://stackoverflow.com/comment/39467699
type: Comment
has text: If that is not working by some reason try `data = request.POST.get("data") json_encoded = json.dumps(data) decoded_data = json.loads(json_encoded) decoded_data = json.loads(decoded_data)` or `request.POST.get("data") decoded_data = json.loads(str(data))`
type: QuestionComment
comment on: http://stackoverflow.com/q/25318198
score: 0

http://stackoverflow.com/comment/39415047
comment on: http://stackoverflow.com/a/25277007
has text: yes correct. you were passing by value and that is how it works
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39374615
score: 0
type: AnswerComment
has text: Will definitely give this a shot. Can you explain briefly why I need to emulate live on dynamically created elements?
type: Comment
comment on: http://stackoverflow.com/a/25269296

http://stackoverflow.com/comment/39315373
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25237334
has text: It's a good practice to use ng-click instead of onClick in AngularJS.
score: 0

http://stackoverflow.com/q/25262247
answer count: 0
tagged with: knockout.js
type: Question
has title: Remove knockout bindings
tagged with: asp.net-mvc
linked to: http://stackoverflow.com/q/10048485
tagged with: javascript
tagged with: jquery
score: 0
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39367220
has comment: http://stackoverflow.com/comment/39363341
has body: I have a MVC 5 Application on it I have 3 different tabs - they load the same Partial View via ajax details on Car Model and the Tabs are Diesel/Petrol/Electric so a user can enter details such a Engine Size across the 3 Tabs and this is saved to the DB. I am using knockout js to call an ajax method to calculate some totals on the screen and also dynamically add content to the form and then save to the db. However - when I click between Tabs I get knockout throwing an error saying: You cannot apply bindings multiple times to the same element Some of the markup for my page is below: Remove Add Extra Info @Html.TextBoxFor(model => model.Value, new { @data_calculate = true }) @Html.TextBoxFor(model => model.Total, new { @disabled = "disabled", @data_bind = "value: Total" }) The js for the page is: var mvcModel = @Html.Raw(Json.Encode(Model)) var createExtraCarInfo = function (data) { if (data) { return ko.mapping.fromJS(data); } else { return { Id: ko.observable(), Name: ko.observable(), Description: ko.observable(), ExtraValue: ko.observable() }; } }; var viewModel = ko.mapping.fromJS(mvcModel, { 'ExtraCarInfos': { create: function(options) { return createExtraCarInfo(options.data); } } }); // calculateTotal ajax method removed for Brevity var currentTab = fuelType + 'Content '; // Add subscription to update totals $('#' + currentTab).on('keyup', '[data-calculate]', calculateTotal); ko.applyBindings(viewModel); removeExtraInfo = function(item) { viewModel.ExtraCarInfos.remove(item); }; addExtraInfo = function() { viewModel.ExtraCarInfos.push(createExtraCarInfo()); }; I've looked at the following question - is there no way I can clear knockout bindings simply for all elements on the screen at once?
has comment: http://stackoverflow.com/comment/39362123

http://stackoverflow.com/q/25343730
has body: As the title says, I'm currently trying to set up my project so that the optimizer can run on it. I'm looking to support a multi-page shim style configuration. That is: A common script, with sibling scripts that will be loaded dynamically at runtime. My project is also making use of dependencies installed via bower which are set to go into the vendor directory. There is also a node_modules directory, although it does not contain anything for the client and should be completely ignored. Here's the structure I have so far: / node_modules/ vendor/ some-code/ a-script.js more-code/ another-script.js common.js main.js runtime.js build.js Really all I'd like as a result of this process are two files in my build destination corresponding to main.js and runtime.js. Where the compiled main would be initially loaded and the compiled runtime might be loaded at runtime but only contains dependencies that are new to the graph. Questions &amp; Issues: If my common.js shims scripts from vendor is there anything about my directory structure that might present a problem during an r.js build? I noticed that when running r.js, it tries to minify everything in node_modules, which is wrong as I don't want it touching anything in node_modules. r.js also seems to be minifying everything in vendor which seems wrong. Shouldn't it assemble all the files and then minify them after without touching the originals found in the vendor directory? After being built, my dist directory ends up containing a full copy of my full project and directory structure with all .js files minified. I was under the impression that all it would contain is at most, two .js files with everything inlined? Is this possible? Here's my build.js/build.json file: { "mainConfigFile": "common.js", "dir": "dist", "modules": [ { "name": "main" }, { "name": "runtime", "exclude": [ "common" ] } ] }
upvote count: 2
tagged with: requirejs
tagged with: r.js
has answer: http://stackoverflow.com/a/25344036
type: Question
tagged with: javascript
tagged with: amd
score: 2
downvote count: 0
answer count: 1
has title: How do I structure my RequireJS project so that it can be optimized?
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39513134

http://stackoverflow.com/q/25364563
type: Question
has body: I've compiled my requirejs file using r.js and occasionally on page load, modules aren't defined as (I'm assuming) that require and define calls are running asynchronously and modules aren't getting defined by the time the require call has executed. I'm pretty sure my shim is correct, my waitSeconds is set to 0 (infinite) and all my exports are set up. Here's my (shortened) requirejs file: requirejs.config({ defaultPath: 'javascript', waitSeconds: 0, // paths to plugins paths : { 'jquery' : 'plugins/jquery-1.9.1.min', 'owl' : 'plugins/owl.carousel.min' }, // dependency order if applicable shim : { 'jquery' : { exports: '$' }, 'owl' : { deps: ['jquery'], exports: 'owlCarousel' } } }); require(['jquery','owl'], function($, owlCarousel){ $('.carousel').owlCarousel(); });
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39551837
has comment: http://stackoverflow.com/comment/39551468
has title: Compiled requirejs modules require calls are executing before modules are defined resulting in 'Undefined is not a function'
tagged with: requirejs
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/39631133
type: AnswerComment
comment on: http://stackoverflow.com/a/25385792
type: Comment
has text: it was helpfull and i needed to do such thing too, but i did so many things wrong that i will write after that answere
score: 0

http://stackoverflow.com/q/25332180
tagged with: http://stackoverflow.com/tag/json
downvote count: 3
type: Question
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39493225
has body: I want to get a new JSON object from this: (group by "a" &amp; group by "b" field with sum "d" and with count(objects)) var json = [ {"a":121, "b":212, "c":"0", "d":100}, {"a":121, "b":212, "c":"0", "d":300}, {"a":121, "b":210, "c":"0", "d":200}, {"a":120, "b":210, "c":"0", "d":300} ]; var new_json = [ {"a":121, "b":212, "c":"0", "d":400, "count":2}, {"a":121, "b":210, "c":"0", "d":200, "count":1}, {"a":120, "b":210, "c":"0", "d":300, "count":1} ]; Is it possible without underscore js? Can you help me?
has comment: http://stackoverflow.com/comment/39492204
answer count: 3
tagged with: grouping
has comment: http://stackoverflow.com/comment/39492131
has answer: http://stackoverflow.com/a/27618648
favorite count: 0
has answer: http://stackoverflow.com/a/25332770
type: UnansweredQuestion
score: -3
has answer: http://stackoverflow.com/a/25334437
has title: multiple grouping a JSON object
has comment: http://stackoverflow.com/comment/39492169

http://stackoverflow.com/comment/39353028
has text: There are various clustering strategies you can employ in OpenLayers, see this answer http://stackoverflow.com/questions/6641919/openlayers-nice-marker-clustering for some good examples.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25251131
type: QuestionComment

http://stackoverflow.com/comment/39437026
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25299940
has text: If you are using the above methods then you should be able to get rid of those `i` and `item` variables, you shouldnt really be tracking that in your view model, let knockout do it!

http://stackoverflow.com/comment/39517274
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25338546
score: 0
has text: your solution works out perfectly. Thanks. However, in my JS code, I am adding new rows to the html table dynamically. So, the page just keeps on loading infinitely. Any tips on where should I place the JS in my div ?

http://stackoverflow.com/a/25274368
has comment: http://stackoverflow.com/comment/39384582
upvote count: 2
has comment: http://stackoverflow.com/comment/39418412
has body: Your jQuery will need to look more like this: $(function () { $('#roleID').on('change', function (e) { var filter = $(this).val(); $('input[type="checkbox"]').removeAttr('checked'); $('input[type="checkbox"][data-tags*="'+filter+'"]').attr('checked','checked'); }); }); This is a very simple way of creating that functionality. You can view the fiddle here: http://jsfiddle.net/m0nk3y/kjnoovL0/1/
has comment: http://stackoverflow.com/comment/39417735
accepted answer of: http://stackoverflow.com/q/25274109
answers question: http://stackoverflow.com/q/25274109
has comment: http://stackoverflow.com/comment/39418064
has comment: http://stackoverflow.com/comment/39417267
has comment: http://stackoverflow.com/comment/39420166
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39420125
has comment: http://stackoverflow.com/comment/39417779
type: Answer
score: 2

http://stackoverflow.com/comment/39339630
type: Comment
has text: `.hide()` does not _"simply add a css class"_. See: http://api.jquery.com/hide/
type: AnswerComment
comment on: http://stackoverflow.com/a/25250257
score: 0

http://stackoverflow.com/a/25233946
has comment: http://stackoverflow.com/comment/39331315
answers question: http://stackoverflow.com/q/25233013
has comment: http://stackoverflow.com/comment/39331199
type: Answer
has comment: http://stackoverflow.com/comment/39308846
has comment: http://stackoverflow.com/comment/39320534
has comment: http://stackoverflow.com/comment/39331255
has comment: http://stackoverflow.com/comment/39309166
has body: First, You have to add a way to identify each dropdown box. Since you said that the their name attribute is always different, you have to add another way to identify them. Let's try adding a data-name attribute (you can use whatever name you want) to each one of them. Second, you said that "links should skip the first option". I interpret this as you don't want the user to be able to select the first options (e.g. Color, Size, Quantity). You can make these options non-selectable by adding a disabled flag on them. Size: ... To then select the correct values from the dropdown boxes when clicking on the links, you can add this jQuery snippet (this assumes that each link text is always of the form Selected: Color - White, Size - S, Quantity - 3): $('a.select').on('click', function(e) { e.preventDefault(); var text = $(this).text(); text = text.substring(text.indexOf(' ') + 1).split(','); for (var i = 0; i < text.length; i++) { var pair = text[i].trim().split(' - '); $('select[data-name="' + pair[0].toLowerCase() + '"]').val(pair[1]); } }); EDIT Since the select boxes markup cannot be modified and you wanna select them by their first option, you can do it like this: $('a.select').on('click', function(e) { e.preventDefault(); var text = $(this).text(); text = text.substring(text.indexOf(' ') + 1).split(','); for (var i = 0; i < text.length; i++) { var pair = text[i].trim().split(' - '); var a = $('select').filter(function() { return $(this).children().first().text() == pair[0] + ':'; }).val(pair[1]); } });
score: 0

http://stackoverflow.com/comment/39466028
type: Comment
type: QuestionComment
has text: It's all to do with code reusability. If you want to change the height or width of your canvas for example, you have to retype out all those lines of code after you change the size, or you can just run `setup()` again. Which is the same reason that the drawing details are in a function, because they are called over and over again.
score: 0
comment on: http://stackoverflow.com/q/25318451

http://stackoverflow.com/a/25248572
score: 0
type: Answer
has body: I added another container to the HTML code, like this: &lt;div class="container"&gt; &lt;div class="A"&gt; &lt;div class="B"&gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit... &lt;/div&gt; &lt;/div&gt; &lt;div class="C"&gt; This stays fixed when scrolling horizontally, but scrolls along when scrolling down the parent. &lt;/div&gt; &lt;/div&gt; Then added some style to the container class .container { background-color: green; height: 400px; width: 700px; position: absolute; top:0; overflow-x:hidden; overflow-y:scroll; } And made some changes to A and C classes. I know it is NOT the result that we want, but it is similar to it: Here is the fiddle http://jsfiddle.net/gnfwg08c/
answers question: http://stackoverflow.com/q/25247269
has comment: http://stackoverflow.com/comment/39336472

http://stackoverflow.com/a/25360900
has comment: http://stackoverflow.com/comment/39543419
answers question: http://stackoverflow.com/q/25360596
has comment: http://stackoverflow.com/comment/39543749
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39543946
has comment: http://stackoverflow.com/comment/39543701
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/39543472
has comment: http://stackoverflow.com/comment/39543241
downvote count: 0
has body: CSS Solution The span is removed from the viewport and its pseudo child is put back in its place. Have an example! CSS .k-upload-button span { position: relative; left: -9999px; } .k-upload-button span:before { content: 'Select file'; position: relative; left: 9999px; }
score: 3
accepted answer of: http://stackoverflow.com/q/25360596

http://stackoverflow.com/comment/39356480
type: Comment
has text: that match could be a few lvls down. (It's not guaranteed to have a element at the same level as you can add multiple categories)
comment on: http://stackoverflow.com/a/25259348
score: 0
type: AnswerComment

http://stackoverflow.com/q/25326853
tagged with: angularjs
type: Question
accepted answer: http://stackoverflow.com/a/25327555
answer count: 1
score: 0
has body: I'm trying to set up a directive so that I can pass in both the data to be used in the directive, and the specific filter that will be used in the ng-repeat inside of it. This isn't working, so I assume I'm approaching the whole problem wrong. How do I pass in the filter? Alternatively, how do I prefilter/sort the list I'm passing in? (The scope must be isolated, because I want to have multiple lists on the same page.) Plunker with the above code in it: http://plnkr.co/edit/ipsF15?p=preview
tagged with: javascript
has title: How can I pass a filter into an angular directive to be used in an ng-repeat?
has answer: http://stackoverflow.com/a/25327555
type: AnsweredQuestion

http://stackoverflow.com/comment/138775867
has text: This question is similar to: [How to do associative array/hashing in JavaScript](https://stackoverflow.com/questions/1208222/how-to-do-associative-array-hashing-in-javascript). If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25316448

http://stackoverflow.com/q/25247555
type: Question
has body: I sent ajax request from 'sub.example.com' to 'www.example.com/api/lists'(yes, it is subdomain), but it's not working only IE. It's working on FF, Chrome, Safari and other mobile browser. Error Message - SEC7120 : Origin http://sub.example.com is not allowed by Access-Control-Allow-Origin. My server setting is &lt;?php header('Access-Control-Allow-Origin : *'); header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS'); I tried two ways. first, jQuery.ajax(); $.ajax({ url : 'http://www.example.com/api/lists', type : 'GET', dataType : 'JSON', cache : false, crossDomain : true }).success(function(data){ // do something }); and navtive javascript. var xhr = new XMLHttpRequest(); xhr.open('GET', 'http://www.example.com/api/lists'); xhr.send(); both of them not working only IE10 Browser.(not tested lt IE10 yet)
tagged with: internet-explorer
accepted answer: http://stackoverflow.com/a/25248227
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25248194
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39334626
has answer: http://stackoverflow.com/a/25248194
tagged with: jquery
tagged with: ajax
tagged with: php
has answer: http://stackoverflow.com/a/25248227
has title: Cross Domain AJAX Request is not working on IE10
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/13188500

http://stackoverflow.com/q/25325822
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25325977
has body: I have &lt;div&gt; &lt;div&gt; &lt;td&gt; &lt;div&gt;&lt;/div&gt; &lt;/td&gt; &lt;/div&gt; &lt;/div&gt; But I want to check whether I am clicking the "child div" of "td" onclick:function(e){ tableValue = ""; if(idvalue != 0) { $('#'+idvalue).css('background-color', 'transparent'); if(idvalue == "id-8" || idvalue == "id-9") { $('#id-8').css('background-color', 'transparent'); $('#id-9').css('background-color', 'transparent'); } } idvalue = e.target.getAttribute('id'); $(".border-Class &gt; div").click(function () { var arr = []; arr = idvalue.split('-'); switch(arr[1]) { case "0": value = "border: 0 !important"; break; case "1": value = "border-left: 1 !important;border-right: 0 !important;border-top: 0 !important;border-bottom: 0 !important"; break; case "2": value = "border-right: 1 !important;border-left: 0 !important;border-top: 0 !important;border-bottom: 0 !important"; break; case "3": value = "border-top: 1 !important;border-left: 0 !important;border-right: 0 !important;border-bottom: 0 !important"; break; case "4": value = "border-bottom: 1 !important;border-left: 0 !important;border-top: 0 !important;border-right: 0 !important"; break; case "5": value = "border-top: 1 !important;border-bottom: 1 !important;border-left: 0 !important;border-right: 0 !important"; break; case "6": value = "border-left: 1 !important;border-right: 1 !important;border-top: 0 !important;border-bottom: 0 !important"; break; case "7": value = "border: 1 !important"; break; case "8": value = "border: 1 !important"; tableValue = "cross"; break; case "9": value = "border: 1 !important"; tableValue = "cross"; break; } $(idvalue).css('background-color', 'pink'); if(idvalue == "id-8" || idvalue == "id-9") { $('#id-8').css('background-color', 'pink'); $('#id-9').css('background-color', 'pink'); } }); this.value(value); Onclick call when i click within any one of that hierarchy. I tried in above way to confirm whether I am clicking the child div. But its not working out. somebody help pls?
has comment: http://stackoverflow.com/comment/39479481
has comment: http://stackoverflow.com/comment/39479562
type: UnansweredQuestion
score: -4
has comment: http://stackoverflow.com/comment/39479524
has title: can i have onClick within another function?
type: Question
tagged with: javascript
downvote count: 4
upvote count: 0
has comment: http://stackoverflow.com/comment/39480299
answer count: 1
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/25326283
has body: It looks like it is a URL Encoded JSON string. var json_string = decodeURIComponent(uri_encoded_string) should do the job.
accepted answer of: http://stackoverflow.com/q/25326275
type: Answer
answers question: http://stackoverflow.com/q/25326275
score: 3
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39480585
upvote count: 3
has comment: http://stackoverflow.com/comment/39480730

http://stackoverflow.com/comment/39391353
type: AnswerComment
score: 0
has text: Didn't work! @Html(names.mkString("[",",","]")) // Error : Tom is not defined @Html(names.mkString("""["", """","""", """"]")) // Error : unclosed multi-line string literal
type: Comment
comment on: http://stackoverflow.com/a/25275965

http://stackoverflow.com/comment/39519757
comment on: http://stackoverflow.com/a/25347671
score: 0
type: AnswerComment
has text: i did try but didn't had a luck checking bit more
type: Comment

http://stackoverflow.com/comment/39567940
type: QuestionComment
comment on: http://stackoverflow.com/q/25373196
score: 0
has text: that's putting words under my fingers. I'm going on information from talks with the Polymer devs, so that's all I can give you. The hack is as simple as any other JS (just access the shadow dom for the element, it's not really hard to find) but a problem caused by CSS is principally a problem solvable with CSS. In this case, it sounds like a job for [/deep/](http://www.polymer-project.org/docs/polymer/styling.html#sdcss) to ensure the correct higher z-index
type: Comment

http://stackoverflow.com/q/25336527
tagged with: loopbackjs
answer count: 2
possible better answer: http://stackoverflow.com/a/25510151
accepted answer: http://stackoverflow.com/a/28822050
has answer: http://stackoverflow.com/a/25510151
score: 0
upvote count: 1
downvote count: 1
has title: Where to place remote hooks (beforeRemote, afterRemote)code in yo loopback generated code
tagged with: javascript
has body: I'm using loopback generator to generate models and rest APIs service. Now I wanted to modify a rest api such that everytime the api is called, some spcific logging/actions are taken. I've come to know that by using remote hooks(beforeRemote, afterRemote), we can specify actions to be taken for different remote method calls. But what I don't know is that where to place the code of remote hooks. In which file this code will go when the project has been created using 'yo loopback'.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28822050
favorite count: 0
type: Question

http://stackoverflow.com/a/25334563
has body: The easiest option I can think of is to just append a &lt;line&gt; to the SVG whenever you mouseover a bar, and remove that line when you mouseout. It's similar to the solution proposed by @ckersch, except that it has more overhead (you're changing the DOM every mouseover/mouseout), but is easier to implement and doesn't change the structure of your SVG at all. You can add the following when you append the bars: .on("mouseover", function(d){ svg.append("line") .attr("class", "mouseover-line") .attr("x1", x(d[0]) + x.rangeBand()/2) .attr("x2", x(d[0]) + x.rangeBand()/2) .attr("y1", y(0)) .attr("y2", y(d[1])); .style("stroke", "#000") }) .on("mouseout", function(){ d3.selectAll(".mouseover-line").remove(); }); Working fiddle here.
answers question: http://stackoverflow.com/q/25330414
type: Answer
upvote count: 2
score: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25330414

http://stackoverflow.com/q/25233454
type: AnsweredQuestion
tagged with: knockout.js
type: Question
has title: ko.observable variable in collections tutorial
has body: While analyzing the collections tutorial, I couldn't understand two points: why do we have to define initialMeal variable as ko.observable in SeatReservation function? If I remove ko.observable, foreach loop in the View doesn't work. initialMeal is an array. Therefore, ko.observableArray should be used. However, ko.observableArray does not work. I discovered a similar pattern in this example. Could you help me to clarify this issue? Thanks. View Passenger name Meal Surcharge ViewModel function SeatReservation(name, initialMeal) { var self = this; self.name = name; self.meal = ko.observable(initialMeal); } function ReservationsViewModel() { var self = this; self.availableMeals = [ { mealName: "Standard (sandwich)", price: 0 }, { mealName: "Premium (lobster)", price: 34.95 }, { mealName: "Ultimate (whole zebra)", price: 290 } ]; self.seats = ko.observableArray([ new SeatReservation("Steve", self.availableMeals[0]), new SeatReservation("Bert", self.availableMeals[0]) ]); self.addSeat = function() { self.seats.push(new SeatReservation("", self.availableMeals[0])); } } ko.applyBindings(new ReservationsViewModel());
tagged with: javascript
tagged with: observable
possible better answer: http://stackoverflow.com/a/25233897
has answer: http://stackoverflow.com/a/25233897
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25233831
accepted answer: http://stackoverflow.com/a/25233831

http://stackoverflow.com/q/25336128
score: 1
type: Question
has title: Can I make several prototype methods bind to object instance?
answer count: 2
has comment: http://stackoverflow.com/comment/39499742
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39499948
has comment: http://stackoverflow.com/comment/39499895
has comment: http://stackoverflow.com/comment/39499713
has answer: http://stackoverflow.com/a/25344700
has comment: http://stackoverflow.com/comment/39514380
upvote count: 1
has comment: http://stackoverflow.com/comment/39499929
favorite count: 0
has comment: http://stackoverflow.com/comment/39500716
type: UnansweredQuestion
has body: I'm still learning quite a bit about the quirks of javascript. So I have a "class", or function created like: function Parser(){ .... } Parser.prototype = { init: function(){...}, parseChar: {} } Then, I'm adding some sub-methods of the parseChar object to the prototype like this: Parser.prototype.parseChar["*"] = function(){...} Parser.prototype.parseChar["/"] = function(){...} So how can I make the this reference inside those functions refer to the created instance of Parser? And not the object parseChar I've tried: Parser.prototype.parseChar["*"] = function(){...}.bind(??) I'm guessing that obviously won't work, since the instance doesn't even exist at this point. I just want the this reference to refer to each respective instance, to be able to access properties of the Parser inside those prototype function. I imagine this might require some magic in a constructor? I don't know, I just hope I don't have to radically alter this, because I really like the way functions are defined with the Parser.prototype.whatever syntax. Current Code function Parser(){ var that = this; } Parser.prototype = { state: {...}, parseChar: {}, init: function(){}, parse: function(fileName){ //random stuff } } Parser.prototype.parseChar["*"] = function(){ console.log(that); } And then in another test file: var Parser = require('./Parser.js'); var parser = new Parser(); parser.parse("Parser.js"); Btw, this is node.js ;) Potential Solution It looks like this solved my problem no, it didn't, though I'm still not sure it's the best solution, so I'm not going to accept it just yet. In the constructor, I added: //Bind prototype methods to the instance for (key in this.parseChar){ var property = this.parseChar[key]; if(this.parseChar[key] instanceof Function){ this.parseChar[key] = this.parseChar[key].bind(this); } } Now, in the prototype methods, I can add stuff like: console.log(this.state); And it works. I could see foresee 1 of 2 problems with this approach. If either are correct or incorre…
linked to: http://stackoverflow.com/q/16063394
has comment: http://stackoverflow.com/comment/39499691
tagged with: node.js
has comment: http://stackoverflow.com/comment/39499818
has answer: http://stackoverflow.com/a/25336636

http://stackoverflow.com/q/25243240
tagged with: ruby-on-rails
type: Question
score: 1
has comment: http://stackoverflow.com/comment/39326922
has body: I'm using the local_time gem to show dates in users local times and it works well for dates already added, to display them in my local time. I'm having a problem adding a new date though and I am trying to pass the users local time (and thus date) in through the HTML form. I figure the client device has their local time and so I need to grab it. Right now I am trying to add a field to my form, as in: = simple_form_for(@link)do |f| ... = f.text_field :local_client_time, value: local_time("#{Time.now()}") but that is displaying August 11, 2014 12:12pm" /&gt; which is not only mal-formed and actually showing (should be hidden) but is also showing a utc time, 5 hours ahead of my browser time which is on EST. How can I pass in the users local time on the form? (probably js) ? I am also not sure how to process it on the controller. I currently have @link = Link.new(params[:link]) and a few other pieces of logic after that. I'm not sure how to let rails deal with this extra parameter when creating the Active Record instance (will it ignore it?) and I am also not sure how to then use the local_client_time that was passed in through a hidden field as in a date format that rails can use to actually set the value of a date field verified_date Note: I will need to display the field for all users, whether logged in or not, but that seems ok with the local_time gem. The only issue seems to be with adding a date field that has a time component. After 8pm EST it gets added as the next day and then the display reflects that. Another field ('content_date') doesn't have these issues but for that field I just use f.text_field :content_date, id: 'datepicker', size: 10 and no special processing in the controller and a date field in the database. Both date fields look similar: | content_date | date | YES | | NULL | | | verified_date | date | YES | | NULL | | I am also wondering if the verified date field should actually be datetime instead to get around this. Thing is I don't care about t…
answer count: 2
upvote count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39326031
tagged with: ruby-on-rails-3
favorite count: 0
has answer: http://stackoverflow.com/a/25243404
tagged with: timezone
tagged with: localtime
has comment: http://stackoverflow.com/comment/56992930
has answer: http://stackoverflow.com/a/25243474
type: UnansweredQuestion
has title: How can I use javascript to get the local time in a rails form?

http://stackoverflow.com/q/25378008
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/25378155
type: Question
tagged with: mongodb
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25378155
has body: I am trying to publish a Collection of sensitive information based on the Group a User belongs to. Data example: Items: ItemA - GroupA ItemB - GroupA ItemC - GroupB Users: UserA - GroupB UserB - GroupA UserC - GroupA But when I try to do Meteor.publish('groupItems', function () { return Items.filter({ groupId : Meteor.user().profile.groupId }); } It fails because I am only allowed to access the Meteor.userId() in such a call. (As expressed in this ambiguous error message, server side: Exception from sub 5jnantRJ6gyHpTkTy Error: Meteor.userId can only be invoked in method calls. Use this.userId in publish functions. Question: How can I then filter the Collection based on a user property, such as groupId?
has title: Publish Meteor Collection based on current user property
tagged with: meteor

http://stackoverflow.com/q/25334974
score: 11
has comment: http://stackoverflow.com/comment/39497452
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/33196075
downvote count: 0
has body: I am trying to use a plugin that is in /js/lib/stellar.jquery.js: var $ = require('jquery'); require('./lib/stellar.jquery') $(function(){ $.stellar(); }); When I run this though I get jQuery is not defined. I think the stellar jQuery plugin is loading before the jq library. At the bottom of the stellar plugin there's this code: ... // Expose the plugin class so it can be modified window.Stellar = Plugin; }(jQuery, this, document)); Changing "jQuery" to "$" does not work either, gives "$ is not defined"
has title: order dependencies: jQuery is not defined with browserify
has comment: http://stackoverflow.com/comment/39497595
has comment: http://stackoverflow.com/comment/39497822
type: Question
tagged with: javascript
upvote count: 11
accepted answer: http://stackoverflow.com/a/26598534
possible better answer: http://stackoverflow.com/a/33196075
answer count: 2
tagged with: browserify
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/26598534
tagged with: npm

http://stackoverflow.com/q/25357836
has comment: http://stackoverflow.com/comment/39537747
score: 0
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/39538588
has comment: http://stackoverflow.com/comment/39537483
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39537502
has comment: http://stackoverflow.com/comment/39537822
answer count: 0
has body: very stupidly question I think, When I put this code inline then works, but when I put it on external js file it can not debug after the $ajax method. $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: 'WebService/Common/Bank.asmx/GetBank', data: "{}", dataType: "json", async: false, success: function (data) { debugger; ///debug point not reach here $.each(data.d, function (key, value) { $("#ddlLCMasterBank").append($("&lt;option&gt;&lt;/option&gt;").val(value.BankID1).html(value.BankName1)); }); }, error: function (result) { alert("Error"); } });
has title: $ajax method does not execute for external javascript
type: Question
has comment: http://stackoverflow.com/comment/39537864
has comment: http://stackoverflow.com/comment/39537486
tagged with: javascript

http://stackoverflow.com/q/25334290
has comment: http://stackoverflow.com/comment/39498149
score: 0
has title: Get the UNC of a file that the end user selects
answer count: 1
tagged with: sharepoint-2010
tagged with: asp.net
has answer: http://stackoverflow.com/a/25335456
type: AnsweredQuestion
tagged with: web-parts
type: Question
tagged with: c#
tagged with: javascript
has body: I am trying to create a Sharepoint webpart for a user to browse to, and select, a file from a share on our file server. Then I need to create a link to this file to display in a list of links that will go onto our Sharepoint intranet page. I have created a custom web part using asp.net/c# in order to do this but I am stuck on how to get the UNC path to the document. From my understanding it wont work with an asp.net fileupload control or a html input element. What other options would there be? I really don't want the user to have to type in the whole path to the document. This needs to be a re-usable solution so that my users can create new lists of links to documents when they so desire. Thanks for any advice.
accepted answer: http://stackoverflow.com/a/25335456

http://stackoverflow.com/q/25301978
has answer: http://stackoverflow.com/a/25302047
tagged with: browser
has comment: http://stackoverflow.com/comment/39435562
answer count: 3
upvote count: 1
linked to: http://stackoverflow.com/q/8831345
favorite count: 0
has title: Images take a while load
has comment: http://stackoverflow.com/comment/39435375
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/39435376
has comment: http://stackoverflow.com/comment/39435407
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25302231
has body: I have a PHP code that prints an image (echo"&lt;img src='uploads/icon.png'/&gt;";), the thing is that the first time I run this code the img take like a second to appear then when I refresh the browser the image appears instantaneously, is there a way cache the img to browser before loading?
has comment: http://stackoverflow.com/comment/39435346
has answer: http://stackoverflow.com/a/25302116
type: Question
has comment: http://stackoverflow.com/comment/39435457
tagged with: javascript
has comment: http://stackoverflow.com/comment/39435411

http://stackoverflow.com/a/25646503
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40073137
answers question: http://stackoverflow.com/q/25236969
has body: You have attached the OnSave() method to OnSave event. So, logically if you call save again within the same event, the calls goes recursively. From MSDN Xrm.Page.data.refresh(save).then(successCallback, errorCallback); Parameter: save - A Boolean value to indicate if data should be saved after it is refreshed. So, you will have to pass 'false' to this method (You just need to refresh, no save is required)
has comment: http://stackoverflow.com/comment/40132551

http://stackoverflow.com/comment/39457200
score: 0
type: Comment
type: QuestionComment
has text: Then the lower graph should move up, see http://jsfiddle.net/bcgoovem/1/
comment on: http://stackoverflow.com/q/25308590

http://stackoverflow.com/a/25278264
score: 2
has comment: http://stackoverflow.com/comment/39435052
upvote count: 2
has comment: http://stackoverflow.com/comment/39433404
accepted answer of: http://stackoverflow.com/q/25277936
has comment: http://stackoverflow.com/comment/39420087
has comment: http://stackoverflow.com/comment/39391124
has comment: http://stackoverflow.com/comment/39391116
has comment: http://stackoverflow.com/comment/39440325
has comment: http://stackoverflow.com/comment/39433295
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39396995
downvote count: 0
answers question: http://stackoverflow.com/q/25277936
has comment: http://stackoverflow.com/comment/39434748
has body: here you go, I made an example of how you can do it: DEMO HTML: Section 1 Section 2 Section 3 Section 4 CSS: *{ margin:0; padding:0; } section{ position:relative; width:100%; height:400px; background-color:#CCC; border-bottom:1px solid #000; } #bulletContainer{ position:fixed; width:25px; height:140px; left:100%; top:50%; margin-left:-50px; margin-top:-70px; } .bullet{ background-color:#666; border-radius:50%; width:25px; height:25px; margin-bottom:10px; cursor:pointer; } .highlighted{ background-color:#F90; } jQuery: $(document).on('scroll',function(){ $('section').each(function(index){ if($(document).scrollTop()>=$(this).offset().top-50){ $('.bullet').not($('.bullet').eq(index)).removeClass('highlighted'); $('.bullet').eq(index).addClass('highlighted'); } }); }); $('.bullet').click(function(){ $('.bullet').not(this).removeClass('highlighted'); $(this).addClass('highlighted'); var index=$(this).index(); $('body, html').animate({scrollTop:$('section').eq(index).offset().top},200); }); if you scroll the page or click on any of the bullets, you can see the bullet getting highlighted, and the page scrolling to the section. NOTE: this code has a tolerance of 50px it means when the scroll is 50px above the desired element, the bullet gets highlighted, you can change it at any time.
type: Answer

http://stackoverflow.com/a/25349633
accepted answer of: http://stackoverflow.com/q/25349198
answers question: http://stackoverflow.com/q/25349198
has body: Your delay in the test is set too low. When you use interval.flush(100000) instead it should work - although it looks like your code will not run as-is, I had to make some adjustments. I've created a fiddle to show you it works with a higher delay (with some small fixes). If you have questions like this in the future, including code in the question but also a fiddle will greatly help others helping you :-) BTW: I'm assuming the creationWatcher() in your testing code was a typo and the actual function to be called should be createWatcher().
score: 0
has comment: http://stackoverflow.com/comment/39522694
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/25326123
has title: jQuery replace div with another div function
has body: I have this HTML block and I need a jQuery function (like replaceWith()) to find the next instance of the out of the four present and change it when my javascript method is called. I want to do this using the jQuery bxslider onSlideAfter() method. Could someone help me with the javascript function? HTML We provide business and personal insurance to suit your individual needs Read More Smallholders Insurance Read More Single tractor Read More Property Owners Read More Javascript (for bxSlider) $('.bxslider').bxSlider({ pager: true, auto: true, useCSS: false onSlideAfter: function($slideElement, oldIndex, newIndex){//my method here} });
upvote count: 0
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/39480251
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39480075
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/39480275
downvote count: 1
has comment: http://stackoverflow.com/comment/39480107
type: Question
has answer: http://stackoverflow.com/a/25326220

http://stackoverflow.com/comment/39428267
score: 0
type: Comment
type: QuestionComment
has text: I'd make a fiddle, but jsFiddle doesn't provide anyway to add textures. Also, I highly suspect I know what the issue is (faces within a single geometry cannot be depth-sorted) and that it is indeed a WebGL/OpenGL issue, not a THREE.js-specific issue as you've assumed.
comment on: http://stackoverflow.com/q/25276169

http://stackoverflow.com/comment/39384608
type: Comment
type: QuestionComment
score: 0
has text: What happens when you move the `done()` either outside and last of your `.then()` or outside and first?
comment on: http://stackoverflow.com/q/25274156

http://stackoverflow.com/comment/39538105
type: Comment
comment on: http://stackoverflow.com/a/25358234
has text: Typo error, I was doing onkeyup. OnBlur is not an option here , as I want to make conversion while typing, NOT at the end.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39342477
has text: very interesting source you shared! +1
comment on: http://stackoverflow.com/a/25251677
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25375071
favorite count: 0
has comment: http://stackoverflow.com/comment/39570732
accepted answer: http://stackoverflow.com/a/25375634
has answer: http://stackoverflow.com/a/25376184
has comment: http://stackoverflow.com/comment/39570764
answer count: 3
has title: Angular function constructor in Controller
has comment: http://stackoverflow.com/comment/39570560
has comment: http://stackoverflow.com/comment/39571588
has comment: http://stackoverflow.com/comment/39570777
has comment: http://stackoverflow.com/comment/39571368
has answer: http://stackoverflow.com/a/25375603
has answer: http://stackoverflow.com/a/25375634
linked to: http://stackoverflow.com/q/17475420
tagged with: angularjs
upvote count: 2
has comment: http://stackoverflow.com/comment/39571273
has comment: http://stackoverflow.com/comment/39570794
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25375603
type: Question
has body: In normal JS I can do this: function Droppable() { this.relevant = true; this.uuid = generateUUID(); }; var generateUUID = function() { return '12345'; } console.log(new Droppable); // returns Droppable {relevant: true, uuid: "12345"} But in Angular I have this: angular.module('myApp').controller('MyCtrl', ['$scope', function($scope) { function Droppable() { this.relevant = true; this.uuid = generateUUID(); } var generateUUID = function() { return '12345'; } // initalize droppable areas $scope.region1 = [new Droppable]; $scope.region2 = [new Droppable]; $scope.region3 = [new Droppable]; }]); I am trying to make 3 droppable areas all with a UUID. But when I do this I get 'undefined is not a function' referring to the line this.uuid = generateUUID(); in function Droppable() {...} Why is that?
linked to: http://stackoverflow.com/q/25111831
linked to: http://stackoverflow.com/q/25330193
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25314852
answers question: http://stackoverflow.com/q/25314698
score: 1
upvote count: 1
has body: Well you can do this: HTML: Yes No Button JS: $(document).ready(function() { if (document.getElementById('yes').checked) { $('#button').show(); } else { $('#button').hide(); } });
type: Answer
downvote count: 0

http://stackoverflow.com/comment/39314873
score: 1
comment on: http://stackoverflow.com/a/25236991
type: AnswerComment
type: Comment
has text: In practice there's little difference, but it's good practice to wrap the handler to your external event in `$apply`, e.g. `elem.click(function() { $scope.$apply(function() { /* code here */ }); });`

http://stackoverflow.com/a/25260950
has comment: http://stackoverflow.com/comment/39392867
type: Answer
upvote count: 4
has body: You can get all p tag text in array and then join them with spaces: $(mystring).find('p').map(function() { return $(this).text(); }).toArray().join(' ')); Working Demo
answers question: http://stackoverflow.com/q/25260752
downvote count: 0
score: 4

http://stackoverflow.com/comment/39332906
comment on: http://stackoverflow.com/q/25246467
score: 0
has text: @Paul, I am using chrome. I am trying to assign the values in object to another variable. I need to see what the object looks like.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25344435
has comment: http://stackoverflow.com/comment/39555315
has comment: http://stackoverflow.com/comment/39622135
answers question: http://stackoverflow.com/q/25272020
upvote count: 3
score: 0
downvote count: 3
has comment: http://stackoverflow.com/comment/39639700
type: Answer
has body: Using window.scrollTo(0,1); you can make the navigation bar disappear. It's a hack, but it works.
has comment: http://stackoverflow.com/comment/39538415

http://stackoverflow.com/comment/39534543
type: QuestionComment
has text: No, my 1st row is always in place and not modified. If I click on column header (1st row) table content is sorted by that row. RowNumber column is rearranged together with the rest of the content, but I do want to keep RowNumber always from 1 to 3...
comment on: http://stackoverflow.com/q/25356168
score: 0
type: Comment

http://stackoverflow.com/a/25240271
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25239941
has body: Basically you're looping through every select in the page and checking for their values, when you actually should observe just the one with ID _1_1_81_1. Also, you can simplify your code: $(function () { // Observe the particular select for changes in its value. // As every element in the page should have its on ID, you can // select it straight away (omitting the type - select). $("#_1_1_81_1").on("change", function () { // Toggle the input visibility based on the selected value. // The .val() method works here just like for every type of // input. You don't need to go through all the select options // and test their values. $(".osother").toggle($(this).val() == "otheros"); }); }); Demo jQuery .toggle() Note: This answer is based on the code you provided. If there are any other requirements or code involved, you should state it in the question.
answers question: http://stackoverflow.com/q/25239941
score: 0

http://stackoverflow.com/comment/39561129
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25370200
has text: I tried it in a fiddle and got the same result, however, copying it to an HTML file did work.

http://stackoverflow.com/comment/39370758
comment on: http://stackoverflow.com/a/25266716
has text: Too easy, should have dug even further into the documentation. Thanks!
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39524540
type: QuestionComment
comment on: http://stackoverflow.com/q/25350561
has text: the js code is in the page.html. Can you explain further.
score: 0
type: Comment

http://stackoverflow.com/comment/39505611
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25339227
has text: If the solution in the answer doesn't work, please add the markup to the question so I can tweak it to fit. But I'm sure you'll get the idea anyway.

http://stackoverflow.com/q/25260691
has comment: http://stackoverflow.com/comment/39359480
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39359402
tagged with: css
tagged with: sage-crm
has comment: http://stackoverflow.com/comment/39359801
has body: I have an issue with the enter key not submitting data in a form when the enter key is hit in Chrome and Firefox, you have to click on the link: onclick="javascript:document.EntryForm.TargetAction.value = 'NewDocument'; document.EntryForm.submit();" I believe this is because the document lacks input type="submit", so I would like to add it into the page. The problem lies in the fact that the page is generated dynamically by Sage CRM which according to our Sage team does not give us access to modify the scripts. I have however found the CSS! I have used the CSS in the past to change certain aspects of the interface. Another problem is that although Sage CRM is a relatively new system (I am told) as it was created when Sage sold ACT! the HTML does not seem to comply with what I would describe as best practices (HTML4, no DOCTYPE, elements 20 tables deep, very few class tags and fewer ID tags, I think we got lucky in this case with the .ButtonItem class) My plan is to change this link (one of many links with no IDs) to the submit input type using css content: and :after and :nth-of-type(1) &lt;TABLE class=ButtonGroup&gt; &lt;TBODY&gt; &lt;TR&gt; &lt;TD class=ButtonItem&gt; &lt;TABLE cellSpacing=0 cellPadding=0 border=0&gt; &lt;TBODY&gt; &lt;TR&gt; &lt;TD width=32&gt;&lt;A onfocus="if (event &amp;amp;&amp;amp; event.altKey) click();" class=ButtonItem accessKey=F href="javascript:try{checkSubmit(document.EntryForm);}catch(e){document.EntryForm.submit();}"&gt;&lt;IMG border=0 src="/CRM/Themes/img/default/Buttons/Search.gif" align=middle&gt;&lt;/A&gt;&lt;/TD&gt; &lt;TD&gt;&amp;nbsp;&lt;/TD&gt; &lt;TD&gt;&lt;A onfocus="if (event &amp;amp;&amp;amp; event.altKey) click();" class=ButtonItem accessKey=F href="javascript:try{checkSubmit(document.EntryForm);}catch(e){document.EntryForm.submit();}"&gt;&lt;FONT style="TEXT-DECORATION: underline"&gt;F&lt;/FONT&gt;ind&lt;/A&gt;&lt;/TD&gt; &lt;/TR&gt; &lt;/TBODY&gt; &lt;/TABLE&gt; &lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt; &lt;TD class=Button…
type: Question
has comment: http://stackoverflow.com/comment/39359162
tagged with: javascript
score: 0
has title: How to get Submit via Enter key working on Chrome and Firefox (via input type="submit") with access only to CSS
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39359093
tagged with: cross-browser

http://stackoverflow.com/q/25311923
accepted answer: http://stackoverflow.com/a/25312572
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Javascript Validation for all field with Required attribute
possible better answer: http://stackoverflow.com/a/67826542
has answer: http://stackoverflow.com/a/67826542
score: 23
favorite count: 0
answer count: 6
has answer: http://stackoverflow.com/a/46697616
type: Question
tagged with: required
upvote count: 23
has body: I've searched high and low for the answer to this but can't find it anywhere. I have a form which has the HTML 'required' attributes and it does a fine job of highlighting the fields that need to filled in before submission...or would do, but the system which my form is bolted onto (of which I have no control over) submits the form anyway after a few seconds. It relies on Javascript for it's submission. Therefore I'd like to write a Javascript script to check all fields for a required attribute. Currently I have a script that specifies the fields I want to be mandatory, but if it could look up the attribute instead, that would be brilliant.
has answer: http://stackoverflow.com/a/72018120
has answer: http://stackoverflow.com/a/67291763
has answer: http://stackoverflow.com/a/25312572
tagged with: forms
has answer: http://stackoverflow.com/a/72688389
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25251365
has comment: http://stackoverflow.com/comment/39343540
type: Answer
has body: Try When Google Maps initializes, I am guessing that it removes all inner elements within id="map-content", which is why you are seeing the flash of red.
answers question: http://stackoverflow.com/q/25251293
accepted answer of: http://stackoverflow.com/q/25251293
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/39348240
comment on: http://stackoverflow.com/q/25234829
score: 0
type: Comment
type: QuestionComment
has text: Ive tried server sent events. it reconnects every 3 seconds

http://stackoverflow.com/comment/39572523
comment on: http://stackoverflow.com/a/25368240
score: 0
type: AnswerComment
has text: @tcooc I'm not making a copy of string. What do you mean?
type: Comment

http://stackoverflow.com/comment/55980232
comment on: http://stackoverflow.com/a/25400224
type: AnswerComment
score: 0
type: Comment
has text: no worries ,can you give me tips on how to achieve the same. once i complete my code i will post it here thanks

http://stackoverflow.com/q/25249915
type: UnansweredQuestion
tagged with: sockets
tagged with: node.js
score: 1
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/25182226
downvote count: 0
tagged with: javascript
has title: how to capture and test for socket.io events in casper.js
answer count: 1
has comment: http://stackoverflow.com/comment/39341179
favorite count: 0
has answer: http://stackoverflow.com/a/25298988
tagged with: casperjs
has body: I'm using Casperjs to test a socket.io application. I want the ability to assert that different emits have happened, from the server and the client, but the code I have below keeps giving me errors. I have the following line in my test setup: casper.page.injectJs('test_include.js'); test_include.js looks like: document.emits = []; document.ons = []; (function(){ var _origEmit = main_socket.emit; main_socket.emit = function(){ console.log("SENT", Array.prototype.slice.call(arguments)); document.emits.push(arguments); _origEmit.apply(this, Array.prototype.slice.call(arguments)); } var _origOn = main_socket.$emit; main_socket.$emit = function(){ console.log("RECEIVED", Array.prototype.slice.call(arguments)); document.ons.push(arguments); _origOn.apply(this, Array.prototype.slice.call(arguments)); } console.log("Injection complete"); })(); The injection complete runs, so I know the injectjs is working. Then, in my test case where I check to see if it's working at all: casper.evaluate(function(){ main_socket.emit('testin'); console.log("EMITS", JSON.stringify(document.emits)); }); and the output shows basically that there haven't been any emits, even though I just emitted something: EMITS [{}] For my end goal I'd like the ability to click a link, assert that the proper socket.io event is emitted, wait 500ms and assert that the server has emitted what I would expect to see back. It seems like this would be an every day use case but I'm having troubles getting the full cycle working. (note, in my update, I found the error that was happening and it was elsewhere, so I updated to show what isn't working stead of the error)

http://stackoverflow.com/a/25266610
upvote count: 1
score: 1
downvote count: 0
has body: If you navigate from one HTML page to another in Cordova/PhoneGap you don't have to close previous page, since it will be automatically disposed for you by the browser. If you are using some other technology like jQuery Mobile/Sencha Touch/Kendo UI or other, please consult documentation for corresponding product how to accomplish desired task.
answers question: http://stackoverflow.com/q/25265149
type: Answer

http://stackoverflow.com/comment/39404628
type: AnswerComment
score: 0
type: Comment
has text: the first one, sorry! ;)
comment on: http://stackoverflow.com/a/25284711

http://stackoverflow.com/comment/68407701
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25240110
has text: Got the solution. I have to include highcharts-more.js for bubble chart. http://jsfiddle.net/spidiweb/ad7spa3m/1/
score: 1

http://stackoverflow.com/a/25277840
has comment: http://stackoverflow.com/comment/39618124
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25259031
has comment: http://stackoverflow.com/comment/39390550
accepted answer of: http://stackoverflow.com/q/25259031
has body: I don't know how much control you have over the server side code, but you should let the API handle adding an array of products to cart, that would make it so much faster and simpler. http://jsfiddle.net/hqn3eufa/ $("#Button").on('click', function () { var selected_products_ids = []; $('.SelectedProduct').each(function () { selected_products_ids.push(this.id); }); $.ajax({ url: "/ShoppingCart/AddToCart", data: { ids: selected_products_ids }, datatype: "json", success: function() { window.location.reload(); } }); });
type: Answer

http://stackoverflow.com/a/25277631
has body: Instead of trying to add in inline styles just add the class to one of your own css files (ie create a bootstrap-override.css) and change the properties you wish to change. You might need to either use !important after the property value to make sure it overrides the others or use a higher specificity Using !important .tooltip-inner { width:150px !important; } Using a higher specificity .someParentElementClass img.tooltip-inner { width:150px; } Article on Specificity You do not need to modify any of the boostrap files. The css classes aren't even in the js file you mention in the comments, that is just setting the class attribute on the element. All you have to do is create a new css file, put the style you want to override in it in there, and use either the !important flag, or the higher specificity to override the bootstrap styles bootstrap-override.css .tooltip-inner { width:150px !important; } .tooltip.top { top:-100px !important; } Then in your html include the file after the boostrap files &lt;head&gt; &lt;link rel="stylesheet" href="/boostrap.css" /&gt; &lt;link rel="stylesheet" href="/boostrap-override.css" /&gt; &lt;/head&gt; This is all you have to do nothing else. And as long as you use the correct specificity or !important the styles will be overriden.
answers question: http://stackoverflow.com/q/25277585
has comment: http://stackoverflow.com/comment/39390031
type: Answer
accepted answer of: http://stackoverflow.com/q/25277585
upvote count: 1
has comment: http://stackoverflow.com/comment/39389936
has comment: http://stackoverflow.com/comment/39389992
type: AcceptedAnswer
downvote count: 0
score: 1

http://stackoverflow.com/a/25237857
answers question: http://stackoverflow.com/q/25235558
score: 0
has body: There is no div named mapCanvas in your html page. Try adding the mapCanvas div inside your modal-body as shown below. This may be the reason the map is not displayed perfectly. Please check and let me know if it works. &lt;div id="locateModal" class="modal" tabindex="-1"&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;&amp;times;&lt;/button&gt; &lt;h4 class="blue bigger"&gt;Please fill the following form fields&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body overflow-visible"&gt; &lt;div id="mapCanvas"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;
type: Answer

http://stackoverflow.com/comment/39524403
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25350521
has text: $(document).ready(function FN(){ setTimeout(function() { $('#disable').toggle('fast'); setTimeou(FN, 2000) }, 2000);});
score: 0

http://stackoverflow.com/q/25231602
type: Question
has body: okay so here is the deal,i'm a bit new to jquery and tried to make a 'welcome' that would fade IN as the page loads but it just wont work......HELP!!! anyone :) :D html: WELCOME init.js: $(document).ready(function(){ $("#message").fadeIn("slow"); });
tagged with: javascript
has title: Jquery: trouble in running
score: -1
has answer: http://stackoverflow.com/a/25231694
answer count: 1
downvote count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39303906
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39303821
tagged with: css
has comment: http://stackoverflow.com/comment/39303818
upvote count: 0

http://stackoverflow.com/comment/39528216
has text: Surely you mean `$(this).parent().attr("id")`?
score: 3
comment on: http://stackoverflow.com/q/25352783
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25264156
answers question: http://stackoverflow.com/q/25261315
has comment: http://stackoverflow.com/comment/39366268
has comment: http://stackoverflow.com/comment/39367318
score: 0
has comment: http://stackoverflow.com/comment/39366593
type: Answer
has body: You should be using a plugin as others pointed out, here is another plugin that does the same job. https://github.com/ccsoft/cordova-parse PS: I am the author of the plugin.

http://stackoverflow.com/comment/39517682
comment on: http://stackoverflow.com/q/25346660
type: Comment
type: QuestionComment
has text: how and from what do you want to generate it? what have you tried and where are you stuck?
score: 2

http://stackoverflow.com/comment/39580215
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25380241
has text: you have 50 OptionSets or your OptionSet have 50 Options ?

http://stackoverflow.com/comment/39400773
has text: Try using .promise().done()
type: Comment
comment on: http://stackoverflow.com/q/25283642
type: QuestionComment
score: 1

http://stackoverflow.com/q/25330896
has answer: http://stackoverflow.com/a/25330944
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25330944
has answer: http://stackoverflow.com/a/25330936
type: Question
has answer: http://stackoverflow.com/a/25331402
possible better answer: http://stackoverflow.com/a/25330936
has title: Selecting only one div of entire css class in jQuery
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/48239
has comment: http://stackoverflow.com/comment/39489576
has comment: http://stackoverflow.com/comment/39489933
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has body: my goal is to show an overlay on a div when that div is hovered on. The normal div is called .circleBase.type1 and the overlay is circleBase.overlay. I have multiple of these divs on my page. When I hover over one .cirlceBase.type1, overlays show on every .circleBase.type1. How do I prevent this? Here is some code: HTML Lorem ipsum gdroel 11/12/14 and jQuery $(document).ready(function(){ $('.overlay').hide(); $('.date').hide(); $(".circleBase.type1").mouseenter(function(){ $(".overlay").fadeIn("fast"); $('.date').show(); $('.hidetext').hide(); }); $(".overlay").mouseleave(function(){ $(this).fadeOut("fast"); $('.date').hide(); $('.hidetext').show(); }); });

http://stackoverflow.com/q/25308711
answer count: 1
accepted answer: http://stackoverflow.com/a/25308888
tagged with: oop
tagged with: javascript
upvote count: 4
has title: AJAX call within Javascript class (prototype function)
type: AnsweredQuestion
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
type: Question
has body: I am implementing a Javascript class which I am having trouble getting to work. After I initialize an instance of the class, I then call a method of that class which makes an AJAX request. The data that is returned on 'success' of the AJAX function is then needed to be set to the a property of that instance. When I output the this.results variable later in my code, it is empty when it shouldn't be. Here is my code: //Individual Member Class function GetReports(options) { this.options = options; this.results = {}; } GetReports.prototype.getResults = function() { jQuery.ajax({ type : 'post', dataType : 'json', url : 'reporting/getStaffMemberReports', async : false, data : options, success : function(data) { this.results = data; setResult(this.results); } }); } GetReports.prototype.returnResults = function(type) { if(type === "JSON") { JSON.stringify(this.results); } else if (type === "serialize") { this.results.serialize(); } return this.results; }; GetReports.prototype.setResult = function(data) { this.results = data; }; And my code which creates an instance of the 'class': var jsonString = &lt;?php echo json_encode($JSONallocatedStaffMembers); ?&gt;; options = { all : true, members : JSON.parse(jsonString), type : 'highperform' }; var all = new GetReports(options); all.getResults(); var results = all.returnResults("JSON"); console.log(results); Now, as the AJAX call is asynchronous, I was thinking this may be the issue? I have tried putting 'async : false,' in but that doesn't help. Can anyone see where I am going wrong?
score: 4
has answer: http://stackoverflow.com/a/25308888

http://stackoverflow.com/comment/39576407
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25378185
has text: possible duplicate of [What's The Best Way of Centering a Div Vertically with CSS](http://stackoverflow.com/questions/396145/whats-the-best-way-of-centering-a-div-vertically-with-css)
score: 0

http://stackoverflow.com/comment/39599607
comment on: http://stackoverflow.com/a/25388043
type: Comment
has text: And also i want like this,The calendar needs to autoselect the current day ,mean that today is August 2014, suppose one user want to see 2 month back mean June 2014 .I want create a button ,if i click button ,it will show August 2014.Can you Please Suggest Me...:)
score: 0
type: AnswerComment

http://stackoverflow.com/a/25231269
answers question: http://stackoverflow.com/q/25230249
upvote count: 1
score: 1
has body: http://plnkr.co/edit/Wu1mc0v5bbuoLkvvDb9V?p=preview JS: var app = angular.module('myApp', ['textAngular']); app.controller('AppCtrl', function($scope, $http) { $scope.htmlcontent = " New Note... "; $scope.save =function() { console.log( $scope.htmlcontent ); $http.post("/Home/SaveWNote", { jsonData: $scope.htmlcontent }); } }); HTML: Testing Save Your htmlcontent {{htmlcontent}}
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25230249
type: Answer

http://stackoverflow.com/comment/39414741
comment on: http://stackoverflow.com/a/25284510
type: Comment
has text: Brilliant! So we store the new starting co-ordinates each time we engage and then as the dragging continues we store the latest e.location to continue the line? Thank you.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39480615
score: 0
has text: Another related question: http://stackoverflow.com/questions/7826737/directly-reference-html-elements
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25325221

http://stackoverflow.com/a/25336072
has body: I don't think "True" is a valid javascript. &lt;script type="text/javascript"&gt; if( Boolean(@Html.Raw(Json.Encode(ProjectName.NameSpace.booleanVariable))) ) { doStuff(); } &lt;/script&gt; Boolean() is javascript code, to avoid the Razor Warning message. Json.Encode to convert booleanVariable to "true" or "false", you can replace it with (ProjectName.NameSpace.booleanVariable ? "true" : "false") I think what you really want is @if(ProjectName.NameSpace.booleanVariable) { {&lt;script type="text/javascript"&gt; doStuff(); &lt;/script&gt;} }
type: Answer
answers question: http://stackoverflow.com/q/25334986
has comment: http://stackoverflow.com/comment/39566859
accepted answer of: http://stackoverflow.com/q/25334986
has comment: http://stackoverflow.com/comment/39558130
has comment: http://stackoverflow.com/comment/39567059
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39567281

http://stackoverflow.com/comment/76401156
score: 0
has text: @wizardwerdna, Appreciate your comment, but can you create an actual answer to this question with sample code? It sounds like you're talking about an Angularjs-specific solution.
type: Comment
comment on: http://stackoverflow.com/a/25875795
type: AnswerComment

http://stackoverflow.com/q/25360510
has answer: http://stackoverflow.com/a/25414792
tagged with: knockout.js
has body: I have a question regarding to custom bindings. Here is the fiddle There you can see i have 4 custom bindings...everyone binded to the same boolean but every binding gets fired differently. Is this a Bug? This great post says is is fixed in 3.x ... i'm using 3.1.0 and it seems not fixed. My concrete Problem is: I want a custom binding, which only gets fired if the model changes and not if another binding changes. (binding four in the fiddle) ko.bindingHandlers.customFour = { update: function(element, valueAccessor, allBindingsAccessor) { var value = valueAccessor(); var allBindings = allBindingsAccessor(); console.log('customFour: why get i called on value change? I am not a value binding'); console.log(value()); console.log(allBindings.value()); } }; just look at the fiddle and run it...it says everthing ;) &lt;input data-bind="value: test, valueUpdate: 'afterkeydown', customFour: test2" /&gt; &lt;input type="checkbox" data-bind="checked: test2" /&gt; Can someone explain this behavior to me? thx!
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25361764
score: 0
answer count: 2
has title: knockoutjs: custom binding fired multiple times and on the wrong binding
type: UnansweredQuestion

http://stackoverflow.com/comment/39541896
type: Comment
type: QuestionComment
has text: Here is a similar [example](http://jsfiddle.net/karan3112/277xQ/). See if this helps.
comment on: http://stackoverflow.com/q/25359955
score: 0

http://stackoverflow.com/q/25259074
has title: Google Drive Realtime API offline and sync support
type: Question
upvote count: 4
tagged with: mobile
has answer: http://stackoverflow.com/a/25266587
downvote count: 0
tagged with: javascript
score: 4
answer count: 1
favorite count: 0
tagged with: google-drive-api
type: UnansweredQuestion
tagged with: web-applications
has body: I want to build a mobile web app with transparent offline and sync support for collaborative persistent data. I am considering using Google Drive Realtime API for the backend. How well is offline and sync supported by the API? Does it just work "automagically" from the included API scripts, or should I use some "plugin"? I have searched the documentation without luck. What I mean by offline and sync support is that, when offline, it should be possible to - edit the latest synced version of a document/object previously retrieved from the server - create new documents/objects - store all documents/objects locally As soon as the app goes online again, all modifications and new docs/objects stored locally should be "merged" or "synced" with the server versions.
tagged with: google-drive-realtime-api

http://stackoverflow.com/a/25266154
downvote count: 0
has body: Here is the working example: DEMO I have changed following things: 1) When you are creating the checkboxes then i have added class name to those checkboxes similar to UNIQUE_CODE $(document).on('change', '#select_company', function () { // declare variables before the function var select = $("#select_company option:selected").text(), selectedProfile, privileges, div, label, access; // remove access checkboxes from previously selected profile $('.apps input[type=checkbox]').remove(); $('.apps label').remove(); // if the selected option is 'None', do nothing, else... if (select !== 'None') { // match the selected profile in the dropdown with the JS PROFILES object for (var i = 0; i &lt; COMPANY_PRIVILEGES.length; i++) { if (COMPANY_PRIVILEGES[i].COMPANY_CODE === select) { selectedProfile = COMPANY_PRIVILEGES[i]; privileges = selectedProfile.UNIQUE_CODE; } } // match the associated privileges from the profile within the entire privilege list for (var j = 0; j &lt; privileges.length; j++) { for (var i = 0; i &lt; SEC_Privileges.length; i++) { if (privileges[j] === SEC_Privileges[i].Unique_Code) { // get the div with the id === SEC_Privileges[i].Group_code div = document.getElementById(SEC_Privileges[i].Group_Code); access = document.createElement('input'); access.type = 'checkbox'; access.className = SEC_Privileges[i].Unique_Code; label = document.createElement('label'); // create a textnode with the unique code from the privileges label.appendChild(document.createTextNode(SEC_Privileges[i].Name)); div.appendChild(label); div.appendChild(access); } } } } }); 2) Written simple function to check the checkbox based on the classname: $(document).on('change', '#select_profile', function () { var selectedValue = $("#select_profile option:selected").text(), selectedProfile, privileges, div, label, access; console.log(selectedValue); for (var i = 0; i &lt; PRIVILEGE_PROFILES.length; i++) { if (PRIVILEGE_PROFILES[i].PROFILE_ID === selectedValue) { privileges = PRIVILEGE_PROFILES…
answers question: http://stackoverflow.com/q/25265557
upvote count: 2
has comment: http://stackoverflow.com/comment/39369315
type: Answer
score: 2

http://stackoverflow.com/comment/39360459
type: Comment
has text: That's because JSFiddle has it's own onload-method, and the length/strip function becomes unavailable to the inner functions that I have used for `$ps`. Apply this code to your own project, and you'll see that it works.
comment on: http://stackoverflow.com/a/25261561
type: AnswerComment
score: 0

http://stackoverflow.com/a/25351053
type: Answer
has body: Just before the start of the .load, store the current time: startTime = new Date();. In the callback, get the current time again, and subtract the start time. You'll get the elapsed time in milliseconds.
accepted answer of: http://stackoverflow.com/q/25351025
score: 0
has comment: http://stackoverflow.com/comment/39525153
answers question: http://stackoverflow.com/q/25351025
type: AcceptedAnswer

http://stackoverflow.com/comment/39354397
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25258002
has text: I've been struggling to find what is the best and fastest loop over the internet most I see was using decrementing while loop. Now you are pointing out the standard for loop as the optimized and fastest? I am confused now, just a newbie :(.. learning coding standards.

http://stackoverflow.com/q/25351773
has comment: http://stackoverflow.com/comment/39527732
has comment: http://stackoverflow.com/comment/39526715
tagged with: xss
score: 0
has comment: http://stackoverflow.com/comment/39527958
has comment: http://stackoverflow.com/comment/39539005
has answer: http://stackoverflow.com/a/25352685
accepted answer: http://stackoverflow.com/a/25352685
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/21428259
has body: I have to secure a java web application against XSS attacks. There are parts of the code that look like this: &lt;script&gt; jsvariable = ${jspvariable} use(jsvariable) &lt;script&gt; My first tough was to do something like this: &lt;script&gt; jsvariable = ${fn:escapeXml(jspvariable)} use(jsvariable) &lt;script&gt; But escapeXml doesn't avoid XSS inside a script tag. What's the correct way to send a value from jsp to javascript.
has title: Safe way to send value from jsp to javascript
type: Question
answer count: 1
tagged with: jsp
tagged with: javascript

http://stackoverflow.com/comment/39439286
has text: @sebcap26 Why is it hard to maintain, and, what is simple module pattern?
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25303961
type: QuestionComment

http://stackoverflow.com/a/25230845
has comment: http://stackoverflow.com/comment/39302508
downvote count: 0
has comment: http://stackoverflow.com/comment/39302392
type: Answer
has comment: http://stackoverflow.com/comment/39302259
score: 1
has comment: http://stackoverflow.com/comment/39302525
upvote count: 1
has comment: http://stackoverflow.com/comment/39302244
has comment: http://stackoverflow.com/comment/39302368
has comment: http://stackoverflow.com/comment/39302597
answers question: http://stackoverflow.com/q/25230814
has body: &lt;?php echo $this-&gt;$i?&gt; Should actually be &lt;?php echo $this-&gt;i ?&gt; Without the $ sign for i

http://stackoverflow.com/q/25230507
has comment: http://stackoverflow.com/comment/39301645
downvote count: 0
score: 1
has body: I want a slider with content. but the content should appear only when mouse hover. This is the code I'm using: some text some text some text some text and the jquery 1.8.3 lib and this code $(document).ready(function(){ var currentPosition = 0; var slideWidth = 560; var slides = $('.slide'); var numberOfSlides = slides.length; // Remove scrollbar in JS $('#slidesContainer').css('overflow', 'hidden'); // Wrap all .slides with #slideInner div slides .wrapAll(' ') // Float left to display horizontally, readjust .slides width .css({ 'float' : 'left', 'width' : slideWidth }); // Set #slideInner width equal to total width of all slides $('#slideInner').css('width', slideWidth * numberOfSlides); // Hide left arrow control on first load manageControls(currentPosition); // manageControls: Hides and Shows controls depending on currentPosition function manageControls(position){ if(position >= 4) { position=0; currentPosition=0; } // Hide left arrow if position is first slide if(position==0){ $('#leftControl').hide() } else{ $('#leftControl').show() } // Hide right arrow if position is last slide if(position==numberOfSlides-1){ $('#rightControl').hide() } else{ $('#rightControl').show() } } function Aplay(){ // Determine new position currentPosition = currentPosition+1 ; // Hide / show controls manageControls(currentPosition); // Move slideInner using margin-left $('#slideInner').animate({ 'marginLeft' : slideWidth*(-currentPosition) }); setTimeout(function(){Aplay();},2000); } setTimeout(Aplay(),20000); }); now the some text should appear only when mouse hover, example: http://www.backslash.gr/demos/contenthover-jquery-plugin/#demo4
type: Question
has title: How to create span content on mouse hover?
has answer: http://stackoverflow.com/a/25230677
accepted answer: http://stackoverflow.com/a/25230677
possible better answer: http://stackoverflow.com/a/25230676
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25230888
answer count: 3
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/25230676
tagged with: css
type: AnsweredQuestion

http://stackoverflow.com/q/25370594
type: Question
has comment: http://stackoverflow.com/comment/39564417
linked to: http://stackoverflow.com/q/25005897
tagged with: javascript
has answer: http://stackoverflow.com/a/25370968
answer count: 3
has answer: http://stackoverflow.com/a/27652386
score: 2
downvote count: 0
has body: I'm learning AngularJS and in all tutorials and screencasts I always saw to use angular writing code all in a unique file, example directives, controllers, factories etc... Logically for large applications, you will split out the code, make it maintainable and flexible in multiple files and also we should be careful about how many &lt;script&gt; tags we have to require to let our JavaScript files run correctly. I would like to know which is the best practice to require files when needed, importing less javascript files possible in my view. I took a look at RequireJs but it seems a bit complicated to use it. Is there some tool more efficient and easy to use? Or any good resource to get started? A small example can be that I have a sort of plugin that has been built using directives, controllers and factories: app-| --Controllers |_ pluginController.js --Directives |_ pluginDirective.js --Factories |_ pluginFactory.js Instead of requiring all three files how do you make it work?
favorite count: 0
has comment: http://stackoverflow.com/comment/39562174
tagged with: angularjs
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39562460
has title: AngularJs Load dependencies files
has answer: http://stackoverflow.com/a/25370767

http://stackoverflow.com/comment/92678427
comment on: http://stackoverflow.com/a/25345121
has text: Thank you @Oriol! I like more your second approach; I think it's more robust, although I'm not sure if it is as efficient as the first solution (I think it is). The first solution doesn't handle the case when start and end indices are the same.
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/a/25338160
answers question: http://stackoverflow.com/q/25280338
type: Answer
downvote count: 0
score: 1
has body: Well I use another method see for yourself this is the server side script of the old datatables static function data_output($columns, $data) { $out = array(); for ($i = 0, $ien = count($data); $i < $ien; $i++) { $row = array(); for ($j = 0, $jen = count($columns); $j < $jen; $j++) { $column = $columns[$j]; if ( $aColumns[$i] == "cId" ){ /* Special output formatting for 'cId' column */ $row[] = ' '; } } }
upvote count: 1

http://stackoverflow.com/comment/39370842
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25265593
has text: I would use `label` instead of `button` and you wouldn't need the `ng-mousedown` since label will always change `checkbox`
score: 0

http://stackoverflow.com/comment/39543875
type: QuestionComment
comment on: http://stackoverflow.com/q/25361358
score: 0
type: Comment
has text: Use like this $(document).on('click','.month-task', function(e) {

http://stackoverflow.com/comment/39499671
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25335970
has text: I'm not going to think about that right now but anything is possible. Are we talking about best practice or just answered a little newbie question. My concern is that, there are so many ways to do that, use one or another bur this is nothing so much serious, I'm leaving it here. My answer is not wrong either, anyways. All the best :-)

http://stackoverflow.com/comment/39514047
score: 0
comment on: http://stackoverflow.com/q/25344573
has text: that could work dependences on what is in my.php. and that the page is php parsed. the other alternative is ajax
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25347840
type: Answer
score: 2
downvote count: 0
has body: This will do the work: EDITED CODE var delay=100; $('nav [class^=icon-]').each(function(counter){ //counter will start from 0.. timeout = delay * (counter + 1); var selector = $(this); setTimeout(function(){ selector.toggleClass('colorHigh'); }, timeout); }); DEMO
upvote count: 2
answers question: http://stackoverflow.com/q/25347724

http://stackoverflow.com/q/25340860
has title: Why XMPP client using strophe.js still working with out including flXHR.js?
tagged with: xmpp
type: AnsweredQuestion
has body: I am using ejabberd as XMPP server,one of our project need to have a xmpp web client,for that i am referring Professional "XMPP Programming with JavaScript and jQuery" by jake moffitt i was going through chapter 3 hello world application ,here in order to make xmpp web client using strophe i have to include creating java script file such as strophe.js,flXHR.js,and strophe.flxhr.js i have gone through example many time but failed to connect with the server, when i checked bosh connection using localhost:5280/http-bind it is working fine!!!!! with try and error when i try to connect with xmpp server with removing flXHR.js ,it magically got connected to xmpp server!!!!! FLxhr.js is used for making cross domain call as per book" Flash has a strict security policy, but unlike JavaScript, it allows cross-domain requests to be sent to domains that permit such requests." If i bypass above FLxhr.js i have to use a proxies i am using apache tomcat as web-app server ,i haven't setup any proxies and not included FLxhr.js file in my html page ,but still xmpp client is able to communicate with server!! Can some one please explains me what is the reason behind this?? thanks in advance!!
type: Question
score: 1
accepted answer: http://stackoverflow.com/a/25367929
upvote count: 2
tagged with: flash
downvote count: 1
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25367929
tagged with: strophe
favorite count: 0

http://stackoverflow.com/a/25378097
score: 0
has comment: http://stackoverflow.com/comment/54832722
has body: To clip a single image, try this:- fabric.Image.fromURL('http://fabricjs.com/assets/pug_small.jpg', function(img) { img.scale(0.5).set({ left: 100, top: 100, angle: -15, clipTo: function (ctx) { path.render(ctx); } }); canvas.add(img).setActiveObject(img); }); Note: I'd use var myPath = xxxx instead since 'path' is too close to SVG's path
type: Answer
answers question: http://stackoverflow.com/q/25374512

http://stackoverflow.com/comment/39512062
comment on: http://stackoverflow.com/a/25342867
score: 0
type: AnswerComment
type: Comment
has text: Thanks a lot for taking the pain to read the entire code and for your patience to reply with such elaborate details. I'll correct all those points you've mentioned. I've just started learning jQuery and have never used a fiddle. Can you tell me how to see the error messages in console ?

http://stackoverflow.com/comment/39470754
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25321041
has text: then there is always F12, youre browsers debugger, look at console for errors and fix them / google them .. good luck
score: 0

http://stackoverflow.com/q/25284870
answer count: 1
accepted answer: http://stackoverflow.com/a/25284886
tagged with: regex
type: AnsweredQuestion
has title: Regex: Replace Parentheses in JavaScript code with Regex
score: 0
has body: Need to remove spaces, single quotes, and parens from a string displayed in as an &lt;li&gt; This works great for the first two: var foo = li.replace(/\s|\'+/g, ""); I assumed all I needed to do was add another few ORs to this, escaping the ( or ) symbols to search for them: var foo = li.replace(/\s|\'+/g|\(|\), ""); Compiler no likey: Uncaught SyntaxError: Unexpected token ILLEGAL It appears the the that the open and closing paren are getting evaluated anyway - even with the escape symbols. What am I doing wrong here? Thanks!
has answer: http://stackoverflow.com/a/25284886
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39309549
type: QuestionComment
score: 0
has text: @Raghunandan. Sorry there is a `{` before `"Name":"Amal"`...It is a valid json...
comment on: http://stackoverflow.com/q/25231864
type: Comment

http://stackoverflow.com/a/25377390
answers question: http://stackoverflow.com/q/25377263
has body: You only set your variable once before the active class exists, and you never update it when you click, so the variable never gets set. If you try something like this it should work: http://jsfiddle.net/9ysez54j/ In your click functions: $('body').trigger('updateCurrent'); And then you can have something like this: $('body').on('updateCurrent', function() { // Selecting the Current Div Width, Height and Id Name var currentDivWidth = $('.activeDiv').width(); var currentHeight = $('.activeDiv').height(); var currentDivId = $('.activeDiv').attr('id'); alert(currentDivId); });
score: 0
type: Answer

titanium
type: Tag
tags question: http://stackoverflow.com/q/25365262
tag name: titanium
tags question: http://stackoverflow.com/q/25266834
tags question: http://stackoverflow.com/q/25267803
tags question: http://stackoverflow.com/q/25257375
tags question: http://stackoverflow.com/q/25239843
tags question: http://stackoverflow.com/q/25335666

http://stackoverflow.com/comment/64525650
type: Comment
has text: Thanks for your suggestions! I got a minor problem in fetching the attachments. I introduced a new variable af instead of f when fetching the attachments and calling buildAttMessageFunction(). However, unfortunately the af.on('message', ...) callback is never executed. Did anyone else have this issue? I tried to debug the lib by looking at the commands --> by using plain telnet it works! Just the callback is somehow not called/message-event not fired
comment on: http://stackoverflow.com/a/25281153
type: AnswerComment
score: 0

instantiation
type: Tag
tags question: http://stackoverflow.com/q/25360130
tag name: instantiation

http://stackoverflow.com/a/25443797
score: 0
has body: It was actually pretty simple: &lt;?php $thumb_id = 1; $url = wp_get_attachment_url( get_post_thumbnail_id($thumb_id) ); ?&gt; &lt;script&gt; $("#divname").backstretch("&lt;?php echo $url ?&gt;"); &lt;/script&gt;
type: Answer
accepted answer of: http://stackoverflow.com/q/25383000
answers question: http://stackoverflow.com/q/25383000
type: AcceptedAnswer

http://stackoverflow.com/comment/39469112
type: Comment
type: QuestionComment
has text: Are you asking if the data design is good or if the syntax is valid? By the way this is not JSON, it's a JavaScript object literal
score: 1
comment on: http://stackoverflow.com/q/25320189

http://stackoverflow.com/comment/39349791
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25255484
has text: AWESOME! that worked Arun! Ugh sooo simple! I believe that was inline with Jane's suggestion also same idea atleast. I think both would work. Just happened to try Arun's first.
score: 0

http://stackoverflow.com/comment/39455979
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25313041
type: Comment
has text: I meant is it a good design principle?

http://stackoverflow.com/a/33299001
answers question: http://stackoverflow.com/q/25313924
type: Answer
has body: I had a similar problem, I removed my format and it worked. I think your format is invalid. Try: ui-date-format="yy-MM-dd"
score: 0

http://stackoverflow.com/comment/39589148
has text: Thank you, but this doesn't work. When I try to inject to all services I get this: Uncaught Error: Cannot inject a `service:debug` on other service(s). Register the `service:debug` as a different type and perform the typeInjection.
type: Comment
comment on: http://stackoverflow.com/a/25375194
score: 1
type: AnswerComment

http://stackoverflow.com/comment/39399242
score: 0
has text: i dont see a `clearinterval` in the fiddle
type: Comment
comment on: http://stackoverflow.com/q/25282840
type: QuestionComment

http://stackoverflow.com/comment/39459214
comment on: http://stackoverflow.com/q/25311856
type: Comment
type: QuestionComment
has text: Since you have Ajax disabled, DOM will be wiped and a fresh page will be loaded.
score: 0

http://stackoverflow.com/a/25288818
has body: Move myData.answers = new Array(); out of the click event handler. You're reseting the array every time you click the link: myData.answers = new Array(); $("a").on('click', function(){ myAns = //etc
type: Answer
answers question: http://stackoverflow.com/q/25288788
has comment: http://stackoverflow.com/comment/39410516
has comment: http://stackoverflow.com/comment/39410429
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25288788

http://stackoverflow.com/q/25314611
has comment: http://stackoverflow.com/comment/39458722
tagged with: parse-platform
upvote count: 2
has comment: http://stackoverflow.com/comment/39459431
tagged with: php
has answer: http://stackoverflow.com/a/25315008
answer count: 1
has comment: http://stackoverflow.com/comment/39459189
has comment: http://stackoverflow.com/comment/39459070
has comment: http://stackoverflow.com/comment/39459124
tagged with: global-variables
has comment: http://stackoverflow.com/comment/39459507
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39458804
downvote count: 0
accepted answer: http://stackoverflow.com/a/25315008
tagged with: javascript
has comment: http://stackoverflow.com/comment/39459047
favorite count: 0
linked to: http://stackoverflow.com/q/2932782
type: Question
has comment: http://stackoverflow.com/comment/39458828
tagged with: http://stackoverflow.com/tag/html
has title: Accessing javascript variables across html files
has body: I am trying to use my js file to hold all of my variables that I will use across my html files to either update or retrieve the values. I feel silly because I was able to access the helpers.js variables from my index.html file but not my mainMenu.html. Any help would be greatly appreciated. I am trying to get the first name of the user to my mainMenu.html. I tried following this link as a reference but I am stuck: [Global variables in Javascript across multiple files My js file with all of the variables I will be referencing: 'helpers.js' var companyName = ""; var firstName = ""; var lastName =""; var clientOrEmployee =""; var online = ""; var offline = ""; function setFirstName(val){ firstName = val; } function getFirstName(){ return firstName; } My html file that is WORKING PROPERLY and acts as a login page. It shows that the information was entered in correctly (1 score matched), then it shows the company, user status, user first name and last name, and then it shows the first name as it is referenced by the helpers.js file, followed by how many online and offline information they have. 'index.html' X2nSat Login Email: <?php echo $emailErr;?> Password: <?php echo $nameErr;?> <id= "footer"> Copyright &#169 Inc. PROBLEMS: Everything is great UP TO THIS POINT... then I try to reference the helpers.js file in my mainMenu.html file and is giving me the value of 'undefined' as the user's first name. How is this possible? What am I missing??? 'mainMenu.html' X2nSat Home Sites Usage Contact Log Out Site Report Welcome Can anyone help me out to why this file is having a hard time accessing the helpers.js getFirstName() function? Thank you in advance!!!!! P.S. Please let me know if you need me to clarify anything!!!!

http://stackoverflow.com/q/25325055
tagged with: javascript
has comment: http://stackoverflow.com/comment/39477937
score: 0
has title: Google Play allow downloading code?
has body: We have planned to design a Android app to manage/download/execute/delete a zip archive file. Basically, that's html5 css javascript image To run that archive file as a independent entity. I've heard from my colleagues that Apple Store would have DENY this sort of code. Do you think it's doable for Google Play?
has comment: http://stackoverflow.com/comment/39478129
type: UnansweredQuestion
tagged with: android
has comment: http://stackoverflow.com/comment/39780804
answer count: 0
tagged with: web-applications
tagged with: policy
type: Question

http://stackoverflow.com/comment/39450475
type: Comment
has text: You don't need `success` or `highlight` as you're not doing anything different than the default. By default, the plugin will apply and remove the error class and show/hide the label. BTW- the error class is removed with `unhighlight`, not `success`.
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25305400

http://stackoverflow.com/q/25364901
tagged with: highcharts
tagged with: javascript
has answer: http://stackoverflow.com/a/25365110
score: 0
has comment: http://stackoverflow.com/comment/39550670
has body: See the demo link hereSample $(function () { $('#container').highcharts({ &lt;some codes&gt; plotOptions: { column: { stacking: 'normal', dataLabels: { enabled: true, color: (Highcharts.theme &amp;&amp; Highcharts.theme.dataLabelsColor) || 'white' } } }, series: [{ name: 'John', data: [5, 3, 4, 7, 2] }, { name: 'Jane', data: [2, 2, 3, 2, 1] }, { name: 'Joe', data: [3, 4, 4, 2, 5] },{ name: 'indicator', data: [5], type: 'scatter', marker:{ //here you can have your url symbol: 'circle', } }] }); }); I am trying to align the scatter plots which currently center aligned respective to the column chart. I want those to be right aligned respective to the column chart
has answer: http://stackoverflow.com/a/25365072
accepted answer: http://stackoverflow.com/a/25365072
has title: Align scatter plot to right side in highcharts
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25365110
type: Question
answer count: 2

http://stackoverflow.com/a/25264919
upvote count: 13
type: Answer
score: 13
downvote count: 0
has body: To stop event propagation, use: stopPropagation $( "#test1" ).on( "click", function(ev) { ev.stopPropagation(); }); $('#test1').trigger('click'); Please note the order events are assigned in DOM. Demo
answers question: http://stackoverflow.com/q/25264726

http://stackoverflow.com/q/25368393
tagged with: javascript
has answer: http://stackoverflow.com/a/25415132
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has body: I have an image carousel built using knockout &amp; jquery. To animate the slides I really want to use CSS transitions and NOT jquery animate. I have this nearly working but I have an issue. In the code below, the 'slideRight' part doesn't work, however the else part works fine. What's happening is the transition to margin-left 0 is being skipped, even though the transition class has been added. if (slideRight) { $(requestedElement).insertBefore(currentElement); slideContainer.css('margin-left', -$(self.carousel).width()); slideContainer.addClass('transition'); slideContainer.css('margin-left', 0); } else { $(requestedElement).insertAfter(currentElement); slideContainer.addClass('transition'); slideContainer.css('margin-left', -$(self.carousel).width()); } I've created a JSFiddle here: http://jsfiddle.net/vnw57nx0/2/ As you'll see in the fiddle, the carousel transitions nicely between slides going right to left. But if you find this line in the javascript: self.setIndex(self.currentIndex() + 1); and change it to: self.setIndex(self.currentIndex() - 1); the slides should cycle in reverse. They do, but they're not being animated. Interestingly, if I debug the script and step through it works fine. This made me think it was a timing issue and maybe I need to use a callback function but jquery .insertBefore, .css and .addClass are all synchronous. Any ideas how I can fix this code that works if I debug but doesn't if I don't?
has comment: http://stackoverflow.com/comment/39603641
has comment: http://stackoverflow.com/comment/39558584
has comment: http://stackoverflow.com/comment/39557763
accepted answer: http://stackoverflow.com/a/25415132
tagged with: css
has title: How can I ensure this CSS transition animates
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39558346
upvote count: 3
has comment: http://stackoverflow.com/comment/39558744
tagged with: knockout.js
tagged with: transition
type: Question
score: 3
has comment: http://stackoverflow.com/comment/39557835

http://stackoverflow.com/q/25234604
tagged with: javascript
tagged with: ajax
has body: I have the following code to make requests for information from the server and display the response: var ajax=new XMLHttpRequest(); ajax.onreadystatechanged=function(){ if(ajax.readyState==4){ if(ajax.status==200){ window.alert(ajax.responseText); } } } ajax.open("GET",url,true); ajax.send(null); I have executed the code in the debugger and validated the url is correct, which in my test is just example.html. There are 2 problems I can see: When I log the HTTP headers, only about 25% of the time do I see a request for the page When a response is sent back, it is always a 304 status code (although I imagine I just need to turn off caching for that file), but also, the onreadystate method is never called, for any of the readyStates Any help would be appreciated. EDIT Number 2 is figured out, I disabled caching and changed onreadystate to onreadystatechanged. But number 1 is still occuring.
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
has title: Issues with AJAX request and response
type: Question
downvote count: 0

http://stackoverflow.com/q/25234607
accepted answer: http://stackoverflow.com/a/25234638
has answer: http://stackoverflow.com/a/25234638
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25234636
type: Question
tagged with: if-statement
tagged with: function
tagged with: javascript
has answer: http://stackoverflow.com/a/25234868
has title: How Would I Make an If Statement From Arguments in Javascript?
has body: I need to pass certain parameters into a function and have that function pull from an array based on the arguments passed to it. It's hard to explain, so I'll show you what I'm trying to do. function SearchDeck(deck,...){ var tryagain = true; do{ if(deck[0].property == value){ //do something; tryagain = false; } else{ deck.splice(0,1); } } while(tryagain); } There are multiple decks to look in, the proper deck will be passed in. I want to always be drawing off the top of the deck (index 0 of the array). I need to draw continuously until I find a card that matches what I'm after. I splice out the 0 index if it doesn't match. What I'm after is dynamic, varying across the properties or even the operators I would use. Some examples of if statements I would have are... deck[0].color == "orange" deck[0].value &gt;= 5 deck[0].value &lt; -4 I could make multiple functions or have the function fork based on an argument, but that doesn't seem like the best way to go about this.
score: 0
has comment: http://stackoverflow.com/comment/39311220
answer count: 3
has answer: http://stackoverflow.com/a/25234636

http://stackoverflow.com/comment/39580954
type: Comment
has text: @stackOverFlow try ` Kids`
comment on: http://stackoverflow.com/a/25380460
type: AnswerComment
score: 0

http://stackoverflow.com/a/25303519
has comment: http://stackoverflow.com/comment/39441748
upvote count: 0
has comment: http://stackoverflow.com/comment/39441027
has comment: http://stackoverflow.com/comment/39442060
type: Answer
score: -1
has comment: http://stackoverflow.com/comment/39441425
has comment: http://stackoverflow.com/comment/39441617
answers question: http://stackoverflow.com/q/25303445
has comment: http://stackoverflow.com/comment/39442197
has comment: http://stackoverflow.com/comment/39440559
has comment: http://stackoverflow.com/comment/39439608
has body: $('#1234567890').removeClass('hyper').addClass('success'); $('#1234567890 &gt; div').removeClass('mine').addClass('sura'); $('#1234567890 &gt; div &gt; img').attr('src', 'naa.png') OR $('#1234567890').removeClass('hyper').addClass('success').html('&lt;div class="sura"&gt;&lt;img src="naa.png"/&gt;&lt;/div&gt;');
downvote count: 1
has comment: http://stackoverflow.com/comment/39440679
has comment: http://stackoverflow.com/comment/39440179
has comment: http://stackoverflow.com/comment/39441162

http://stackoverflow.com/comment/39591183
type: QuestionComment
has text: Add this into the question
comment on: http://stackoverflow.com/q/25386032
score: 0
type: Comment

http://stackoverflow.com/a/25278302
has comment: http://stackoverflow.com/comment/39391018
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39391058
answers question: http://stackoverflow.com/q/25278271
has comment: http://stackoverflow.com/comment/39390943
downvote count: 0
has comment: http://stackoverflow.com/comment/39390950
upvote count: 2
has comment: http://stackoverflow.com/comment/39390993
has comment: http://stackoverflow.com/comment/39390937
has body: so I was thinking that String.fromCharCode(17) === "" would return true. But it returns false. Why? String.fromCharCode(17) returns device control 1, which seems to be an unprintable character. The reason it fails the condition is because it is not an empty string. String.fromCharCode(17) === String.fromCharCode(17) would return true.

http://stackoverflow.com/comment/39603787
comment on: http://stackoverflow.com/q/25388369
has text: @Peepe L-G: this is somehow somewhere set as an equivalent to Course.findOne. That's why the console.log works
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25730565
score: 15
accepted answer of: http://stackoverflow.com/q/25265667
has comment: http://stackoverflow.com/comment/49872766
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25265667
has body: If your form is NOT structured by Bootstrap classes (the element containing field and associated label does NOT have form-group class), you will see the error : Uncaught RangeError: Maximum call stack size exceeded Reference : Maximum call stack size exceeded error warning in the official docs.
type: Answer
upvote count: 15
has comment: http://stackoverflow.com/comment/49880119
downvote count: 0
has comment: http://stackoverflow.com/comment/49880081

infinite-scroll
tag name: infinite-scroll
tags question: http://stackoverflow.com/q/25360639
type: Tag
tags question: http://stackoverflow.com/q/25297634
tags question: http://stackoverflow.com/q/25238971

http://stackoverflow.com/comment/39911441
score: 1
has text: Please consider including some information about your answer, rather than simply posting code. We try to provide not just 'fixes', but help people learn. You should explain what was wrong in the original code, what you did differently, and why your change(s) worked.
type: AnswerComment
comment on: http://stackoverflow.com/a/25294396
type: Comment

http://stackoverflow.com/q/25379169
type: UnansweredQuestion
has body: I am embedding the PDF in a web page using java script. var addEmbededPdf = function() { var pdfContainer = document.getElementById('pdfContainer'); pdfContainer.innerHTML = '&lt;embed src="' + $scope.pdfpath + '" scrolling="no" frameborder="0" width="100%" height="600px"&gt;&lt;/embed&gt;'; }; Two things here. Adding the PDF through the Java script The PDF being added also has java script associated with the document The generated PDF has some back end Java script which works perfectly when document is opened through the Acrobat/Adobe reader. When I the pdf in my web page the java script associated with the PDF is not working. I think Is there any way to change so that Java script associated with my PDF works fine.
has comment: http://stackoverflow.com/comment/39578119
tagged with: http://stackoverflow.com/tag/pdf
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25696176
has title: Java script associated with the PDF document not working in a web page
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39578069
has answer: http://stackoverflow.com/a/25379840
score: 0
has comment: http://stackoverflow.com/comment/39578436
tagged with: javascript

http://stackoverflow.com/q/25257863
has body: Well I am unable to lazy load images for some reason. Here is the waterfall view of the tested site Apparently I am using two lazy load scripts with lazy load script 1 which works but kills the lightbox plugin and also requires lots of tweaking using data-src and src and class="lazy-load" attributes. which I am using for non post related images. But the main problem lies in the second script which requires Jquery but doesn't require any tweaking with the images. The script is called stalactite (via Github) which I am using like this You can find the link of the stalactite script in the above code and here is the documentation. I don't know why it doesn't work ! Or am I executing it wrongly. A solution to the problem will be very helpful. Many thanks in advance.
has title: Unable to Lazy load Images
tagged with: lazy-loading
has comment: http://stackoverflow.com/comment/39355144
type: Question
has comment: http://stackoverflow.com/comment/39355004
tagged with: javascript
score: 0
upvote count: 1
downvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/41721616
type: UnansweredQuestion

http://stackoverflow.com/comment/39435292
type: QuestionComment
has text: @DavidThomas: A solution that should get the accurate min and max values. If you see my array you may find aplhabets and $ symbol which should get ignore. but the price range $0-$4000 should not get ignored
score: 0
comment on: http://stackoverflow.com/q/25301831
type: Comment

http://stackoverflow.com/a/25324748
type: Answer
answers question: http://stackoverflow.com/q/25324715
has body: You selectors are slightly out, try: $("body :not(.special)").click(function () { alert('test'); });
score: 0

http://stackoverflow.com/comment/39480137
type: Comment
type: QuestionComment
has text: @slebetman: OK, technically: Use an IIFE to give the closure its own parent scope. (without closure, callbacks wouldn't work well)
comment on: http://stackoverflow.com/q/25325037
score: 0

http://stackoverflow.com/comment/39634797
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25384569
type: AnswerComment
has text: Thank you, in the end with the callback stuff and with waiting for the page to be loaded it was too complicate, I just placed the initializer as a static call in the headers, so my coffeescript/jquery implicitily waits for it to be load when I do `$ -> ...` thanks

http://stackoverflow.com/comment/39437087
has text: I read everything you wrote a couple times. It wasn't entirely clear what you were asking. So is your question: "Why doesn't my code for dynamically inserting style sheets work?". I don't see anything wrong with your code for adding a stylesheet so I think there must be something else wrong with your logic/code that you aren't showing us.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25297322
type: Comment

http://stackoverflow.com/comment/39480321
comment on: http://stackoverflow.com/a/25321033
has text: Thanks Timothy, the limit is respected using find instead of each.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25284256
tagged with: d3.js
type: UnansweredQuestion
tagged with: datetime
has answer: http://stackoverflow.com/a/28800030
has title: how to set proper domain for date time scale in d3
has comment: http://stackoverflow.com/comment/39403037
has answer: http://stackoverflow.com/a/25533255
score: 1
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39402594
has body: Am trying to build a scatter plot with the following data: [ {"frequency": 10, "date": "2014-01-01"}, {"frequency": 20, "date": "2014-01-02"}, {"frequency": 30, "date": "2014-01-03"} ] Am plotting "date" on x-axis and frequency on y-axis. Am using "d3.time.scale" on x-axis. The problem is scale and ticks start on x-axis right from origin and because of this i get plots starting right on my y-axis. In order to solve this, i tried adding the day before and day after i.e., "2013-12-31" &amp; "2014-01-04" to the x-axis domain (using "d3.time.day.offset" function). The above code works if given time series are in days intervals. If my data is in months interval like this: [ {"frequency": 10, "date": "2014-01-01"}, {"frequency": 20, "date": "2014-02-02"}, {"frequency": 30, "date": "2014-03-03"} ] The above code will not work. I have to use "d3.time.month.offset" function instead. Is there a way to know what interval the given time series is in and use the appropriate offset. (i.e., "d3.time.month.offset", "d3.time.year.offset", "d3.time.day.offset", etc). Thanks
answer count: 2
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/25323162
possible better answer: http://stackoverflow.com/a/25323973
has answer: http://stackoverflow.com/a/25323973
accepted answer: http://stackoverflow.com/a/25324323
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/39475024
score: 2
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1114024
has comment: http://stackoverflow.com/comment/39475311
has answer: http://stackoverflow.com/a/25324323
type: Question
tagged with: ecmascript-6
has body: To create a map in ES6, should you say Map() or new Map()? Both seem to work fine in node --harmony. The draft spec says "The Map constructor is the %Map% intrinsic object and the initial value of the Map property of the global object. When Map is called as a function rather than as a constructor, it initializes its this value with the internal state necessary to support the Map.prototype built-in methods." which also seems to suggest they should both work. Given that, Map() would seem better because shorter, though that's a subjective judgment; objectively they seem interchangeable?
answer count: 2
has comment: http://stackoverflow.com/comment/39474996
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39475618
has title: EcmaScript 6 Map() vs new Map()
tagged with: ecmascript-harmony

http://stackoverflow.com/q/25328120
tagged with: canvas
answer count: 1
has comment: http://stackoverflow.com/comment/39484544
has comment: http://stackoverflow.com/comment/39484081
has body: When i call writeTextToCanvas method before clearCanvas method, it works perfectly, if i call clearCanvas method first than writeTextToCanvas, it doesn't works, drawing functions etc. all works after clearCanvas but fillText doesn't work and also clears all canvas when i call fillText when i set context.globalAlpha = 0.5 before fillText, i can barely see text on the canvas but anything in canvas erased somehow var canvas; var context; var selectedRole = DRAW_TOOLS.PENCIL; function initDrawingCanvas(index) { var question = document.getElementsByClassName('question').item(index); canvas = question.getElementsByClassName('questionDrawingCanvas').item(0); context = canvas.getContext("2d"); canvasWidth = canvas.width; canvasHeight = canvas.height; compositeOperation = context.globalCompositeOperation; canvas.addEventListener("touchmove", onCanvasTouchMove, false); canvas.addEventListener("touchstart", onCanvasTouchStart, false); canvas.addEventListener("touchstop", onCanvasTouchStop, false); } var startX = 0; var startY = 0; var endX = 0; var endY = 0; var compositeOperation; function onCanvasTouchMove(event){ endX = event.changedTouches[0].clientX - $(canvas).offset().left; endY = event.changedTouches[0].clientY - $(canvas).offset().top; if(selectedRole == DRAW_TOOLS.PENCIL){ context.beginPath(); context.moveTo(startX, startY); context.lineTo(endX, endY); context.strokeStyle = $('.colorPicker').css('background-color'); context.lineWidth = parseInt($('#pencilSize').attr("data-size")); context.stroke(); }else if(selectedRole == DRAW_TOOLS.ERASER){ context.save(); context.globalCompositeOperation = "destination-out"; context.arc(endX,endY,25,0,Math.PI*2,false); context.fill(); context.restore(); } startX = endX; startY = endY; } function onCanvasTouchStart(event){ $("#colorPicker").css("display", "none"); $("#pencilSize").css("display", "none"); $("#textColorPicker").css("display", "none"); $("#canvas_textSize").css("display", "none"); startX = event.changedTouches[0].page…
has title: HTML5 Canvas why fillText() method clears everything after clearRect()
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39484366
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25328431
score: 0
type: Question
accepted answer: http://stackoverflow.com/a/25328431
tagged with: javascript

http://stackoverflow.com/a/25338505
has body: Your 'array' is not an array, but an object: { 'user-750': {xp: 2085} 'user-681': {xp: 2051} ... } If you want to sort, you need an array of objects: [ {id: 'user-750', xp: 2085}, {id: 'user-681', xp: 2051}, ... ] That array of objects should be sortable. Here's a home brew sorter method I use for sorting (demonstrated in this jsFiddle): function sorter(sortOn,descending) { sortOn = sortOn &amp;&amp; sortOn.constructor === Object ? sortOn : {}; return function ( a, b ) { if (sortOn.string || sortOn.numeric || sortOn.key) { a = sortOn.key ? a[sortOn.key] : a; a = sortOn.string ? String(a) : sortOn.numeric ? +a : a; b = sortOn.key ? b[sortOn.key] : b; b = sortOn.string ? String(b) : sortOn.numeric ? +b : b; if (sortOn.key &amp;&amp; (!b || !a)) { //empty values on top return !a &amp;&amp; !b ? 1 : !a ? 1 : -1; } } return descending ? (a &lt; b ? 1 : a &gt; b ? -1 : 0) : (a &lt; b ? -1 : a &gt; b ? 1 : 0); }; } // usage arr = arr.sort( sorter({key: 'xp', numeric: 1}, true) );
downvote count: 0
answers question: http://stackoverflow.com/q/25338424
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25338424

http://stackoverflow.com/comment/39581023
has text: The property `style.left` is not a number, it's a string terminated by `"px"`.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25380889
score: 0

http://stackoverflow.com/q/25385911
has title: Nashorn NativeDate conversion to java.util.Date
possible better answer: http://stackoverflow.com/a/37553324
type: Question
upvote count: 4
tagged with: nashorn
accepted answer: http://stackoverflow.com/a/25416877
has answer: http://stackoverflow.com/a/37553324
downvote count: 0
has answer: http://stackoverflow.com/a/44927526
tagged with: javascript
tagged with: date
score: 4
answer count: 3
linked to: http://stackoverflow.com/q/33110942
has body: When returning Javascript Date objects to Java with Nashorn on Java 8 like so: ScriptEngineManager factory = new ScriptEngineManager(); ScriptEngine engine = factory.getEngineByName("nashorn"); Object js = engine.eval("new Date();"); With the following attempts I get exceptions: Date javaDate = (Date)js; jdk.nashorn.api.scripting.ScriptObjectMirror cannot be cast to java.util.Date Date javaDate = js.to(Date.class); Cannot cast jdk.nashorn.internal.objects.NativeDate to java.util.Date Date javaDate = (Date)ScriptUtils.convert(js.to(NativeDate.class), Date.class); Cannot cast jdk.nashorn.internal.objects.NativeDate to java.util.Date Back with Rhino I was simply using context.jsToJava(nativeDateObj, Date.class);. Any ideas how I can actually cast this NativeDate when it's returned to Java? P.S. If I do js.toString() then it gives me "[Date 2012-01-01T19:00:00.000Z]". I guess I could regex parse that ... but why-oh-why ...
favorite count: 0
has answer: http://stackoverflow.com/a/25416877
type: AnsweredQuestion
tagged with: java

http://stackoverflow.com/a/43728394
downvote count: 2
upvote count: 7
score: 5
has comment: http://stackoverflow.com/comment/127530738
has comment: http://stackoverflow.com/comment/125816411
type: Answer
answers question: http://stackoverflow.com/q/25384360
has body: UPDATE: 2021 There are many other libs that you may want to checkout: https://date-fns.org https://github.com/iamkun/dayjs ORIGINAL ANSWER: Seems like the proper modular moment library will never come up However, I just ended up of using https://github.com/ksloan/moment-mini like import * as moment from 'moment-mini';

http://stackoverflow.com/comment/39314572
has text: have you tried moving your Session.clear(); and Session.Abandon(); to logout page (i.e after redirect) ?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25236946

http://stackoverflow.com/a/25297266
accepted answer of: http://stackoverflow.com/q/25297253
type: Answer
upvote count: 1
has body: Do this instead if (isNaN(val1 * val2))
score: 1
answers question: http://stackoverflow.com/q/25297253
has comment: http://stackoverflow.com/comment/39426899
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/33790666
downvote count: 0
type: AcceptedAnswer
has body: The problem with JCHOptimize is that it's hard to get it to increase your Google PageSpeed Insights rankings on your website without it breaking other stuff. In order to address these issues, you will need to work on 2 areas, CSS and JavaScript. For the CSS, you will need to split your main CSS file to 2 parts: The first part is the one that you will absolutely need to make your website look well when it first loads (for example, the width of the body), while the second part is the one that you can live without for a second or so (until the page fully loads). As for the JavaScript, you will need to add async to the JavaScript libraries that are not necessary during pageload, and you will need to get rid of all the JavaScript libraries that you don't need. In my opinion, trying to get something over 85 with Google PageSpeed Insights is overkill and is not really necessary. I know that most people strive for a 100, but for many, this number is technically impossible (we've seen it though on a few websites).
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25236922
accepted answer of: http://stackoverflow.com/q/25236922

http://stackoverflow.com/comment/39587640
type: QuestionComment
comment on: http://stackoverflow.com/q/25384213
has text: @uʍopǝpısdn it does, which is why it's not obvious how to provide an implementation of `appendData` in the subclass that call's the parent's implementation I suspect it is not possible
score: 0
type: Comment

http://stackoverflow.com/comment/39510190
comment on: http://stackoverflow.com/a/25341964
score: 0
has text: Point taken, although W3Schools does provide an example in this case. I've added the MDN link to my answer.
type: Comment
type: AnswerComment

http://stackoverflow.com/a/25292676
accepted answer of: http://stackoverflow.com/q/25292613
upvote count: 3
type: Answer
answers question: http://stackoverflow.com/q/25292613
score: 3
type: AcceptedAnswer
downvote count: 0
has body: The error is because of your service definition. You are using service definition without dependency array [] as second parameter. This tells angular to treat it as getter method for module starter.services instead of defining the module. Use below code for starter.services to fix this. angular.module('starter.services', []) .service('CloudDatabases', ['$http', function ($http) { var urlBase = '/api/customers'; this.getDatabases = function () { console.log('CloudDatabases.getDatabases();'); return 'test getDatabasesResponse'; }; }])

http://stackoverflow.com/comment/39399215
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25282606
has text: @Benjamin just shared it there. Also don't forget you need to include clicks on `$('.input-dropdown')` itself, not just `$("#input-group_ids")`.
type: Comment

http://stackoverflow.com/a/25392082
type: AcceptedAnswer
has body: It looks like by default the multi-row select is activated. After looking into the live elements I saw that the selected row would be given a selected css class, but this css class was not applying any sort of color to the row. I added some css for that class and the other rows began to get highlighted.
type: Answer
accepted answer of: http://stackoverflow.com/q/25309050
score: 0
answers question: http://stackoverflow.com/q/25309050

http://stackoverflow.com/comment/39411379
comment on: http://stackoverflow.com/q/25288916
has text: Have you tried @ChrisForrence suggestion?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25260941
has comment: http://stackoverflow.com/comment/39359008
has body: One but very bad way is tracking the location of the mouse and constantly placing the position into the mysql db (function() { window.onmousemove = handleMouseMove; function handleMouseMove(event) { event = event || window.event; // IE-ism // event.clientX and event.clientY contain the mouse position } })(); Have a read of this: Determine mouse position outside of events (using jQuery)? and this: Javascript - Track mouse position Once you have read them, you'l be able to see that data is being shown in your console. Now we need to send it from the console to PHP and then into mysql. The following explains how: http://www.coderslexicon.com/the-basics-of-passing-values-from-javascript-to-php-and-back/ Lastly, I suggest reading up on: http://php.net/manual/en/mysqli.query.php Don't use MySQL queries. Use MySQLi as MySQL is deprecated.
score: 1
answers question: http://stackoverflow.com/q/25260681
has comment: http://stackoverflow.com/comment/39359068
type: Answer
has comment: http://stackoverflow.com/comment/39358992
upvote count: 3
downvote count: 2

http://stackoverflow.com/comment/39498402
score: 0
has text: Removing the php tag as this is not php related. If I made a mistake, update your question to include problematic PHP code and readd the tag
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25335463

http://stackoverflow.com/q/25300178
has comment: http://stackoverflow.com/comment/39431909
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/503093
upvote count: 2
has answer: http://stackoverflow.com/a/25300197
accepted answer: http://stackoverflow.com/a/25300197
score: 0
possible better answer: http://stackoverflow.com/a/25300313
answer count: 2
downvote count: 2
has answer: http://stackoverflow.com/a/25300313
favorite count: 0
has title: How do I make my JavaScript prompt redirect to a different page if the person doesn't qualify
has body: var age = prompt("How old are you??") if(age &lt; 18) { } else { } I was just wondering how I make this JavaScript code either redirect to a different page or allow the user to continue on the page they clicked, if of aged.
type: AnsweredQuestion

http://stackoverflow.com/comment/39549700
type: QuestionComment
comment on: http://stackoverflow.com/q/25364152
score: 0
has text: Notice that you shouldn't print error stacks to the user, but log them into a serverside file and just respond with a 501 code.
type: Comment

http://stackoverflow.com/comment/39358684
score: 0
type: AnswerComment
type: Comment
has text: Thanks, setting `pointer-events: none` on the layers, then `pointer-events: all` on the button does work. It doesn't work on IE however: it's easy to replicate click events on the buttons (http://stackoverflow.com/a/17978065/3387633), but I also need the hover effect to work. A solution that would work everywhere without patches would be a must for me.
comment on: http://stackoverflow.com/a/25260329

http://stackoverflow.com/comment/39577125
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25378494
type: Comment
has text: I will read about it but could you please see my code and tell me what I am doing wrong here?

http://stackoverflow.com/comment/39568160
type: QuestionComment
comment on: http://stackoverflow.com/q/25373648
has text: in the network tab, if you click the url for the socket to get the details, you can then click the "frames" tab on the entry line to view data sent and received. it doesn't self-refresh, so you have to click another tab (like Headers) and back to frames to see newer data.
score: 5
type: Comment

http://stackoverflow.com/comment/39459914
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25314797
type: Comment
has text: @Zack: Yes, a switch fits better when you have specific values to choose from.

http://stackoverflow.com/comment/39561754
type: QuestionComment
comment on: http://stackoverflow.com/q/25370240
has text: @Volune: Hm, that's true. If such is required, then each ajax that updates the page would need to call `init()` on the respective section (or use some pub/sub mechanism). Should I reopen it?
score: 0
type: Comment

http://stackoverflow.com/comment/80217331
type: Comment
comment on: http://stackoverflow.com/a/25343397
type: AnswerComment
score: 0
has text: @mickeysox - value is a property defined on the `myObject` object (page 77 in my book) it is not inherited from the `Object.prototype`

http://stackoverflow.com/comment/39463741
has text: Or you could simply iterate through all the elements with a `for` loop, reporting each of them. This is all just basic programming logic.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25317016

http://stackoverflow.com/comment/39582626
has text: excuse me what is in your site, i'm not getting it, which is creating the problem
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25380815

http://stackoverflow.com/comment/39566852
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25373161
score: 3
has text: let's back up four steps (that's not a miscount). What are you actually trying to do, rather than what you think the steps are to get that done?

http://stackoverflow.com/a/25344658
has comment: http://stackoverflow.com/comment/39516888
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39524888
has body: Async.js(https://github.com/caolan/async) can help with tasks like this. A quick example: app.get('/resource', function(req, res){ // object to send back in the response var results = {}; // helper function to make requests and handle the data to results object var getData = function(url, propertyName, next){ http.get(url, function(err, data){ // let async.js know if there is an error if(err) return next(err); // save data to results object results[propertyName] = data; // async.js needs us to notify it when each operation is complete - so we call the callback without passing any data back to next(); }); }; // array of operations to execute in series or parallel var operations = []; operations.push(function(next){ getData('http://url-one', 'users', next); }); operations.push(function(next){ getData('http://url-two', 'posts', next); }); // async.js has a few options on how to execute your operations - here we use series async.series(operations, function(err){ if(err){ throw err; } // if we get to this point, all of the operations have exectued and called // next() without any errors - send the response with a populated results object. res.send(results); }); }); I haven't actually tried this code yet but it should give you a good idea on how to do it.
answers question: http://stackoverflow.com/q/25344045
downvote count: 0
has comment: http://stackoverflow.com/comment/39514282
type: Answer

http://stackoverflow.com/q/25273501
answer count: 1
has answer: http://stackoverflow.com/a/25274220
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25274220
has body: I have a Wordpress childtheme using a functions.php that contains the following: &lt;?php add_action( 'wp_enqueue_scripts', 'load_custom_script' ); function load_custom_script() { wp_register_script( 'custom-script', get_template_directory_uri() . '/js/wpw-custom.js', array('jquery'), '1.0', true ); wp_enqueue_script( 'custom-script' ); } ?&gt; This is successfully loading my custom script, in the footer, AFTER jQuery itself loads. The custom script contains the following testing code to let me know if the enqueue process works: $( document ).ready(function() { alert( "ready!" ); }); I can view source on my pages and verify the successful loading of my wpw-custom.js but it is not executing the alert! What have I done wrong or what steps can I take to methodically find out what I have done wrong? Many thanks for any help!
has comment: http://stackoverflow.com/comment/39389209
tagged with: php
type: AnsweredQuestion
tagged with: wordpress
type: Question
has title: Why isn't enqueued script in wordpress working?
has comment: http://stackoverflow.com/comment/39382881
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39543964
type: AnswerComment
has text: Thank you that worked, I will accept answer in 10 mins
type: Comment
comment on: http://stackoverflow.com/a/25361379
score: 1

http://stackoverflow.com/comment/39357736
type: Comment
comment on: http://stackoverflow.com/q/25260219
score: 4
has text: `replace` only replaces the first occurrence, respecting the regular expression basically. You need to use the `/g` flag for it to "globally" replace all occurrences.
type: QuestionComment

http://stackoverflow.com/a/25323524
answers question: http://stackoverflow.com/q/25304663
type: Answer
has comment: http://stackoverflow.com/comment/39476350
has comment: http://stackoverflow.com/comment/39476547
has body: Just to complete your options, here you have a full but basic AJAX implementation (using jQuery): File select.php (javascript part at the bottom of the file): <?php // Notice that you'll need to get the $dbc from somewhere, maybe require 'db.php'? // Retrieve list of people... (notice I've added id column!) $sql = "SELECT id, first_name, last_name FROM registration_tbl"; $query = mysqli_query($dbc, $sql); $people = []; while ($row = mysqli_fetch_assoc($query)){ $people[$row['id']] = $row['first_name'] . " " . $row['last_name']; } ?> List of people People list Please select one person <?php foreach ($people as $person_id => $person_name): ?> <option value="<?php echo $person_id ?>"><?php echo $person_name ?> <?php endforeach; ?> And then get_people_info.php <?php if ($_SERVER['REQUEST_METHOD'] !== "POST") { header('HTTP/1.0 400 Bad request'); die("Only POST request accedpted!"); } if (!isset($_POST['id'])) { header('HTTP/1.0 400 Bad request'); die("id parameter is mandatory!"); } $id = (int) $_POST['id']; // Notice that you'll need to get the $dbc from somewhere, maybe require 'db.php'? $sql = "SELECT * FROM registration_tbl WHERE id = ". $id .";"; $query = mysqli_query($dbc, $sql); if ($row = mysqli_fetch_array($query)){ echo " ID: " . " " . $row[0] . " " . "Name: " . $row[1] . " " . $row[2] . " " . "Company: " . $row[3] . " " . "Email: " .$row[4] . " " . "Date of registration: " . $row[6] . " " . "Last login: " .$row[7] . " " . "Admin/User: " .$row[8] . " "; } else { echo "Person not found!"; } Let me give you some further reading (you said you were new to PHP, I asume the whole web development): jQuery Learning center PHP: The right way
score: 0

http://stackoverflow.com/q/25278052
has title: Is it possible to stop execution of code behind at certain point and ask for confirmation and then proceed?
has comment: http://stackoverflow.com/comment/39390780
has answer: http://stackoverflow.com/a/25279149
linked to: http://stackoverflow.com/q/11861271
type: Question
tagged with: c#
has body: I usually use ScriptManager.RegisterStartupScript(this, this.GetType(), "pop", " ", false); in code behind to pop up a message to the user that the entry has been saved successfully. But my problem with this is that it does not show in a scenario when along with saving the entry I am also downloading a file. I save an entry in the database and then generate a pdf file from the saved data and download it. All this on a single button click. I want to show a pop up message to the user after the entry has been saved in the database and then ask him if he wants to proceed and download the file? Is it possible? If yes how?
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
tagged with: asp.net
tagged with: ajax
has comment: http://stackoverflow.com/comment/39392354
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39390643
has comment: http://stackoverflow.com/comment/39390683

http://stackoverflow.com/comment/39529988
has text: *"...every object has a prototype property"* No, every *function* does. The objects created using those functions have an *internal* reference to the function's `.prototype` property. This is sometimes indicated as the object's `Prototype`. *"... I just can't figure why you'd want to send a reference to JQuery's prototype..."* It isn't a reference to jQuery's prototype. It's a reference to an object that inherits from jQuery's prototype. Big difference.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25353648

http://stackoverflow.com/a/65612429
has body: All fields mentioned under the bootstrapValidator function should have a parent with form-group class. So it should be like this. No of bottles out for delivery No of bottles returned $('#add_bulk_delivery_form').bootstrapValidator({ fields: { bottles_out_for_delivery: { validators: { notEmpty: { message: 'Bottles out for delivery field can\'t be empty' }, regexp: { regexp: /^[0-9]+$/, message: 'Bottles out for delivery can only contan numbers' } } } } });
type: Answer
answers question: http://stackoverflow.com/q/25265667
score: 0

http://stackoverflow.com/q/25262786
has answer: http://stackoverflow.com/a/25263332
has body: hello all i was wondering how to achieve this. i have a page in which there are three divs floating left and have width as 20% 60% and 19% all the divs are of veritable height but always the height of middle one is far greater then the other two . so want that whenever i scroll the page to see the bottom of middle div the bottom of other div stick to the screen as it is and automatically gets released when scrolled up to top. i know this is possible here is what i just noticed in a site http://resources.infosecinstitute.com/checking-out-backdoor-shells/ the extreme right div is similer example of what is want. can anyone please help me to achieve this. onscroll event can be applied here by js like onscroll if // check if the div is about to end then fix it as it is else // release it.
type: Question
has answer: http://stackoverflow.com/a/25262931
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has title: fixing the bottom of div to the bottom of screen on scroll
tagged with: css

http://stackoverflow.com/q/25304457
has comment: http://stackoverflow.com/comment/39546704
tagged with: node.js
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/31064831
accepted answer: http://stackoverflow.com/a/31064831
tagged with: socket.io
type: Question
tagged with: flash
downvote count: 0
tagged with: javascript
answer count: 1
has body: I need to save image from flash to server using node.js . here i my code. var pngEncoder:PNGEncoder = new PNGEncoder(); var pngStream:ByteArray = PNGEncoder.encode(bmd); socket.send(pngStream,"image"); that's my flash code and below is my js code var data = new Buffer(d,'binary'); fs.writeFile("image.png", data); My node version is 0.10.30 Socket.io version is 0.8 Please help me.
favorite count: 0
has title: Save png image using nodejs and socket io in flash
upvote count: 1

http://stackoverflow.com/a/25582362
type: Answer
has body: I believe the issue is here- it("should pass with correct inputs", function () { var processJsonObject = getNodeClickWithExpand(idElement, treeName, autoCompleteName); The test error 'Cannot read property 'expand' of null' indicates that there is no element in the dom with id = idElement. You need to pass an element's id as a string when you are running the test. You are also not passing any value for the parameters 'treeName' and 'autoCompleteName'.
answers question: http://stackoverflow.com/q/25308135
has comment: http://stackoverflow.com/comment/40026369
has comment: http://stackoverflow.com/comment/40023536
has comment: http://stackoverflow.com/comment/39999654
accepted answer of: http://stackoverflow.com/q/25308135
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40022649
has comment: http://stackoverflow.com/comment/40002877

http://stackoverflow.com/q/25327802
downvote count: 0
tagged with: javascript
answer count: 6
has body: I'm receiving the error: Multiple directives [gridsection, gridsection] asking for templateon : &lt;div gridsection=""&gt; with this code. I don't see how i'm using nested directives or what is causing this. html page &lt;div gridsection &gt;&lt;/div&gt; directive angular.module('web').directive('gridsection', function() { return { restrict: 'A', replace: false, scope: { patient: "=patient" }, templateUrl: 'directive/section.html', link: function(scope, element, attrs, fn) { } }; }); directive/section.html &lt;div&gt; here? &lt;/div&gt;
has answer: http://stackoverflow.com/a/25327908
has answer: http://stackoverflow.com/a/32012379
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25327908
upvote count: 5
possible better answer: http://stackoverflow.com/a/32194663
has answer: http://stackoverflow.com/a/32613337
has title: Angularjs Multiple directives [gridsection, gridsection] asking for template on:
has answer: http://stackoverflow.com/a/40782709
has answer: http://stackoverflow.com/a/32194663
has answer: http://stackoverflow.com/a/77158280
type: Question
tagged with: angularjs-directive
score: 5

http://stackoverflow.com/q/25327735
score: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39483285
has body: First off, I'm not experienced with JavaScript. Although I plan on sitting down and thoroughly learning the language, for now I'm just an HTML/CSS guy. I say this to avoid having my mind-blown by a response. I'm having an issue with a site I've inherited. They've used what I believe is a script written by someone else for an image slider, and the page keeps coming back with the error I mentioned in the title. I'll post the code and hopefully someone can help me fix it (and teach me some things about JavaScript in the process). CODE: The error Google Developer tools is sending back occurs on the very last line (JQuery) // JavaScript Document $(document).ready(function($) { $.fn.lofJSidernews = function( settings ) { return this.each(function() { // get instance of the lofSiderNew. new $.lofSidernews( this, settings ); }); } $.lofSidernews = function( obj, settings ){ this.settings = { mainItemSelector : 'li', navInnerSelector : 'ul', navSelector : 'li' , navigatorEvent : 'click'/* click|mouseenter */, wapperSelector : '.sliders-wrap-inner', interval : 5000, startItem : 0, navPosition : 'vertical',/* values: horizontal|vertical*/ duration : 1200, navItemsSelector : '.navigator-wrap-inner li', navOuterSelector : '.navigator-wrapper' , isPreloaded : true, onPlaySlider:function(obj, slider){}, onComplete:function(slider, index){ } } $.extend( this.settings, settings ||{} ); this.nextNo = null; this.previousNo = null; this.maxWidth = this.settings.mainWidth || 684; this.wrapper = $( obj ).find( this.settings.wapperSelector ); var wrapOuter = $('&lt;div class="sliders-wrapper"&gt;&lt;/div&gt;').width( this.maxWidth ); this.wrapper.wrap( wrapOuter ); this.slides = this.wrapper.find( this.settings.mainItemSelector ); if( !this.wrapper.length || !this.slides.length ) return ; // set width of wapper if( this.settings.maxItemDisplay &gt; this.slides.length ){ this.settings.maxItemDisplay = this.slides.length; } this.currentNo = isNaN(this.settings.startItem)||this.settings.star…
has title: Uncaught TypeError: object is not a function?
type: UnansweredQuestion
upvote count: 1
tagged with: javascript
type: Question
has answer: http://stackoverflow.com/a/25327769
answer count: 1
downvote count: 0

http://stackoverflow.com/q/25337374
has comment: http://stackoverflow.com/comment/39502725
type: Question
has title: JavaScript does not run on first load if I include the jquery.mobile-1.4.3.min.js library
tagged with: jquery-mobile
tagged with: javascript
has answer: http://stackoverflow.com/a/25338546
accepted answer: http://stackoverflow.com/a/25338546
has comment: http://stackoverflow.com/comment/39502023
has comment: http://stackoverflow.com/comment/39502045
answer count: 1
has comment: http://stackoverflow.com/comment/39503013
tagged with: jquery
has comment: http://stackoverflow.com/comment/39503088
favorite count: 0
downvote count: 2
has body: I am facing a very strange problem where my javascript code does not run the first time the page is loaded. If I reload/refresh the page, the script runs fine. After some hit-and-trial's I realized that if I remove the jquery.mobile-1.4.3.min.js library from the previous page (which redirects to my current page) then the script is running as expected. Can anyone please help on why this is occurring and how can I resolve it ? Update: On opening the hpme page (which contains the link to the page containing the JS), I can see the following error in console: Uncaught TypeError: Cannot set property 'mobile' of undefined . Please note that this home page is basically a simple code with library declarations and html links. Edit : I had missed the jQuery lib earlier and hence the Uncaught TypeError. Now, my libraries are in the following order : &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="//ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.min.js"&gt;&lt;/script&gt; &lt;script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jquerymobile/1.4.3/jquery.mobile.min.css" /&gt; &lt;link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/themes/smoothness/jquery-ui.css" /&gt; Now there are no errors in my console, but still the JS in the next page does not run in the first load. Oddly, if I remove the jquery.mobile-1.4.3.min.js library, the JS works fine.
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39501844
has comment: http://stackoverflow.com/comment/39502713
has comment: http://stackoverflow.com/comment/39502380
has comment: http://stackoverflow.com/comment/39503084
type: AnsweredQuestion
score: 1
upvote count: 3
has comment: http://stackoverflow.com/comment/39502960
has comment: http://stackoverflow.com/comment/39502046
has comment: http://stackoverflow.com/comment/39503059
has comment: http://stackoverflow.com/comment/39502972

http://stackoverflow.com/comment/132732018
type: AnswerComment
comment on: http://stackoverflow.com/a/25304341
type: Comment
has text: 'test\\hehehe'.replace(/\\\\/g, '\\') doesnt work
score: 0

http://stackoverflow.com/comment/57809333
comment on: http://stackoverflow.com/a/25253537
score: 0
type: AnswerComment
has text: @Bergi when I check the Client instance the way you wrote it, I don't see getAsync, postAsync, etc... I must be doing something wrong?
type: Comment

http://stackoverflow.com/q/25329651
has comment: http://stackoverflow.com/comment/39542917
has comment: http://stackoverflow.com/comment/39490277
type: Question
type: AnsweredQuestion
has body: this is my yAxsis and normally displays time for column range chart yAxis: { type: 'datetime', labels: { formatter: function () { return Highcharts.dateFormat('%H:%M:%P', this.value); } } It normally works perfect when distance is some amount . Question : When time distance between starttime and endtime is low then yAxsis dispalys 00:00 pm through the axsis I also tried %M:%P still dispalys 00:pm here is the js fiddle
has comment: http://stackoverflow.com/comment/39488103
has answer: http://stackoverflow.com/a/25490479
tagged with: dotnethighcharts
accepted answer: http://stackoverflow.com/a/25490479
has comment: http://stackoverflow.com/comment/39487569
has comment: http://stackoverflow.com/comment/39488463
has comment: http://stackoverflow.com/comment/39487534
score: 0
has comment: http://stackoverflow.com/comment/39492064
tagged with: highcharts
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39489822
has comment: http://stackoverflow.com/comment/39487668
tagged with: highcharts-ng
has title: Highcahrt time format issue
has comment: http://stackoverflow.com/comment/39488163

http://stackoverflow.com/comment/62900481
comment on: http://stackoverflow.com/q/25238210
score: 0
type: Comment
type: QuestionComment
has text: Answer here: http://stackoverflow.com/questions/5580876/navigator-language-list-of-all-languages/36042028#36042028

http://stackoverflow.com/q/25356507
accepted answer: http://stackoverflow.com/a/25356582
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25356595
has comment: http://stackoverflow.com/comment/39535027
type: Question
has title: AngularJS Simple Login
has answer: http://stackoverflow.com/a/25356582
tagged with: javascript
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/25356595
tagged with: angularjs
has answer: http://stackoverflow.com/a/25357952
type: AnsweredQuestion
has body: I'm a newbie to AngularJS and have a little knowledge of JavaScript. I'm trying to implement a login page where I have a URL to my server (http://somerandomip/user/get?p=retail123&amp;username=retail123) would give me a JSON response with dummy data upon successful login. If the username or password is invalid, the JSON response returned will have an error message in it. I've tried looking for tutorials to do this in the most simple way possible but I can't seem to figure out how to use $http to get this done. I understand this is pretty n00b question but my lack of JavaScript knowledge doesn't help. If you could direct me towards a basic demo of how to get this done, I'd appreciate it a lot. Thanks in advance. Edit: I understand that sending password as GET is not safe, I'm just trying to get a working login first.

http://stackoverflow.com/comment/39333395
has text: it's the variable that is sent back from the dialog. It returns 'true' or 'false'. The console.log's confirm that the if statement is working properly because they return the correct variables.
score: 0
comment on: http://stackoverflow.com/q/25246949
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25297460
tagged with: list
has comment: http://stackoverflow.com/comment/39427596
accepted answer: http://stackoverflow.com/a/25297624
type: Question
upvote count: 0
score: -2
has body: So I was looking for an easy way(no use of database) to search items through a list with the help of a search bar. I found this --- jsfiddle.net/TrRMG/90/ Alice Bob Carla Dan Eve Is there anyway to alter the code to make the searched items clickable? Example: Lets say I type in bob. Bob comes up in the second box, I click on it and it takes me to a page/website. Is this possible? if so, how?
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/4536055
has comment: http://stackoverflow.com/comment/39427395
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25297624
favorite count: 0
downvote count: 2
has title: javascript: Making items in searchlist clickable
type: AnsweredQuestion

http://stackoverflow.com/q/25296536
has title: place an id in the middle of a haml line
has comment: http://stackoverflow.com/comment/39425555
type: Question
has answer: http://stackoverflow.com/a/25296640
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/39425465
has body: What I want to achieve is this.. A line that shows as Comments (32) Where 32 is the count of comments against a post. Now this is easily achieved in haml with %h2 Comments (#{Post.count_of_comments}) however, I am creating and deleting comments with AJAX and javascript. I need to be able to place an identifier against the count so that I can adjust it in the javascript. Obviously, I could do #count %h2 Comments (#{Post.count_of_comments}) but is there any way of putting an id tag against just the count rather than the whole line, or failing that how would I identify that count in javascript.
score: 0
possible better answer: http://stackoverflow.com/a/25296614
tagged with: haml
has answer: http://stackoverflow.com/a/25296614
accepted answer: http://stackoverflow.com/a/25296640
tagged with: ruby-on-rails
type: AnsweredQuestion

http://stackoverflow.com/a/25276065
score: 0
has body: It isn't as straighforward as it seems since angular has no way of knowing whether you want the dynamic binding for the property or not. You can achieve what you are trying to do using $watch service. Put a watch on the searchVal &amp; use it to detect changes &amp; update the object property accordingly.
answers question: http://stackoverflow.com/q/25275989
type: Answer

http://stackoverflow.com/comment/39515923
type: Comment
score: 1
has text: just assaign `id` for each button. then simply write `js` code to `hide / show` corresponding `fieldset`.
comment on: http://stackoverflow.com/q/25345635
type: QuestionComment

http://stackoverflow.com/comment/39433538
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25300948
has text: you shd have googled it first
score: 0

http://stackoverflow.com/q/25298889
tagged with: javascript
has body: Please refer to the fiddle below. &lt;form method="get" action="/cart/add" target="top"&gt; &lt;input type="text" name="q" value=""&gt; &lt;input type="submit" value="Search Google"&gt; &lt;/form&gt; var parent = document.getElementsByTagName("script")[0]; var script = document.createElement("script"); var url = "http://www.google.com"; $("form[action='/cart/add']").find(':submit').click(function(event){ script.src = url; parent.appendChild(script); }); http://jsfiddle.net/nihalsharma/r6vdga95/ I have a doubt. Why not clicking the submit button multiple time hitting the url again and again? What if I want to hit my url every time I click my submit button?
has answer: http://stackoverflow.com/a/25299330
score: 0
has comment: http://stackoverflow.com/comment/39430148
has comment: http://stackoverflow.com/comment/39430132
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25299330
favorite count: 0
has title: Why does multiple form submit clicks not call the url multiple times?
has comment: http://stackoverflow.com/comment/39429883
has comment: http://stackoverflow.com/comment/39429795
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39429960
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/39429859
type: Question

http://stackoverflow.com/comment/39367347
type: AnswerComment
comment on: http://stackoverflow.com/a/25254422
type: Comment
has text: I know this works, but when going all crazy with nesting you end up losing one of the big benefits of promises, the fact that you don't need to start nesting them into infinity if you have 10 or more of those calls in succession.
score: 1

http://stackoverflow.com/comment/39524494
comment on: http://stackoverflow.com/a/25346433
has text: Do you mean directly open the html pages with web browser in Eclipse? If that's what you mean, I did that. and script doesn't work. If not, could you teach me how to test the page in a web browser? Thans a lot.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/138701334
type: QuestionComment
has text: Does this answer your question? [Executing JavaScript in the , getElementById returns null](https://stackoverflow.com/questions/5704924/executing-javascript-in-the-head-getelementbyid-returns-null)
type: Comment
comment on: http://stackoverflow.com/q/25336385
score: 0

http://stackoverflow.com/comment/39533920
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25355829
type: Comment
has text: oh the possibilities...

http://stackoverflow.com/comment/39534845
score: 0
has text: @Happy - I'm talking about the variable "transition" in `transition + "s " + delay +"s !important"`.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25356392

http://stackoverflow.com/a/25264467
accepted answer of: http://stackoverflow.com/q/25264399
answers question: http://stackoverflow.com/q/25264399
type: AcceptedAnswer
downvote count: 0
has body: var thCount = tableElement.tBodies[0].rows[0].getElementsByTagName('th').length or if you want only td's: var tdCount = tableElement.tBodies[0].rows[0].getElementsByTagName('td').length
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/39365857
score: 6

http://stackoverflow.com/comment/39319095
comment on: http://stackoverflow.com/q/25239348
has text: I think that when you close the writer, the client reconnects to the server.
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/comment/75192105
has text: Can this be also done in `chrome`?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25233344

http://stackoverflow.com/comment/39400937
comment on: http://stackoverflow.com/q/25276919
has text: Is it possible to post the bits on a fiddle to have a play with ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25389667
accepted answer of: http://stackoverflow.com/q/25389615
type: Answer
answers question: http://stackoverflow.com/q/25389615
score: 0
has body: pass picture to sold out and then in sold out $scope.checkSoldOut = function (picture) { console.log(picture); //returns undefined }
type: AcceptedAnswer

http://stackoverflow.com/comment/39599505
type: Comment
has text: Halfway-maybe. In languageController (the 1st block of code above), inside the if(), I added $rootScope.newLanguage = newVal.val; It sets to es when Espanol is selected. Correct. In the changePostDd factory (3d block), I put var langKey = $rootScope.newLanguage; As best I can tell, it doesn't execute, and the second dropdown fails, though no Console errors. I put $rootScope in the factory dependencies. When hardcoded langKey = 'es'; everything works-translation selection and dropdown. How can I get the value of $rootScope.newLanguage into the Angular factory, changePostDd ?
comment on: http://stackoverflow.com/a/25332271
score: 0
type: AnswerComment

http://stackoverflow.com/q/25231805
upvote count: 2
type: UnansweredQuestion
tagged with: animation
has title: Multiple animations on scroll
score: 2
has body: I am trying to make my progress bars on my website animate on scroll. So I managed to get a progress bar to animate on scroll. My problem now is that I have multiple progress bars to animate (Danger, warning, success) etc. Do I have to create new elements ? here is the fiddle : http://jsfiddle.net/as2gv/11/ // Check if elem is in viewport function isElementInViewport(elem) { var $elem = $(elem); // Get the scroll position of the page. var scrollElem = ((navigator.userAgent.toLowerCase().indexOf('webkit') != -1) ? 'body' : 'html'); var viewportTop = $(scrollElem).scrollTop(); var viewportBottom = viewportTop + $(window).height(); // Get the position of the element on the page. var elemTop = Math.round($elem.offset().top); var elemBottom = elemTop + $elem.height(); return ((elemTop &lt; viewportBottom) &amp;&amp; (elemBottom &gt; viewportTop)); } // Check if it's time to start the animation. function checkAnimation(elem) { var $elem = $(elem); if ($elem.hasClass('start')) return; if (isElementInViewport($elem)) { $elem.addClass('start'); //animated progess bars var bar = $('.progress-bar-warning'); $(function () { $(bar).each(function () { bar_width = $(this).attr('aria-valuenow'); $(this).width(bar_width + '%'); }); }); } } // Capture scroll events $(window).scroll(function () { checkAnimation($('.progress-bar')); }); Would you guys know how to make the all the progress bars animate on scroll ?
type: Question
tagged with: jquery-animate
has answer: http://stackoverflow.com/a/25231962
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 1
favorite count: 0

c++
tags question: http://stackoverflow.com/q/25384086
tags question: http://stackoverflow.com/q/25287394
tags question: http://stackoverflow.com/q/25297332
type: Tag
tags question: http://stackoverflow.com/q/25235465
tags question: http://stackoverflow.com/q/25231724
tag name: c++
tags question: http://stackoverflow.com/q/25299460

http://stackoverflow.com/comment/39501581
score: 0
type: AnswerComment
type: Comment
has text: okay, i ran this script from node with an android emulator connected and am starting to understand. i am able to successfully push a file to the /sdcard but as you said without any error if no device is connected. The question then becomes what is client.listDevices() really doing? i assumed it would check to see if the adb server lists any connected devices and return an error if that wasnt true but thats not the case. I need to set the script to return an error if no device is detected, but dont know how to determine that
comment on: http://stackoverflow.com/a/25336666

http://stackoverflow.com/comment/39446322
score: 0
has text: Updated with solution for `:reverse` at the bottom.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25306447

http://stackoverflow.com/comment/39577273
has text: read more about constructor function in JS and using of "new".
type: QuestionComment
comment on: http://stackoverflow.com/q/25378642
type: Comment
score: 2

http://stackoverflow.com/q/25320387
tagged with: javascript
tagged with: jquery
answer count: 2
has answer: http://stackoverflow.com/a/25320406
has body: how can I do this with jquery? I thought of loop and indexOf but can't get there yet. I want to delete all the node after the [ symbol. 1 2 3 [ a b c 1 2 3 1 2 3
has comment: http://stackoverflow.com/comment/39469470
has comment: http://stackoverflow.com/comment/39469575
type: AnsweredQuestion
score: 0
possible better answer: http://stackoverflow.com/a/25320507
accepted answer: http://stackoverflow.com/a/25320406
has title: looping with indexOf to remove html entities
type: Question
has answer: http://stackoverflow.com/a/25320507

http://stackoverflow.com/q/25324888
has title: Changing in model not affected on a view ember
type: AnsweredQuestion
tagged with: javascript
type: Question
accepted answer: http://stackoverflow.com/a/25327022
tagged with: ember.js
has comment: http://stackoverflow.com/comment/39480803
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25326819
has answer: http://stackoverflow.com/a/25326819
has comment: http://stackoverflow.com/comment/39479622
has answer: http://stackoverflow.com/a/25327022
has body: I try to add data to model manually like this beforeModel: function() { var scope =this; Ember.$.getJSON('/restURL').then(function(response){ scope.store.pushPayload('consultation',response); }, and data successfully loaded, I can see it in ember debugger, but I have a problem - data is not render on a view. template in application.hbs: {{#each item in model}} {{#link-to 'consultation' item}}{{item.remoteUser.name}}{{/link-to}} {{/each}} NOTE: when I load data using this.store.find('consultation'); it's work fine, but I have custom URL and can't use this construction.

http://stackoverflow.com/comment/39542877
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25360674
has text: chiran that is only for education but if it can fix that is good.
score: 0

http://stackoverflow.com/q/25383637
answer count: 1
accepted answer: http://stackoverflow.com/a/25383782
has comment: http://stackoverflow.com/comment/39586190
has comment: http://stackoverflow.com/comment/39586159
linked to: http://stackoverflow.com/q/3076414
has comment: http://stackoverflow.com/comment/39586162
has title: XMLHttpRequest No 'Access-Control-Allow-Origin'
duplicate of: http://stackoverflow.com/q/3076414
upvote count: 0
tagged with: javascript
tagged with: jquery
has body: I created a small js containing a code to track and save through an ajax call the coordinates of the click on a web page. In a website (domain2) is entered in the head &lt;script src="http://www.domain1.com/scan/track/mousehandle.js"&gt;&lt;/script&gt; that contain code like this: $('*').on('click', function (e) { // make sure the event isn't bubbling if (e.target != this) { return; } $.ajax({ type: "POST", url: "http://www.domain1.com/scan/track/php/ajaxcall.php", data: { x: e.pageX, y: e.pageY } }) .done(function( msg ) { alert( "Data Saved: " + msg ); }); } But when i click on the domain2 webpage, return this: XMLHttpRequest cannot load http://www.domain1.com/scan/track/php/ajaxcall.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.domain2.com' is therefore not allowed access. How can i save click coordinates trapped by my javascript positioned on another domain?? Thanks in advance
tagged with: ajax
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25383782
has comment: http://stackoverflow.com/comment/39586239
tagged with: xmlhttprequest
score: -2
favorite count: 0
type: Question
downvote count: 2
tagged with: php

http://stackoverflow.com/a/44304188
answers question: http://stackoverflow.com/q/25250544
score: 2
downvote count: 0
upvote count: 2
has body: just use mongoose.connect('...'); once. maybe in your root app.js or index.js file, not in every model or database related files if your are importing (including) them. Anyways, if you still have doubt you can check it by: var mongoose = require('mongoose'); var db = mongoose.connection; db.once('connected', function() { console.log('mongoDB is connected'); });
type: Answer

http://stackoverflow.com/a/25276324
has comment: http://stackoverflow.com/comment/39387841
has comment: http://stackoverflow.com/comment/86286822
has comment: http://stackoverflow.com/comment/39388126
has body: Since you always access the same URL with AJAX, chances are good it is being cached. Try adding this at the top of the Flask controller responsible for the data AJAX: response.headers['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0' response.headers['Pragma'] = 'no-cache' response.headers['Expires'] = '-1' Alternately, you can change your URL to: url: "/?" + new Date().getTime(), so it's impossible to cache (since it will be different each time). EDIT: I just noticed, you're setting the value of y in the template, which has no relevance to the AJAX call. To refresh that value, you would have to reload the page, AJAX is useless as it stands, since it fetches some data and then ignores it. url: '/get_car_value', success: function(data) { var y = data.car_value; console.log(y) series.addPoint([x, y], true, true); } and make a new controller: @app.route('/get_car_value', methods=['GET']) def get_car_value(): import json data = json.dumps({ car_value: get_data_route() }) return data, 200, {'Content-Type': 'application/json; charset=utf-8'} (you could use the existing get_data_route controller, but I like a consistent API, and always using JSON when transfering data with AJAX is pretty useful). EDIT: JSON brain fart.
has comment: http://stackoverflow.com/comment/39388007
type: Answer
has comment: http://stackoverflow.com/comment/39387968
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25276270
has comment: http://stackoverflow.com/comment/39388121
has comment: http://stackoverflow.com/comment/39387925
has comment: http://stackoverflow.com/comment/39387795
answers question: http://stackoverflow.com/q/25276270
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39387822

http://stackoverflow.com/comment/39487528
type: QuestionComment
has text: That's how you wrote the code (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects#Using_a_constructor_function). You could also use directly create an object: `var userOne = {go: ... };`
comment on: http://stackoverflow.com/q/25329678
score: 0
type: Comment

http://stackoverflow.com/q/25358876
upvote count: 1
has answer: http://stackoverflow.com/a/25359019
downvote count: 1
has comment: http://stackoverflow.com/comment/39539550
has body: I am a newbie in angularjs. I was stuck on a code and wanted some help. I am having a controller called watchlist controller in which I am getting the data which is to be displayed in the watchlist. However I want to display the data only once the watchlist tab is clicked. This is the Html code :- My Watchlist My controller(watchlist):- $scope.fetchUserWatchlist = function(pageno,callback){ $scope.isLoading = true; $rootScope.isrequest = true; userAPI.myWatchlist({userid:$rootScope.getUser().userid,pageno:pageno}, function(r) { if (_.isNull(r.watchlistdata)) { if(typeof callback == 'function'){ callback(); } if(pageno == 1){ $scope.watchlist = []; $scope.watchlistCount = 0; } if (!$rootScope.apiCalled && pageno == 1){ if(!_.isUndefined($rootScope.watchlistClicked) && $rootScope.watchlistClicked){ $rootScope.$broadcast("watchlist::click"); imageLoadingIndicator(); } $rootScope.apiCalled = true; } return false; } if (!_.isUndefined(r.watchlistdata.watchlist)){ var rawData = []; var tempWatchlist = $scope.watchlist; if (_.isArray(r.watchlistdata.watchlist)) rawData = r.watchlistdata.watchlist; else rawData = [r.watchlistdata.watchlist]; if (pageno == 1) { $scope.watchlistCount = parseInt(rawData[0].totalcount); } if ($scope.watchlist.length == 0 || ($scope.watchlist.length > 0 && pageno == 1)) $scope.watchlist = rawData; else _.each(sortByDate(rawData),function(item){ if (! _.some(tempWatchlist,function(existingItem){ return existingItem.programmeid == item.programmeid; })) { $scope.watchlist.push(item); } }); $scope.watchlistPage += 1; $timeout(function(){ if (!$rootScope.apiCalled && pageno == 1){ if(!_.isUndefined($rootScope.watchlistClicked) && $rootScope.watchlistClicked){ $rootScope.$broadcast("watchlist::click"); imageLoadingIndicator(); } $rootScope.apiCalled = true; } },1); $rootScope.isrequest = false; if(typeof callback == 'function'){ callback(); } }else $rootScope.end = true; }); }; So basically I want to implement ng-click on the controller but here in th…
type: Question
has comment: http://stackoverflow.com/comment/39539350
answer count: 2
tagged with: javascript
tagged with: jquery
has title: angularjs-how to implement click in angular
favorite count: 0
score: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25358999

http://stackoverflow.com/comment/39436588
has text: @jfriend00 make a meta post, you can count on my vote
comment on: http://stackoverflow.com/q/25296168
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39435810
comment on: http://stackoverflow.com/a/25301344
type: Comment
has text: what option have you given, untill you won't tell me how can I know if that is right or not?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39370076
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25266807
has text: See [How do I add a delay in a JavaScript loop?](http://stackoverflow.com/questions/3583724/how-do-i-add-a-delay-in-a-javascript-loop)

jquery-waypoints
tags question: http://stackoverflow.com/q/25315577
tag name: jquery-waypoints
type: Tag
tags question: http://stackoverflow.com/q/25241155

http://stackoverflow.com/q/25380956
tagged with: angularjs
answer count: 3
has comment: http://stackoverflow.com/comment/39580985
has answer: http://stackoverflow.com/a/25381335
has comment: http://stackoverflow.com/comment/39581636
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25382384
tagged with: angularjs-ng-click
downvote count: 0
has comment: http://stackoverflow.com/comment/39580988
type: Question
score: 1
has title: Angular - ng-click on a div works only when you click on specific areas of a div
has comment: http://stackoverflow.com/comment/39581064
has answer: http://stackoverflow.com/a/25381132
upvote count: 1
has body: I am trying to create a div that has a bunch of disabled fields. They get enabled on clicking anywhere in the div. I find that clicking anywhere in the div causes ng-click to be fired, while clicking on a dropdown that is disabled does not seem to fire ng-click. Here's an example. http://jsfiddle.net/sJZf7/9/ Javascript: var app = angular.module('App', []); function ctrl($scope) { $scope.disabled = true; $scope.enable = function () { $scope.disabled = false; } } What is going on?
accepted answer: http://stackoverflow.com/a/25381335
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/3100319
possible better answer: http://stackoverflow.com/a/25382384

http://stackoverflow.com/comment/39320181
has text: @neshpro9 how does storing the response is a duplicate of getting the response..?
score: 0
comment on: http://stackoverflow.com/q/25239907
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39423214
has text: visible="false" is what I tried first, perhaps it is case sensitive, but it really doesn't matter
score: 0
comment on: http://stackoverflow.com/q/25290437
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25311019
has answer: http://stackoverflow.com/a/25313609
answer count: 3
tagged with: html5-canvas
has answer: http://stackoverflow.com/a/25313006
tagged with: http://stackoverflow.com/tag/html
has title: Apply gravity between two or more objects in HTML5 Canvas
accepted answer: http://stackoverflow.com/a/25313006
type: AnsweredQuestion
score: 3
upvote count: 3
tagged with: math
has body: I was creating something like a 2d gravity simulator, just for fun, and noticed that I'm a complete idiot in terms of math. I just can't get the gravity to work. I've tried following the instructions found here but it looks weird and when the distance reaches zero, it goes completely buggy. If I add 1 to the distance as recommended in the question, all objects go upper left. I've even tried not modifying gravity when distances reach zero, but this doesn't change the behavior. Here's the algorithm I'm using to apply gravity: var distX = obj1.x - obj2.x, distY = obj1.y - obj2.y; if (obj1 != obj2) { if (distY != 0) { obj1.vy += -(1 / (distY)); } if (distX != 0) { obj1.vx += -(1 / (distX)); } } I've tried using other algorithms too, but most of them don't care for the distance between objects. Note that I want the gravity to affect distant objects less than closer objects.
has answer: http://stackoverflow.com/a/25311243
type: Question
tagged with: canvas
downvote count: 0
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/25313609

http://stackoverflow.com/comment/39555776
type: Comment
comment on: http://stackoverflow.com/a/25367453
has text: don't use `document.write`, especially not after the document has fully loaded.
type: AnswerComment
score: 0

http://stackoverflow.com/q/25234576
score: 0
tagged with: lightbox
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25234623
has comment: http://stackoverflow.com/comment/39310346
type: AnsweredQuestion
has title: A close button for Lightbox_me
has body: I've googled for a script for a close button for Lightbox_me, however all I've been able to find are scripts for bare-bones lightboxes. (function ($) { $.fn.lightbox_me = function (options) { return this.each(function () { var opts = $.extend({}, $.fn.lightbox_me.defaults, options), $overlay = $(), $self = $(this), $iframe = $('&lt;iframe id="foo" style="z-index: ' + (opts.zIndex + 1) + ';border: none; margin: 0; padding: 0; position: absolute; width: 100%; height: 100%; top: 0; left: 0; filter: mask();"/&gt;'); if (opts.showOverlay) { //check if there's an existing overlay, if so, make subequent ones clear var $currentOverlays = $(".js_lb_overlay:visible"); if ($currentOverlays.length &gt; 0) { $overlay = $('&lt;div class="lb_overlay_clear js_lb_overlay"/&gt;'); } else { $overlay = $('&lt;div class="' + opts.classPrefix + '_overlay js_lb_overlay"/&gt;'); } } /*---------------------------------------------------- DOM Building ---------------------------------------------------- */ $('body').append($self.hide()).append($overlay); /*---------------------------------------------------- Overlay CSS stuffs ---------------------------------------------------- */ // set css of the overlay if (opts.showOverlay) { setOverlayHeight(); // pulled this into a function because it is called on window resize. $overlay.css({ position: 'absolute', width: '100%', top: 0, left: 0, right: 0, bottom: 0, zIndex: (opts.zIndex + 2), display: 'none' }); if (!$overlay.hasClass('lb_overlay_clear')) { $overlay.css(opts.overlayCSS); } } /*---------------------------------------------------- Animate it in. ---------------------------------------------------- */ // if (opts.showOverlay) { $overlay.fadeIn(opts.overlaySpeed, function () { setSelfPosition(); $self[opts.appearEffect](opts.lightboxSpeed, function () { setOverlayHeight(); setSelfPosition(); opts.onLoad() }); }); } else { setSelfPosition(); $self[opts.appearEffect](opts.lightboxSpeed, function () { opts.onLoad() }); } /*-----------------…
type: Question
has answer: http://stackoverflow.com/a/25234623
tagged with: javascript

http://stackoverflow.com/a/25278804
has body: .button.calculator, .button.calculator.pressed, .button.calculator.pressed:focus { background:red; } .button.calculator:focus{ background:green; }
downvote count: 1
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/25278728
type: Answer

http://stackoverflow.com/q/25329193
favorite count: 0
upvote count: 5
type: UnansweredQuestion
tagged with: safari
answer count: 0
downvote count: 0
has body: I am attempting to authenticate with Constant Contact via OAuth2 in a popup window. I am using $.postMessage to send the data between windows, and for the most part, it works beautifully. My problem is with Safari. A normal request has a URL that looks like this: https://example.com/oauth-v2/#access_token=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx&amp;token_type=Bearer&amp;expires_in=xxxxxxxxx But while using Safari to make the request, the entire hash is cut off the URL and location.hash, window.location.hash, window.parent.location.hash are all empty. The authentication flow is fairly standard: User clicks auth button Popup window to auth with Constant Contact Allow application List item Return to app site to capture token Here's the javascript we're using to get the URL hash info jQuery(document).ready(function ($) { $.extend({ getQueryParameters: function (str) { return (str || document.location.search || document.location.hash) .replace(/(^\?)|(^\#)/, '') .split("&amp;") .map(function (n) { return n = n.split("="), this[n[0]] = n[1], this }.bind({}))[0]; } }); $.receiveMessage(function (event) { $.postMessage($.getQueryParameters(), event.origin, event.source); setTimeout(function () { window.close() }, 5000); }); }); Is the missing hash a known bug in Safari? Should I be doing something else to get the info from Constant Contact? It works in every other browser so I would hate to re-write this part of the application.
tagged with: oauth-2.0
tagged with: postmessage
type: Question
has title: Location.hash empty only in Safari 7
score: 5
has comment: http://stackoverflow.com/comment/56472761
tagged with: javascript
has comment: http://stackoverflow.com/comment/56465901
tagged with: constantcontact

http://stackoverflow.com/q/25292024
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/18956817
type: Question
has title: Is it possible to use an xtype inside an ExtJS template
tagged with: javascript
tagged with: extjs
has body: I am wondering if I can do something like this in ExtJS. I am creating my own button as an xtype and want it to be used in the table row I am creating. testTpl: Ext.DomHelper.createTemplate( { tag: 'tbody', children: [ { tag: 'tr', cls: 'test-row', children:[{ tag: 'td', cls: 'test-table-cell test-class1', html: '{value1}' }, { tag: 'td', xtype:'myxtype' cls: 'test-table-cell test-class2', html: '{value2}' }] }] });
tagged with: extjs4
upvote count: 1
answer count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25301225
linked to: http://stackoverflow.com/q/10649832

http://stackoverflow.com/a/25299523
type: Answer
downvote count: 0
score: 88
has comment: http://stackoverflow.com/comment/39431209
has comment: http://stackoverflow.com/comment/43815263
has body: Yes, That is because Object is a part of window/global and angular cannot evaluate that expression against the scope. When you specify Object.keys in your binding angular tries to evaluate it against the $scope and it does not find it. You could store the reference of object.keys in some utility in rootScope and use it anywhere in the app. Something like this:- angular.module('yourApp',[deps...]).run(function($rootScope){ //Just add a reference to some utility methods in rootscope. $rootScope.Utils = { keys : Object.keys } //If you want utility method to be accessed in the isolated Scope //then you would add the method directly to the prototype of rootScope //constructor as shown below in a rough implementation. //$rootScope.constructor.prototype.getKeys = Object.keys; }); and use this as:- {{ Utils.keys(stations).length }} Stations Well this will be available to any child scopes except for isolated scopes. If you are planning to do it on the isolated scope (eg:- Isolated scoped directives) you would need to add the reference of Object.keys on the scope, or as you expose a method on the scope which will return the length. Or better yet , create a format filter to return the keylength and use it everywhere. app.filter('keylength', function(){ return function(input){ if(!angular.isObject(input)){ throw Error("Usage of non-objects with keylength filter!!") } return Object.keys(input).length; } }); and do:- Demo
has comment: http://stackoverflow.com/comment/58976255
accepted answer of: http://stackoverflow.com/q/25299436
upvote count: 88
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/59486698
answers question: http://stackoverflow.com/q/25299436
has comment: http://stackoverflow.com/comment/64804555
has comment: http://stackoverflow.com/comment/54589977
has comment: http://stackoverflow.com/comment/54589037

http://stackoverflow.com/a/25380048
answers question: http://stackoverflow.com/q/25379912
score: 0
has body: First of all you should always assume user may fake any data calculated on his side. Therfore using server time is more reliable. Using IP is an option - you can find services and databases that allow you to resolve IP to country its located in. Example: http://php.net/manual/en/book.geoip.php Lastly - why do you want efectively differend release date for various countries? They can always use someone in other country to access module in their name.
has comment: http://stackoverflow.com/comment/39580048
has comment: http://stackoverflow.com/comment/39585446
type: Answer
has comment: http://stackoverflow.com/comment/39582643

http://stackoverflow.com/a/25341286
downvote count: 2
has comment: http://stackoverflow.com/comment/39566568
has body: There also is my http://taccGL.org library that can draw HTML text on a 2D canvas and then use it as textures on 3D objects drawn on a 3D/WebGL canvas.
type: Answer
answers question: http://stackoverflow.com/q/25319040
upvote count: 2
score: 0

http://stackoverflow.com/comment/39377335
type: Comment
has text: this works in the fiddle. however, keys still affect the page (scrolling). how to prevent this?
comment on: http://stackoverflow.com/a/25270556
score: 0
type: AnswerComment

http://stackoverflow.com/q/25291822
type: UnansweredQuestion
has title: TypeAhead and Bloodhound only searching on first words in JSON array
score: 2
tagged with: bloodhound
downvote count: 0
has body: I'm using TypeAhead to provide autocomplete results for a textbox. But it seems either Bloodhound or TypeAhead is only searching on the first words of found in the JSON array I'm providing. The JSON looks as follows: [ { "name": "ALICE", "value": "ALICE", "physical_address": "ERF 270 CNR. OF THOMPSON AND INTWANA STREET, ALICE", "province": "PROVINCE", "tokens": [ "ALICE", "PROVINCE", "ERF", "270", "CNR.", "OF", "THOMPSON", "AND", "INTWANA", "STREET", "ALICE" ] }, { "name": "BUTTERWORTH", "value": "BUTTERWORTH", "physical_address": "SHOP NO. 1 MASONIC SHOPPING COMP, COR HIGH &amp; BELL STREET BUTTERWORTH 4960", "province": "PROVINCE", "tokens": [ "BUTTERWORTH", "PROVINCE", "SHOP", "NO.", "1", "MASONIC", "SHOPPING", "COMP", "COR", "HIGH", "&amp;", "BELL", "STREET", "BUTTERWORTH", "4960" ] } ] I'm intialising TypeAhead as follows: HTML: &lt;div class="films"&gt; &lt;input type="text" class="form-control typeahead" placeholder="Search" name="films" autocomplete="off" id="search"&gt; &lt;/div&gt; Javascript: /* TypeAhead invoked */ var _prefetch_url = $root_path + '/media/mod_storelocator/stores_json.php'; // constructs the suggestion engine var films = new Bloodhound({ datumTokenizer: function (d) { return Bloodhound.tokenizers.whitespace(d.value); }, queryTokenizer: Bloodhound.tokenizers.whitespace, limit: 15, prefetch: _prefetch_url }); // kicks off the loading/processing of `local` and `prefetch` films.initialize(); $('.films .typeahead').typeahead(null, { displayKey : 'value', source: films.ttAdapter(), templates: { suggestion: Handlebars.compile([ '&lt;p class="repo-language"&gt;{{province}}&lt;/p&gt;', '&lt;p class="repo-name"&gt;{{name}}&lt;/p&gt;', '&lt;p class="repo-description"&gt;{{physical_address}}&lt;/p&gt;' ].join('')) } }); I'd really appreciate any help/pointers.
type: Question
tagged with: javascript
tagged with: jquery
upvote count: 2
has answer: http://stackoverflow.com/a/25296699
tagged with: typeahead.js
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/39474672
type: Comment
comment on: http://stackoverflow.com/a/25318133
has text: My example is just pseudocode. `.changed` isn't a part of Elessar, it's a method you should implement on your data model.
score: 1
type: AnswerComment

http://stackoverflow.com/q/25327885
has title: Displaying contents of a knockout observable array
tagged with: javascript
has answer: http://stackoverflow.com/a/25327940
has comment: http://stackoverflow.com/comment/39485635
favorite count: 0
downvote count: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25327940
tagged with: knockout.js
type: Question
has body: Hi guys I'm new to java Script knockout framework, I would like to display contents of an array using knockout, in reality I want to retrieve these contents from a database using ajax but I decided to start with something simpler, which is like this: $(document).ready(function() { function requestViewModel() { this.branchName = ko.observable(); this.allItems = ko.observableArray({items:[{orderItemId:1, description:"Chocolate", unitCost:8.50, quantity:10, total:84.0}, {orderItemId:2, description:"Milk", unitCost:5.0, quantity:10, total:50.0}, {orderItemId:3, description:"Sugar", unitCost:10.0, quantity:20, total:200.0}]}); }; ko.applyBindings(new requestViewModel()); }); ......and here is my HTML Branch Name: Item id Description Unit Cost Quantity Total Please help where you can coz I get an error which is: "Error: The argument passed when initializing an observable array must be an array, or null, or undefined."
upvote count: 0
score: -2
tagged with: arrays
answer count: 1

http://stackoverflow.com/comment/39691916
has text: Thanks again, works a treat, almost finished with getting proper data to it as well :)
comment on: http://stackoverflow.com/a/25384258
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25322977
score: 0
has answer: http://stackoverflow.com/a/25325904
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39479466
has comment: http://stackoverflow.com/comment/39474419
has comment: http://stackoverflow.com/comment/39475705
has body: I have set up ui router with the following states: $locationProvider.html5Mode(true); $urlRouterProvider.otherwise('/'); $stateProvider .state('adminprojects', { url: '/adminprojects', templateUrl: 'views/adminProjects.html', controller: 'adminProjectsCtrl' }) .state('adminprojectsdetails', { url: '/adminprojects/:id', templateUrl: 'views/adminProjectsDetails.html', controller: 'adminProjectsDetailsCtrl' }) adminprojects view contains a list with ui-sref links. eg Project 1 If I click this link for example adminprojects/1 the adminProjectsDetails.html view is shown correctly. However if I refresh this page or navigate directly to this url then the view does not load. This however works as expected if I have html5 mode set to false; In express I have this router.get('/*', function(req, res) { res.sendfile(__dirname + '/public/index.html'); }); Controller are just pretty much boilerplate for now: angular.module('jhApp') .controller('adminProjectsCtrl', function($scope, projects) { $scope.projects = projects.items; }); and angular.module('jhApp') .controller('adminProjectsDetailsCtrl', function($scope, $stateParams) { console.log($stateParams); }); Any ideas why this is not working?
has comment: http://stackoverflow.com/comment/39555197
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25325904
tagged with: angular-ui-router
has comment: http://stackoverflow.com/comment/39476168
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/39476523
has title: Angular ui-router with express
tagged with: javascript
tagged with: express

http://stackoverflow.com/comment/39301821
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25230614
has text: Please take the time to format your code correctly. It makes it much easier for you and others to read.
score: 0

http://stackoverflow.com/a/25236596
has comment: http://stackoverflow.com/comment/39314442
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39314739
has comment: http://stackoverflow.com/comment/39314206
has comment: http://stackoverflow.com/comment/39315013
accepted answer of: http://stackoverflow.com/q/25236483
score: 0
answers question: http://stackoverflow.com/q/25236483
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39314726
has comment: http://stackoverflow.com/comment/39314040
type: Answer
has body: The simplest way I can think of would be to insert a second copy of the first slide at the end so you have three slides and then another copy of the first and you tell it not to auto-repeat. $(document).ready(function() { $('.bxslider').bxSlider({ auto: true, autoControls: true, pause: 5000, infiniteLoop: false, // don't auto-repeat slideMargin: 0 }); }); Beyond that, you could specify a callback and after the third slide finishes displaying, you could stop the auto-advance and then tell it to goto the first slide. $(document).ready(function() { var slider = $('.bxslider').bxSlider({ auto: true, autoControls: true, pause: 5000, infiniteLoop: false, slideMargin: 0, onSlideNext: function($slideElement, oldIndex, newIndex) { if (newIndex &gt;= 3) { slider.stopAuto(); slider.goToSlide(0); } } }); }); If you only have three slides (a fact you haven't included that would have helped us), then perhaps you won't get an onSlideNext event when infiniteLoop is off. In that case, you could use the onSlideAfter method and trigger after showing the third slide. $(document).ready(function() { var slider = $('.bxslider').bxSlider({ auto: true, autoControls: true, pause: 5000, infiniteLoop: false, slideMargin: 0, onSlideAfter: function($slideElement, oldIndex, newIndex) { if (newIndex &gt;= 2) { slider.stopAuto(); setTimeout(function() { slider.goToSlide(0); }, 5000); // put whatever time here you want the 3rd slide to show } } }); });

http://stackoverflow.com/comment/39452863
type: Comment
comment on: http://stackoverflow.com/a/25311426
score: 0
has text: Thanks for your help ! I used strings because JSLint got mad at me with the locales format (maybe the '-'), anyways, it's working now. (just, the return was `language` and not `routeByLanguage` but this is minor, thanks again). Will mark as answer as soon as SO allows it.
type: AnswerComment

http://stackoverflow.com/comment/39347771
score: 0
type: Comment
has text: ah thank you! Now I don't have the undefined problem, I still have the problem that the url in my browser changes to the 'routed' url, but the view doesn't change. Any reason why that might be?
type: AnswerComment
comment on: http://stackoverflow.com/a/25254463

http://stackoverflow.com/q/25371008
has comment: http://stackoverflow.com/comment/39562889
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39562891
has comment: http://stackoverflow.com/comment/39562786
has comment: http://stackoverflow.com/comment/39562789
has comment: http://stackoverflow.com/comment/39562836
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25371149
has comment: http://stackoverflow.com/comment/39562807
linked to: http://stackoverflow.com/q/19874555
answer count: 1
tagged with: jquery
favorite count: 0
duplicate of: http://stackoverflow.com/q/19874555
has title: How to convert json containg different key value pairs to a list javascript?
has comment: http://stackoverflow.com/comment/39562832
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39562881
has body: i have a json string in the format var jsonData = [{"label":"Hass1(xxx_sem@hotmail.com)","value":"xxx_sem@hotmail.com"},{"label":"Hass(sxx_sem@hotmail.com)","value":"sxx_sem@hotmail.com"},{"label":"Sam(sx_sem@hotmail.com)","value":"sx_sem@hotmail.com"}] i need to convert it in the format it into this way var obj = {"Hass1(xxx_sem@hotmail.com)":"xxx_sem@hotmail.com", "Hass(sxx_sem@hotmail.com)","sxx_sem@hotmail.com"} how to do so? I have implemented so far like function ConvertMeJason(jsonMe) { var list = JSON.parse(jsonMe); list.Object.forEach(function (obj) { /// I am getting error undefined function foreach emptyJson.add('"' + obj.label + '"', '"' + obj.value + '"'); }) }
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25371149

http://stackoverflow.com/comment/39480735
type: QuestionComment
comment on: http://stackoverflow.com/q/25326316
has text: All of that said, I did come up with a nasty way to handle it. On the server I checkedsummed all my hidden fields, then I wrote the fields + the checksum out, and then read them back on the way in and validated the checksum. That .. kinda worked. I also took hidden input fields and turned them into a JSON object, then encrypted that, and decrypted on the way back in.
type: Comment
score: 0

http://stackoverflow.com/comment/39518996
comment on: http://stackoverflow.com/q/25347518
score: 2
type: Comment
type: QuestionComment
has text: Obviously `padding-left`

http://stackoverflow.com/a/25281931
downvote count: 0
has body: Consider the following in which all the data is embedded in the JavaScript (HTML) when the PHP code runs on the server. Thus PHP never "sees" the JavaScript value, but the JS has access to all the possible PHP values. The values (which are once again embedded in the PHP generated HTML) are supplied via json_encode in a pretty package - JSON is "close enough" to JS Object Literals for this to work reliably (json_encode without the JSON_UNESCAPED_UNICODE option is also immune to the linked quibble). &lt;?php // Array values come from PHP $cars = array("Volvo", "BMW", "Toyota"); ?&gt; &lt;script&gt; // Don't forget JSON_HEX_TAG when using this method! var cars = &lt;?php echo json_encode($cars, JSON_HEX_TAG); ?&gt;; // Equivalent to the following with the above data, but in Real Life // the data might come from a dynamic source or also be used in PHP. // var cars = ["Volvo", "BMW", "Toyota"]; // Now all the data is available to JavaScript, which can be treated as // a normal JavaScript array. var varCounter = 0; var varName = function() { if (varCounter &lt; cars.length) { // Do *not* use document.write after the document is closed alert(cars[varCounter]); varCounter++; } else { clearInterval(varName); } }; // etc. &lt;/script&gt;
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25281758
answers question: http://stackoverflow.com/q/25281758
type: Answer
score: 2

http://stackoverflow.com/q/25352108
has comment: http://stackoverflow.com/comment/39527076
type: Question
tagged with: browser
has title: Access element without referencing to it
answer count: 2
has answer: http://stackoverflow.com/a/25352149
linked to: http://stackoverflow.com/q/6381425
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39527059
duplicate of: http://stackoverflow.com/q/6381425
favorite count: 0
has body: Recently, I noticed that browsers automatically create variables to reference elements with id. For example, stackoverflow logo on this page Stack Overflow or question info at the right side You can access these by just using their id. Try it on the console. What I want to know is that when was this feature (if it's) implemented? What of its future? Where can I find the documentation?
has comment: http://stackoverflow.com/comment/39527165
has answer: http://stackoverflow.com/a/25352154
has comment: http://stackoverflow.com/comment/39527085
score: 1
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/39549702
comment on: http://stackoverflow.com/a/25362796
score: 0
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/59508/discussion-between-al123-and-fonzy).
type: AnswerComment

http://stackoverflow.com/q/25346911
has answer: http://stackoverflow.com/a/25347570
type: Question
tagged with: canvas
answer count: 1
downvote count: 0
tagged with: javascript
has title: My javascript canvas map script and poor performance
has body: Basically below is my script for a prototype which uses 128x128 tiles to draw a map on a canvas which user can drag to move around. Script does work. However I have a few problems to be solved: 1. Poor performance and I can't figure out why. 2. I am missing a method to buffer the tiles before the actual drawing. 3. If you notice any other issues also that could help me to make things run more smoothly it would be fantastic. Some explanations for the script: variables coordinates - Defines the actual images to be displayed. Image file names are type of '0_1.jpg', where 0 is Y and 1 is X. mouse_position - As name says, is keeping record of mouse position. position - This is a poorly named variable. It defines the position of the context drawn on canvas. This changes when user drags the view. Any assistance would be appreciated greatly. Thank you. var coordinates = [0, 0]; var mouse_position = [0, 0]; var position = [-128, -128]; var canvas = document.getElementById('map_canvas'); var context = canvas.getContext('2d'); var buffer = []; var buffer_x = Math.floor(window.innerWidth/128)+4; var buffer_y = Math.floor(window.innerHeight/128)+4; var animation_frame_request = function() { var a = window.requestAnimationFrame; var b = window.webkitRequestAnimationFrame; var c = window.mozRequestAnimationFrame; var d = function(callback) { window.setTimeout(callback, 1000/60); } return a || b || c || d; } var resizeCanvas = function() { window.canvas.width = window.innerWidth; window.canvas.height = window.innerHeight; window.buffer_x = Math.floor(window.innerWidth/128)+4; window.buffer_y = Math.floor(window.innerHeight/128)+4; window.buffer = []; for (row = 0; row &lt; window.buffer_y; row++) { x = []; for (col = 0; col &lt; window.buffer_x; col++) { x.push(new Image()); } window.buffer.push(x); } } var render = function() { animation_frame_request(render); for (row = 0; row &lt; window.buffer_y; row++) { for (col = 0; col &lt; window.buffer_x; col++) { cy = window.coordinates[…
accepted answer: http://stackoverflow.com/a/25347570
favorite count: 0
upvote count: 1
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/39507690
type: Comment
has text: I'd guess that the OP has done something weird. As far as I'm aware, all JavaScript implementations support this, even IE5 and below.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25340507

http://stackoverflow.com/q/25329678
type: Question
has comment: http://stackoverflow.com/comment/39487505
tagged with: object
has body: So i'm trying to do a simple test to see if addEventListener can reach a method inside my object.. So far, no bueno. Can anyone help and explain the reason why? From what i understand, when i click, it's looking for that method in the DOM. I tried using bind but nothing happens. Doing it this way, at least i get an error. Guess i am not linking it correctly? HELP Please :( The Error ----&gt; Uncaught TypeError: undefined is not a function testing.js:12 (anonymous function) var userOne = function(){ this.go = function(){ alert("hello"); }; } unction getEle(what){ return document.getElementById(what); } function eventClick(id,func){ return getEle(id).addEventListener("click", func); } eventClick("starter",function(){userOne.go();}); //is line 12
tagged with: addeventlistener
has answer: http://stackoverflow.com/a/25329794
tagged with: javascript
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/39487608
answer count: 1
has comment: http://stackoverflow.com/comment/39488761
has comment: http://stackoverflow.com/comment/39487528
favorite count: 0
has comment: http://stackoverflow.com/comment/39487088
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39487125
score: -1
has title: Stuck. AddeventListener won't proccess my method inside my property. Javascript

http://stackoverflow.com/q/25326564
tagged with: twitter-bootstrap
type: AnsweredQuestion
downvote count: 0
type: Question
score: 5
has body: After a blur event on an input field "bootbox1", I want to use a Bootstrap Modal for an message, after the modal closes the focus would go to the input field "bootbox2". But the input field does not get focus. What am I doing wrong? Demo HTML &lt;input type="text" id="bootbox" /&gt; &lt;input type="text" id="bootbox2" /&gt; &lt;div id="myModal" class="modal fade"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;!-- dialog body --&gt; &lt;div class="modal-body"&gt; &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;Hello world!&lt;/div&gt; &lt;!-- dialog buttons --&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-primary"&gt;OK&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; JS $('#bootbox').on('blur', function checkSelection(e) { $("#myModal").on("show", function () { // wire up the OK button to dismiss the modal when shown $("#myModal a.btn").on("click", function (e) { console.log("button pressed"); // just as an example... $("#myModal").modal('hide'); $('#bootbox2').focus(); // dismiss the dialog }); }); $("#myModal").on("hide", function () { // remove the event listeners when the dialog is dismissed $("#myModal a.btn").off("click"); $('#bootbox2').focus(); }); $("#myModal").on("hidden", function () { // remove the actual elements from the DOM when fully hidden $("#myModal").remove(); }); $("#myModal").modal({ // wire up the actual modal functionality and show the dialog "backdrop": "static", "keyboard": true, "show": true // ensure the modal is shown immediately }); }); //this works $('#bootbox2').on('blur', function checkSelection(e) { $('#bootbox').focus(); });
tagged with: javascript
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25326910
upvote count: 5
accepted answer: http://stackoverflow.com/a/25326910
tagged with: focus
has title: Focus on Input when Bootstrap Modal closes

http://stackoverflow.com/comment/39386568
has text: It worked!! Thank you very much!! It was a lot easier that I thought... :)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25275449

http://stackoverflow.com/comment/39546439
score: 0
has text: sometimes, you can't do that, the event listener approach is better, IMHO
comment on: http://stackoverflow.com/a/25362751
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39560355
type: Comment
comment on: http://stackoverflow.com/a/25368240
score: 0
type: AnswerComment
has text: Note that another part of the performance issue is concatenating up to (I'm assuming) 50MB of string data in a loop god knows how many times. You're basically making a copy of the 50MB string and throwing it away every loop.

touch
tags question: http://stackoverflow.com/q/25354392
tags question: http://stackoverflow.com/q/25266095
type: Tag
tags question: http://stackoverflow.com/q/25287905
tags question: http://stackoverflow.com/q/25323569
tags question: http://stackoverflow.com/q/25376803
tags question: http://stackoverflow.com/q/25384903
tag name: touch

http://stackoverflow.com/a/25266721
has body: Use jQuery Keydown function. More detail here. $( '#page').keydown(function() { alert( "Handler for .keydown() called." ); });
type: Answer
answers question: http://stackoverflow.com/q/25266611
score: 0

http://stackoverflow.com/a/25355011
answers question: http://stackoverflow.com/q/25354462
has body: I was able to make a temporary fix by having two different variables containing the same set of users - One containing the real names with æøå and another with replaced values. (for the search function to look at) If somebody is having a similar issue, the function to replace characters looks like this: var mapObj = { æ:"ae", ø:"oe", å:"aa", Æ:"AE", Ø:"OE", Å:"AA" }; sTerm = sTerm.replace(/æ|ø|å|Æ|Ø|Å/gi, function(matched){ return mapObj[matched]; }); if someone has a better solution, i'm still interested. :)
score: 0
type: Answer

http://stackoverflow.com/comment/39439373
has text: `indexOf()` isn't a function of an integer, hence the undefined warning. Perhaps you should first check if the variable is indeed an integer or a string.
type: QuestionComment
comment on: http://stackoverflow.com/q/25303394
type: Comment
score: 0

http://stackoverflow.com/q/25253544
tagged with: ajax
answer count: 1
tagged with: python
favorite count: 0
upvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25253737
has body: Update Javascript with results from Python script. I want to update my Javascript script with Python script in Flask. I get a value from my Python script, and want to pass it to or update Javascript. But can 't figure out how in Flask. The following is my Javascript that I need to update: events: { load: function() { // set up the updating of the chart each second var series = this.series[0]; setInterval(function() { var x = (new Date()).getTime(); // Value from Python script (DataFrame) var y = Math.random() * 100; series.addPoint([x, y], true, true); }, 5000); } } Here, I am passing random values but I want to pass the value from my Python script. My Python script would be like the following: import MySQLdb import pandas.io.sql as sqlio host = "~~~" # Public port = 1111 username = "aa" password = "aaa" database = "aaaa" conn = MySQLdb.connect(host=host, user=username, passwd=password, db=database, port=port) qry1 = """ ~~ """ df = sqlio.read_sql(qry1, conn) df['count'][0] # return some number in Python function members. I know you won' have get
type: Question
has comment: http://stackoverflow.com/comment/39346165
has comment: http://stackoverflow.com/comment/39346458
accepted answer: http://stackoverflow.com/a/25253737
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: flask
has title: Update Javascript with results from Python script

http://stackoverflow.com/a/25440673
answers question: http://stackoverflow.com/q/25335773
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: marcoseu is right, the There is no timestamp for... error means karma cant find the the file, but there is more. I'd recommend making karma's base path your project root. This avoids Karma making the file paths absolute instead of relative which keeps things simpler and avoids path reference problems (at least on my windows OS). Your test should be a require module (i.e. using define) so it can be sure the objects it requires are fully loaded. See the example test at http://karma-runner.github.io/0.12/plus/requirejs.html karma.config.js basePath: "../", files: [ 'test/test-main.js', {pattern: 'test/specs/*.js', included: false}, {pattern: 'www/**/*.js', included: false}, ], Now your files are all served by Karma under /base. test-main.js require.config({ baseUrl: "/base/www/scripts", Debugging But most importantly you can debug all of this. Run Karma, switch to the Karma created chrome instance, click the debug button, open the chrome developer tools. Check the console, and your source files. Especially the source of debug.html, as at the bottom it has the definition of all your karma served files. You can also set breakpoints and then refresh the page to watch the tests being executed. You will be able to see for yourself why you are getting test errors. Win.

http://stackoverflow.com/comment/39534739
has text: @JoseMagana It's kind of obvious that the number will go over 10 in the real situation... look at the leading 0s.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25356350

http://stackoverflow.com/q/25237069
tagged with: class
has comment: http://stackoverflow.com/comment/39318164
has title: onclick event to call javascript prototype function
answer count: 0
has comment: http://stackoverflow.com/comment/39333619
type: Question
has comment: http://stackoverflow.com/comment/39314839
has comment: http://stackoverflow.com/comment/39333570
tagged with: onclick
score: 0
has comment: http://stackoverflow.com/comment/39314814
tagged with: javascript
has body: Is it possible to do something like this inside a class: Remove in order to call this: myclass.prototype.remove = function(id, name){ //do stuff } ? Currently my remove function is outside the class on its own, but I need it to be able to access and manipulate the configuration settings array that exists inside the class.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39314759
tagged with: prototype

http://stackoverflow.com/comment/39431647
type: Comment
comment on: http://stackoverflow.com/a/25290815
score: 0
type: AnswerComment
has text: Hi @JoeSloth, yes it is working but i can't pick the color now, check http://jsfiddle.net/cKWNv/15/ here

http://stackoverflow.com/comment/39639115
type: Comment
type: QuestionComment
has text: It doesn't output anything in the HTML. I'm thinking there might be a special way to assign that global variable to a Javascript var... but I don't know what.
comment on: http://stackoverflow.com/q/25389599
score: 0

http://stackoverflow.com/comment/39478469
has text: I don't understand your comment. Have you checked the example: http://jsfiddle.net/djd5m4yu/1/ ?
type: Comment
comment on: http://stackoverflow.com/a/25324447
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39394712
type: Comment
score: 0
has text: css is very powerfull and let you make you different kind of chainings
comment on: http://stackoverflow.com/q/25280222
type: QuestionComment

http://stackoverflow.com/q/25253773
accepted answer: http://stackoverflow.com/a/25254095
answer count: 1
tagged with: jquery
tagged with: callback
type: AnsweredQuestion
has title: Using a JS function defined in an included library, my success & error callbacks do not fire. Issue with my JS or theirs?
has answer: http://stackoverflow.com/a/25254095
tagged with: ruby-on-rails
type: Question
tagged with: javascript
has body: Relatively new to Javascript/Jquery! tl;dr When I call a function (defined in an external library that I include), my success AND failure callback functions simply do not fire. Given my code below, is this an issue with my javascript or theirs? I am using an external API along with it's Javascript library, which I include like so: app/views/layouts/application.html.haml : = javascript_include_tag 'application' &lt;script type="text/javascript" src="http://parcelstream.com/api/DmpApi.aspx?map=Bing&amp;services=Utility&amp;host=parcelstream.com/&amp;v=4"&gt;&lt;/script&gt; My javascript, which is run on page load: app/assets/javascripts/mine.js : function GetByGeometry(point) { function successCallback(json) { console.log("success callback called"); // real code here, cut for brevity } function errorCallback(error) { console.log("error callback called"); // real code here, cut for brevity } var url = "getByGeometry.aspx?returnGeoType=1&amp;dataSource=SS.Base.Parcels/Parcels&amp;Geo=" + point; console.log("this is my query URL: " + url); Dmp.Env.Connections["SS"].getJson(url, successCallback, errorCallback); } I am getting no feedback whatsoever. Neither successCallback nor errorCallback are ever fired off, and I am not getting an error either. What am I missing? Is this an error on my end, or is there something wrong with their .getJson() function? Any insight would be greatly appreciated!
score: 0
tagged with: ruby-on-rails-4

checkbox
tags question: http://stackoverflow.com/q/25321386
tag name: checkbox
tags question: http://stackoverflow.com/q/25363012
tags question: http://stackoverflow.com/q/25348347
tags question: http://stackoverflow.com/q/25251588
tags question: http://stackoverflow.com/q/25300757
tags question: http://stackoverflow.com/q/25309609
tags question: http://stackoverflow.com/q/25248892
tags question: http://stackoverflow.com/q/25269298
tags question: http://stackoverflow.com/q/25287547
tags question: http://stackoverflow.com/q/25238489
tags question: http://stackoverflow.com/q/25310370
tags question: http://stackoverflow.com/q/25297154
tags question: http://stackoverflow.com/q/25340928
tags question: http://stackoverflow.com/q/25384345
tags question: http://stackoverflow.com/q/25265593
tags question: http://stackoverflow.com/q/25248868
tags question: http://stackoverflow.com/q/25279221
tags question: http://stackoverflow.com/q/25334617
tags question: http://stackoverflow.com/q/25265557
tags question: http://stackoverflow.com/q/25298377
tags question: http://stackoverflow.com/q/25274109
type: Tag
tags question: http://stackoverflow.com/q/25315107
tags question: http://stackoverflow.com/q/25302521
tags question: http://stackoverflow.com/q/25381907
tags question: http://stackoverflow.com/q/25373524
tags question: http://stackoverflow.com/q/25283917

http://stackoverflow.com/comment/39509431
comment on: http://stackoverflow.com/a/25327684
score: 0
type: Comment
has text: please give me the details initial array. I can fix it but without details I'm working blind
type: AnswerComment

http://stackoverflow.com/a/25239774
type: AcceptedAnswer
downvote count: 0
has body: Your first step should be to profile your existing HTML code to find out why it's slow. A table with 7200 cells doesn't have to be slow. I had tables which are 2 MB raw HTML and the browser would render them in less than 2 seconds - five years ago. Neither canvas or SVG will magically solve your performance issues for you.
type: Answer
has comment: http://stackoverflow.com/comment/39325060
accepted answer of: http://stackoverflow.com/q/25239608
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25239608
has comment: http://stackoverflow.com/comment/39324132

http://stackoverflow.com/q/25379340
tagged with: java
has comment: http://stackoverflow.com/comment/39594555
has comment: http://stackoverflow.com/comment/39628252
upvote count: 8
type: Question
has comment: http://stackoverflow.com/comment/39628322
tagged with: nashorn
has comment: http://stackoverflow.com/comment/39639561
has body: I’ve faced with the following problem. I’d like to use java.util.HashMap and java.util.PriorityQueue in Nashorn script, where I need to use particular custom object as a key in the HashMap, and also use HashMap.containsKey() to check if there is a key in the Map (another option is to check if the object in a Collection.contains(Object o)). So, obviously, I need to implement equals and hashCode in my object basing on some field values. For example: Trying to use JavaScript. Doesn’t work due to JavaScript doesn’t have those methods. Please see Sample 1 and Sample 2 Extending java.lang.Object. Sample 3. Works partially, Methods are being invoked. But How to plugin constructor with parameters? How to do the cast from this:[object Object] to other:jdk.nashorn.javaadapters.java.lang.Object@0, or vice versa? Implementing my custom class in Java and extend it in JavaScript. Sample 4. Works. But do I need Nashorn if I have to use Java? var PriorityQueue = java.util.PriorityQueue; var HashMap = java.util.HashMap; var Integer = java.lang.Integer; // Sample 1 // Doesn't work, equals and hashCode are not being invoked function Vertex1(from, cost) { this.from = from; this.cost = cost; this.equals = function(other) { return this.from == other.from; } this.hashCode = function() { return Integer.hashCode(this.from); } } var hm = new HashMap(); hm.put(new Vertex1(1, 10), 10); hm.put(new Vertex1(1, 20), 21); // Prints size is 2, but I'd like to see 1 print("HashMap size: " + hm.size()); // Prints false print("HashMap1 contains: " + hm.containsKey(new Vertex1(1, 20))); // ------------------------------------------------------------------ // Sample 2 // Doesn't work, equals and hashCode are not being invoked function Vertex1(from, cost) { this.from = from; this.cost = cost; } Vertex1.prototype = { equals : function(other) { return this.from == other.from; }, hashCode : function() { return Integer.hashCode(this.from); }, } var hm = new HashMap(); hm.put(new Vertex1(1, 10), 10); hm.put(ne…
tagged with: javascript
has title: Nashorn, Java collections, How to implement equals and hashCode in pure javascript
has comment: http://stackoverflow.com/comment/39622674
has comment: http://stackoverflow.com/comment/63780780
answer count: 1
score: 8
accepted answer: http://stackoverflow.com/a/25381827
favorite count: 0
has comment: http://stackoverflow.com/comment/39635678
tagged with: equals
has comment: http://stackoverflow.com/comment/39627940
has comment: http://stackoverflow.com/comment/39627826
has answer: http://stackoverflow.com/a/25381827
has comment: http://stackoverflow.com/comment/39622728
type: AnsweredQuestion
downvote count: 0
tagged with: hashcode

http://stackoverflow.com/comment/39306551
comment on: http://stackoverflow.com/q/25232869
has text: You have `width:0` set via the `style` attribute (through jQuery’s `.css`) – and that has a higher specificity than your `.tab.active .overflow` rule that tries to set `width:100%`. Instead of hiding the elements that way, use matching CSS rules (than can be overwritten by a `:hover` rule with same or higher specificity).
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25300504
downvote count: 0
type: Answer
upvote count: 3
has body: Try to use :not-selector like, Let someId is a textbox and otherId is that texxarea which should not be empty $('#btnClear').on('click', function () { $(this).closest('form').find('input:not(#someId),textarea:not(#otherId)').val(''); }); Also you can use a common class like non-empty-elements with :not like $('#btnClear').on('click', function () { $(this).closest('form') .find('input[type=text], textarea, input[type=password]') .not('.non-empty-elements')// filter non-empty-elements .val(''); }); Note that, you need to add non-empty-elements class to those elements which should not be empty
answers question: http://stackoverflow.com/q/25300478
score: 3

http://stackoverflow.com/a/25276414
type: Answer
answers question: http://stackoverflow.com/q/25276357
score: 0
has body: Using setTimeout simply executes the code after the given time, whereas promises executes code once the promised task has completed. Promises are used when dealing with things in which completion time is unknown, such as ajax requests. In setTimeout, you know when exactly to execute some code.

http://stackoverflow.com/comment/39323951
comment on: http://stackoverflow.com/a/25236936
type: AnswerComment
score: 0
type: Comment
has text: Added fork with example

http://stackoverflow.com/comment/39489763
has text: @jskidd3 You're welcome! If you end up wanting to put that fragment into the web page's DOM, make sure to `.append($(myString))` on something in the DOM. E.g. `var $myHtml = $(myString); /* do something to it */ $('.some-selector').append($myHtml);`.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25331026

http://stackoverflow.com/comment/39318163
has text: This is easily done, but what have you tried so far? Just handing you a solution will not help you learn, nor is it the intensions of this site.
score: 0
comment on: http://stackoverflow.com/q/25238962
type: Comment
type: QuestionComment

simplexml
type: Tag
tags question: http://stackoverflow.com/q/25337071
tag name: simplexml

http://stackoverflow.com/a/25267141
has body: After more research I've found this is handled differently in v1.0. var manager = io.Manager('http://example.com:3000', {}); var socket = manager.socket('/'); manager.on('connect_error', function() { console.log("fail"); // does get here now });
accepted answer of: http://stackoverflow.com/q/25266374
type: Answer
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25266374

http://stackoverflow.com/q/25254986
tagged with: javascript
type: UnansweredQuestion
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39353318
tagged with: cordova
has comment: http://stackoverflow.com/comment/39367774
has title: How to detect URL scheme and prevent the default navigation to that URL in phonegap hybrid application
answer count: 2
has comment: http://stackoverflow.com/comment/39349787
tagged with: ibm-mobilefirst
has body: I have the following requirement for my application (Android, iOS): When the application launches it displays a login.html page (which is part of the application). After logging in, the application's webview should be occupied with home.jsp from an external domain. When user clicks on logout button in home.jsp it has to navigate back to login page . On click of logout when we usewindow.location.href="login.html" then it tries to find the page on xxx domain. Is there a way to detect this navigation URL and override the URL from javascript or phonegap properties in the application?
score: 0
has answer: http://stackoverflow.com/a/27457281
has answer: http://stackoverflow.com/a/27457104
has comment: http://stackoverflow.com/comment/39367408

http://stackoverflow.com/comment/39672318
score: 0
type: AnswerComment
type: Comment
has text: And this method is widely used and robust enough for modernizr but somehow not for you (https://github.com/Modernizr/Modernizr/blob/master/src/isEventSupported.js). Kinda not cool to accept your own answers making stuff in more complex manner.
comment on: http://stackoverflow.com/a/25284826

http://stackoverflow.com/a/25366906
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25366846
upvote count: 3
has body: If you changed your #submit element's type to "submit", you wouldn't need to manually handle this yourself anyway as this is default browser behaviour: &lt;input id="submit" type="submit" value="Search" /&gt; Now rather than handling the #submit button's click event, we can instead handle the form element's submit event: $('form[role="search"]').submit(function() { var url = "http://asla.org/awardssearch.html"; url += "?s=" + $('#GoogleCSE').val(); window.location = url; }); JSFiddle demo.
score: 3
has comment: http://stackoverflow.com/comment/39564870

http://stackoverflow.com/comment/39519492
score: 0
type: Comment
has text: @monkeyinsight yes how please?
type: QuestionComment
comment on: http://stackoverflow.com/q/25347857

http://stackoverflow.com/comment/39475339
comment on: http://stackoverflow.com/q/25323573
score: 0
type: QuestionComment
type: Comment
has text: Yes, I understand, and setInterval is working fine on iOS, the problem may be how I have used it with JQuery.

http://stackoverflow.com/comment/39395242
has text: putting into a frame is the only solution I heard so far, and server sent event has the same problem too. It seems to me that I should redesign my front end.
type: Comment
comment on: http://stackoverflow.com/a/25280429
score: 0
type: AnswerComment

popen
tags question: http://stackoverflow.com/q/25320047
type: Tag
tag name: popen

http://stackoverflow.com/comment/39462364
score: 0
type: Comment
type: QuestionComment
has text: @ctwheels To be honest, I am using Concrete5 and I wouldn't know how to change the link. Doubt it would make any difference. If i remove the 'wrapping' code that is giving me trouble though, the 'Uncaught TypeError: undefined is not a function' error is gone.
comment on: http://stackoverflow.com/q/25315413

http://stackoverflow.com/q/25389342
has answer: http://stackoverflow.com/a/25389540
has comment: http://stackoverflow.com/comment/39597473
has answer: http://stackoverflow.com/a/25389576
has body: This question is not a duplicate of some of the other PHP & Javascript questions that have been asked here before, at least not one I have been able to find. I have a .php file that contains some HTML elements that get rendered by the PHP for the sake of argument here we will say the file is located at http://url.php. It is looking for certain GET tags, and including a div if those get tags exist. <?php if(isset($_GET['VAR'])) { echo ' '; }?> Of course I realize that this all happens on the server, and gets sent back to the clients web browser where the javascript takes over. But in the javascript (on the same PHP page) I have the following code that executes on page load looking for that div tag and doing something with it: if(document.getElementById("VARDIV")!==null) { alert('div exists!'); } While the page loads this should logically pop up the div if the URL is http://url.php?VAR correct? However it does not. If I run the javascript code a second time in the console it works fine, so its not a misspelling (such as getElementsById or something silly like that). How can this possibly render out of order like this? Should the PHP engine not render the HTML then pass it back to the browser before one line of JS is executed? EDITED FOR CLARITY BASED ON COMMENTS BELOW: <?php if(isset($_GET['VAR'])) { echo ' '; }?>
has comment: http://stackoverflow.com/comment/39597518
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39597395
has comment: http://stackoverflow.com/comment/39597515
has comment: http://stackoverflow.com/comment/39597678
linked to: http://stackoverflow.com/q/588040
has title: javascript executes before browser has finished rendering the page
has comment: http://stackoverflow.com/comment/39597477
has comment: http://stackoverflow.com/comment/39597801
has comment: http://stackoverflow.com/comment/39597597
tagged with: javascript
answer count: 6
has comment: http://stackoverflow.com/comment/39597521
has comment: http://stackoverflow.com/comment/39597368
type: Question
score: 0
has answer: http://stackoverflow.com/a/25389616
has comment: http://stackoverflow.com/comment/39597398
linked to: http://stackoverflow.com/q/3037725
has answer: http://stackoverflow.com/a/25389526
has answer: http://stackoverflow.com/a/25389627
has comment: http://stackoverflow.com/comment/39597600
linked to: http://stackoverflow.com/q/14028959
has comment: http://stackoverflow.com/comment/39597424
has answer: http://stackoverflow.com/a/25389486
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39597338
linked to: http://stackoverflow.com/q/9899372
tagged with: php

http://stackoverflow.com/comment/39341198
comment on: http://stackoverflow.com/q/25247302
type: Comment
score: 0
has text: Thanks for your reply. Would try this out. The other problem is that the rectangular DIVs are all rotated by 36 degrees each to form a piechart like structure. Hence, trying to check mouseX against the DIV left or top would not work in a few cases. Just wondering how could I identify the proper DIV even if it is more than 90 or 180 degrees rotated anticlockwise.
type: QuestionComment

http://stackoverflow.com/comment/39497282
type: Comment
type: QuestionComment
has text: step back and look at the bigger picture: once you get your ajax response, it's just a string. coming from ajax doesn't make it special. You should be asking how to strip html from a string in java.
comment on: http://stackoverflow.com/q/25334838
score: 2

http://stackoverflow.com/a/25347841
type: Answer
accepted answer of: http://stackoverflow.com/q/25347775
answers question: http://stackoverflow.com/q/25347775
upvote count: 1
type: AcceptedAnswer
downvote count: 0
score: 1
has body: There are no delimiters in RegExp constructor. You can use this regex: var re = /x='(\d+\.\d+)' +y='(\d+\.\d+)'/g; var str = "sid=\'206' x='34.8395' y='32.1178'&gt;×2 (206)"; while ((m = re.exec(str)) != null) { console.log(match[1], match[2]); } RegEx Demo

http://stackoverflow.com/a/25265295
accepted answer of: http://stackoverflow.com/q/25265034
type: Answer
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
has body: You have multiple options: Give specific id's to each &lt;li&gt; for eg, let's say you apply id's first, second and third respectively for the &lt;li&gt;'s You can add the background as follows: #first{ background: url("/path-to-image"); } #second{ background: url("/path-to-image"); } #third{ background: url("/path-to-image"); } Use different classes (i prefer id's since classes are meant to be used to group elements) Use CSS pseudo selectors. .wrap li:nth-child(1){ background: url("/path-to-image"); } .wrap li:nth-child(2){ background: url("/path-to-image"); } .wrap li:nth-child(3){ background: url("/path-to-image"); } like this
has comment: http://stackoverflow.com/comment/39367565
answers question: http://stackoverflow.com/q/25265034
has comment: http://stackoverflow.com/comment/39367532

http://stackoverflow.com/comment/43188369
comment on: http://stackoverflow.com/a/27349119
score: 0
type: AnswerComment
type: Comment
has text: I've tried `depthWrite = false;` before, but that doesn't really work. It completely screws up the rendering of the object.

http://stackoverflow.com/a/26775007
has body: You can add these two lines code to try: canvas._activeObject = null; canvas.setActiveGroup(group.setCoords()).renderAll();
score: 0
answers question: http://stackoverflow.com/q/25334413
type: Answer

http://stackoverflow.com/q/25233384
score: -2
tagged with: javascript
answer count: 2
downvote count: 2
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25233423
has body: I already have that code that set cookie with 1 day validity but i want to set cookie that expire after 1 hour instead of 1 day. How can i achieve this? HTML Link Javascript
has comment: http://stackoverflow.com/comment/39307472
has answer: http://stackoverflow.com/a/25233417
upvote count: 0
tagged with: cookies
type: Question
has title: Set cookie that expire after 1 hour instead of day

http://stackoverflow.com/q/25359877
has comment: http://stackoverflow.com/comment/39542023
has answer: http://stackoverflow.com/a/25359965
answer count: 4
accepted answer: http://stackoverflow.com/a/25359965
has title: Linebreak in a String in JavaScript
tagged with: line-breaks
has comment: http://stackoverflow.com/comment/39541259
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39541260
has answer: http://stackoverflow.com/a/25359956
type: Question
possible better answer: http://stackoverflow.com/a/25359913
upvote count: 1
has answer: http://stackoverflow.com/a/25359913
tagged with: javascript
has answer: http://stackoverflow.com/a/25360053
favorite count: 0
has body: I want to make a linkebreak in a String. In HTML it's like this (if I replace the T with a linkebreak): mystring.replace("T", "&lt;br&gt;"); But this doesn't work in JavaScript. The &lt;br&gt; is part of the String too. How do I implement this in JavaScript? Thanks! mystring BEFORE linkebreak: 2013-10-22T22:56:25.534Z mystring AFTER linebreak: 2013-10-22T 22:56:25.534Z

http://stackoverflow.com/comment/39339254
type: Comment
comment on: http://stackoverflow.com/q/25248402
has text: @worc I noticed that .end() only ends the most recent filter. My hope was to find a way to chain the slice and shuffle without having to split up the object into two variables and put it back together after the shuffle.
score: 0
type: QuestionComment

http://stackoverflow.com/q/25359481
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25359514
has body: My issue, is that the child(ren) of the containers: quint-...,mark-...,seal-...,glyph-... don't respond to .mouseenter() or .mouseleave(). Here's the code for a project I am working on, yes - league of legends related content: HTML: CSS: html, body { height:100%; background-color:#F7F7F7; background-size:cover; background-repeat:none; background-position:center; } * { margin:0; padding:0; font-size:12px; font-weight:400; } * .left {float:left;} * .right {float:right;} * .center {margin:auto auto;} * a { font-family:inherit; font-size:inherit; font-weight:inherit; text-decoration:none; color:inherit; } img, p {cursor:default;} table.runes { width:300px; border-collapse: collapse; } table.runes tr:nth-child(odd) { background: -webkit-linear-gradient(#F7F7F7, #FFF); /* For Safari 5.1 to 6.0 */ background: -o-linear-gradient(#F7F7F7, #FFF); /* For Opera 11.1 to 12.0 */ background: -moz-linear-gradient(#F7F7F7, #FFF); /* For Firefox 3.6 to 15 */ background: linear-gradient(#F7F7F7, #FFF); /* Standard syntax */ border:1px solid rgba(204,204,204,0.5); border-bottom:none; } table.runes tr:nth-child(even) { background:#FFF; border:1px solid rgba(204,204,204,0.5); border-top:none; } table.runes tr td:nth-child(2) {padding-left:5px;} table.runes tr td.index , table.runes tr td.type {display:none;} table.runes tr td.icon {cursor:pointer;} table.runes tr td.entry-name { font-weight:bold; cursor:pointer; } table.runes tr td.entry-desc { padding-bottom:5px; font-style:italic; cursor:default; } table.runes tr td.entry-name, table.runes tr td.entry-desc { padding-left:5px; padding-right:5px; } div.rune-calc { width:calc(100% - 362px); min-height:10px; margin:25px 25px 0; padding:5px; background:#FFF; border:1px solid rgba(204,204,204,0.5); } div.rune-calc div.quint-container, div.rune-calc div.mark-container, div.rune-calc div.seal-container, div.rune-calc div.glyph-container { display:inline-block; padding:5px; } div.rune-calc div.rune { width:48px; height:48px; background:red !imp…
score: 0
has title: issues with jquery.mouseenter() jquery.mouseleave() and child elements
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25359514
type: Question
answer count: 1

http://stackoverflow.com/comment/39480988
has text: If they must be the same module then you need them on the same file otherwise you can name them with different module names while you bring them all together into one main module that will inject them as dependencies
score: 0
comment on: http://stackoverflow.com/q/25326093
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25327684
has comment: http://stackoverflow.com/comment/39483157
has comment: http://stackoverflow.com/comment/39509431
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39484981
answers question: http://stackoverflow.com/q/25327561
downvote count: 0
type: Answer
has body: Here is what you are looking for: var temp = new Object(); for (var i=0; i&lt;=details.length;i++){ if(temp[details[i].name] === undefined){ temp[details[i].name] = new Array(); } temp[details[i].name].push({"name":details[i].name,"value":details[i].value}); } Here a jsfiddle to test it out a bit : http://jsfiddle.net/DavidLaberge2014/qryy14za/ In javascript you need to create a push method in an object to use it the way you did. It only works for the arrays.

http://stackoverflow.com/q/25344992
has comment: http://stackoverflow.com/comment/39515603
tagged with: http://stackoverflow.com/tag/json
type: Question
has body: this is javascript code to create json variable and i am not able to get how to acess >this json variable at servlet end. &lt;script&gt; function() { alert("sending"); var Jsonobj=JSON.stringify(folderarray); alert(Jsonobj); $.ajax({ url: '/Chandrayan-2014/src/Handler/FolderHandler.java'+param, type: 'POST', dataType: 'json', success: function(result) { alert('SUCCESS'); } }); alert("sent"); }
has answer: http://stackoverflow.com/a/25345160
tagged with: javascript
has title: converted JS array to JSON object but not able to read that json object at java servelet end
score: 0
answer count: 2
tagged with: jsp
possible better answer: http://stackoverflow.com/a/25345037
has answer: http://stackoverflow.com/a/25345037
accepted answer: http://stackoverflow.com/a/25345160
has comment: http://stackoverflow.com/comment/42547720
type: AnsweredQuestion

http://stackoverflow.com/comment/39409762
type: AnswerComment
type: Comment
score: 0
has text: Hmm... Well it's not redirecting to the other page anymore. Unfortunately, it's not redirecting to `http://stackoverflow.com` either.
comment on: http://stackoverflow.com/a/25288105

http://stackoverflow.com/comment/39565088
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25372042
has text: "Is it possible to use JavaScript functions for extracted text in android's TextView?" can you provide one of those reasons that's not available in the SDK or libraries and the overhead of bringing a javascript engine is justified?
score: 0

http://stackoverflow.com/comment/39523228
type: QuestionComment
has text: you need to use the wss:// protocol instead of just ws://, but i guess you knew that, so what's the question again?
score: 1
comment on: http://stackoverflow.com/q/25349412
type: Comment

http://stackoverflow.com/comment/39570514
score: 0
type: Comment
type: QuestionComment
has text: I just got a message that says that 'this question already has an answer' - Frustrating. I put in this same key words but I didn't find it. :(
comment on: http://stackoverflow.com/q/25375041

http://stackoverflow.com/a/25394891
score: 0
answers question: http://stackoverflow.com/q/25370665
type: Answer
has body: Google has a nice tutorial herethat may help you. And the code below should fix your problem. Note that it may not work jsfiddle, but it should work on your real page. var stillPresent = false; function initialize() { if (stillPresent == false) { $('#us2').locationpicker({ location : { latitude : 46.15242437752303, longitude : 2.7470703125 }, radius : 300, inputBinding : { latitudeInput : $('#us2-lat'), longitudeInput : $('#us2-lon'), radiusInput : $('#us2-radius'), locationNameInput : $('#us2-address') } }); stillPresent = true; } } function loadScript() { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'http://maps.google.com/maps/api/js?sensor=false&amp;libraries=places&amp;callback=initialize'; document.body.appendChild(script); } $('#myModal').on('shown.bs.modal', function(e) { loadScript(); }); Also, here is a link to a similar question.
has comment: http://stackoverflow.com/comment/39727717
has comment: http://stackoverflow.com/comment/39720978

http://stackoverflow.com/comment/39556542
comment on: http://stackoverflow.com/a/25367615
type: AnswerComment
score: 0
type: Comment
has text: I wish I could, but I like my job very much and I don't want to lose it. That is why I'm trying to work with this thing instead of against it.

attachevent
tag name: attachevent
type: Tag
tags question: http://stackoverflow.com/q/25288471

http://stackoverflow.com/comment/39456143
comment on: http://stackoverflow.com/a/25312977
type: AnswerComment
has text: @ดารกนารวดากาก: So you want to hide it immediately once the mouse leaves? Fiverr doesn’t do that.
type: Comment
score: 0

http://stackoverflow.com/a/25250255
type: Answer
has body: In order to do this it will in fact take a little bit of a "hack around". There is no JS method that will check your page automatically for left over space. As Ollie Ford suggested you can get the width and height of your element like so: var pageHeight = $(document).height(); var pageWidth = $(document).width(); var elementHeight = $("#foo").height(); var elementWidth = $("#foo").width(); if (pageHeight &gt; elementHeight) { // there is space for more elements height wise } if (pageWidth &gt; elementWidth) { // there is space for more elements width wise }
answers question: http://stackoverflow.com/q/25250103
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/a/25269181
accepted answer of: http://stackoverflow.com/q/25268041
score: 3
has comment: http://stackoverflow.com/comment/39374504
answers question: http://stackoverflow.com/q/25268041
type: AcceptedAnswer
downvote count: 0
has body: The problem is that you've put a transition in your CSS that's interfering. In particular transition: all 500ms; is changing the transition you're trying to set up in D3. Removing this CSS fixes the problem. Complete demo here.
upvote count: 3
has comment: http://stackoverflow.com/comment/39375879
type: Answer

http://stackoverflow.com/comment/39461763
comment on: http://stackoverflow.com/q/25316254
has text: Looks like [Node](http://nodejs.org/), not browser JS. [Require](http://requirejs.org/) in browser JS is async, so can't load a script like that. And only (?) Node can do filesystem operations.
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/comment/39352076
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25256842
has text: i see this code here http://stackoverflow.com/questions/1729501/javascript-overriding-alert

http://stackoverflow.com/q/25263947
upvote count: 1
has comment: http://stackoverflow.com/comment/39364455
type: Question
has body: I need to append some text to the Name column by jquery, I tried this but no luck: $(".ms-listviewtable").closest("tr").next().find(".ms-vb2:first").append(" test "); JSFiddle Example
tagged with: javascript
answer count: 6
accepted answer: http://stackoverflow.com/a/25264020
downvote count: 0
has title: Append text to a td cell by Jquery
tagged with: jquery
has answer: http://stackoverflow.com/a/25264043
favorite count: 0
has comment: http://stackoverflow.com/comment/39364517
has answer: http://stackoverflow.com/a/25264137
possible better answer: http://stackoverflow.com/a/25264033
has answer: http://stackoverflow.com/a/25264033
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25264055
has answer: http://stackoverflow.com/a/25264202
has answer: http://stackoverflow.com/a/25264020
score: 1
has comment: http://stackoverflow.com/comment/39364474

http://stackoverflow.com/comment/39506102
type: AnswerComment
comment on: http://stackoverflow.com/a/25338519
type: Comment
has text: What's your output, when you use `print_r($xml);` right after calling `simplexml_load_file`? Should be a pretty long output. You might have to save it to pastebin.com
score: 0

http://stackoverflow.com/comment/39532943
type: Comment
comment on: http://stackoverflow.com/a/25355353
score: 0
type: AnswerComment
has text: Actually you need to use `.html()` instead of `.val()`, just updated with demo.

http://stackoverflow.com/comment/39311367
score: 2
has text: Also, this `for ( i=0; i<=1 ; i ++)` is dangerous because `i` is an implicit global variable.
comment on: http://stackoverflow.com/q/25235166
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27369974
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25350556
has body: The solution I applied was to place the content I wished to be vertically aligned in a display: flex entry. For example: &lt;div style="display: flex; align-items: center;"&gt; ... other elements here &lt;/div&gt; for more details on this display type, see this excellent discussion: http://css-tricks.com/snippets/css/a-guide-to-flexbox/
upvote count: 2

http://stackoverflow.com/q/25258752
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has title: Making table cells editable on click
type: UnansweredQuestion
has body: I am trying to make a table which get its data from database. Now what I actually want to do is that when ever user clicks on a cell of any row, the data in cell should be editable. I am unable to figure it out to how to do that and also is there any way when user is done editing then I can save the changes in my database. Any suggestion are greatly appreciated
tagged with: php
has answer: http://stackoverflow.com/a/25258988
downvote count: 1
duplicate of: http://stackoverflow.com/q/6012823
type: Question
has comment: http://stackoverflow.com/comment/39355309
has comment: http://stackoverflow.com/comment/39355627
linked to: http://stackoverflow.com/q/6012823
score: 0

http://stackoverflow.com/comment/39497458
type: Comment
has text: No, the assumed scope is not within the object, the scope of that variable is now GLOBAL.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25334953

http://stackoverflow.com/a/25414101
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25387430
upvote count: 1
has body: After a lot of research, I have found that whatever I have been trying to do is not possible. Actually, this is called selection with multiple ranges which is supported ONLY by Firefox. There are some interesting information about this in the following articles: 1) https://bugzilla.mozilla.org/show_bug.cgi?id=753718#c0 2) https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html Read the Note which starts with Originally, the Selection You can read there that this feature is not available in other browsers except Firefox and it is unlikely to be added in the near future. Also, this issue has been covered sometimes in stackoverflow also. Examples: Is there a way selecting MULTIPLE areas of text with JS in Chrome and/or IE? Non-continuous selections in chrome? Sorry about the duplication and thanks to the people who spent time on it.
type: Answer

http://stackoverflow.com/q/25268118
has comment: http://stackoverflow.com/comment/39372353
score: -2
tagged with: css
favorite count: 0
has body: It is a calculator which has spans from which I want to take a values(1,2,3, etc.) and two fields: First for displaying what user is typing and the second is for result of calculation. The question how to get values so when I click on spans it will show it in the second field Here is the code. http://jsfiddle.net/ovesyan19/vb394983/2/ ( ) ← C 7 8 9 ÷ .... JS: var keys = document.querySelectorAll(".keys span"); keys.onclick = function(){ for (var i = 0; i < keys.length; i++) { alert(keys[i].innerHTML); }; }
answer count: 5
has title: Dynamical Calculator Javascript
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25268372
has answer: http://stackoverflow.com/a/25268337
downvote count: 3
type: Question
has answer: http://stackoverflow.com/a/25268320
has comment: http://stackoverflow.com/comment/39372642
has answer: http://stackoverflow.com/a/25268561
has answer: http://stackoverflow.com/a/25268397
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25268320
accepted answer: http://stackoverflow.com/a/25268372
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25240306
score: -1
answers question: http://stackoverflow.com/q/25239907
has comment: http://stackoverflow.com/comment/39324014
has body: Another way is to save it in a hidden input: success: function(response){ $("#hiddenInput").val(JSON.stringify(response)); }
has comment: http://stackoverflow.com/comment/39324895
has comment: http://stackoverflow.com/comment/39325462
type: Answer
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/39324412

http://stackoverflow.com/q/25354765
has answer: http://stackoverflow.com/a/25355245
accepted answer: http://stackoverflow.com/a/25355245
downvote count: 0
favorite count: 0
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25354872
upvote count: 6
tagged with: zipcode
type: AnsweredQuestion
has body: I need to populate some data based on the zipcode of the user visiting the site. Could somebody tell me how to retrieve the zipcode of the location of that user? I am using AngularJS on my app.
tagged with: geolocation
score: 6
type: Question
has title: How to get the zipcode of a user using AngularJS
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25354872
has comment: http://stackoverflow.com/comment/39532283
answer count: 2

http://stackoverflow.com/comment/39375181
type: QuestionComment
has text: As far as I can tell, the country dropdown is not using any separate code from the state dropdown. I've added some relevant PHP code above.
comment on: http://stackoverflow.com/q/25250359
score: 0
type: Comment

http://stackoverflow.com/comment/39365143
score: 0
has text: Which part fails completely because I use the same code and it works fine?
type: Comment
comment on: http://stackoverflow.com/a/25264153
type: AnswerComment

http://stackoverflow.com/comment/39379029
comment on: http://stackoverflow.com/a/25271514
score: 0
type: AnswerComment
type: Comment
has text: Thanks for the input. I ended up speaking with one of my project managers, and apparently for my purposes, utilizing Knockout is somewhat irrelevant since I'm not using a ViewModel of the MVVM architecture of Knockout to populate my table. The simplification of keeping track and binding objects/information is lost based on how I populate my table, so I have to approach it in a different manner.

http://stackoverflow.com/comment/39350321
comment on: http://stackoverflow.com/a/25255883
type: AnswerComment
score: 0
type: Comment
has text: I had the devtools network tab open for awhile, and they're making that same request every minute.

http://stackoverflow.com/q/25253101
has body: var CHECK_ITERATIONS = 5; function NewCheckEvent(device, account, eventId, url) { this.iteration = 0; this.status = "checking"; this.device = device; this.url = url; } NewCheckEvent.prototype.runCheckLoop = function() { if (this.iteration &lt; CHECK_ITERATIONS) { this.iteration = this.iteration++; console.log('iteration ' + this.iteration); setTimeout(function (){ this.runCheckLoop(); }.bind(this), 1000); } } var bob = new NewCheckEvent(14245, 92136, "9f2b2d3f-45d4-a82f-b12e082b1164", "dddd"); console.log(bob); bob.runCheckLoop(); one@localhost ~ $ node try.js { iteration: 0, status: 'checking', device: 14245, url: 'dddd' } iteration 0 iteration 0 iteration 0 How come this.iteration does not increment when runCheckLoop call's itself in the setTimeout? How would I go about fixing this?
has comment: http://stackoverflow.com/comment/39345470
possible better answer: http://stackoverflow.com/a/25253139
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39345523
accepted answer: http://stackoverflow.com/a/25253130
has title: Javascript- this.increment does not increment when method calls itself
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25253139
has answer: http://stackoverflow.com/a/25253130
has comment: http://stackoverflow.com/comment/39345272
tagged with: javascript
score: 0

http://stackoverflow.com/a/25247969
answers question: http://stackoverflow.com/q/25247021
type: Answer
has body: Edit, updated (v3) Try html (added 1 to end of attribute name , i.e., substitute notes1 for notes) &lt;input name="notes1" type="text" /&gt; js (v3) $(document).ready(function () { $("#addproduct").on("click", function () { var clone = $("[class^=product]:last") .clone(false, false)[0].outerHTML.replace(/(\d)/g, function(a) { return parseInt(a) + 1 }); $(clone).appendTo("body"); // console.log($(clone).attr("class")); }); }); jsfiddle http://jsfiddle.net/guest271314/z2nxe84e/
has comment: http://stackoverflow.com/comment/39335476
downvote count: 0
has comment: http://stackoverflow.com/comment/39342791
has comment: http://stackoverflow.com/comment/39342725
score: 1
has comment: http://stackoverflow.com/comment/39336333
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39343123
accepted answer of: http://stackoverflow.com/q/25247021

http://stackoverflow.com/comment/39500577
type: Comment
has text: There is a good summary in Wikipedia: http://en.wikipedia.org/wiki/Same-origin_policy
type: QuestionComment
comment on: http://stackoverflow.com/q/25336588
score: 0

http://stackoverflow.com/a/25296267
type: Answer
score: 0
has body: No; you don't have a reference left to the anonymous function. One way around this would be to declare the function just above your mouseover call: var param = parameter; var foobar = function(){foo(param); this.mouseover(foobar); this.unmouseover(foobar);
answers question: http://stackoverflow.com/q/25296193

http://stackoverflow.com/comment/39492816
comment on: http://stackoverflow.com/a/25330749
score: 0
type: AnswerComment
has text: I'm not sure I understood correctly. Maybe [this](http://plnkr.co/edit/Fa7KBw1f0R3CCH4RL4a4?p=preview) is what you wanted instead.
type: Comment

http://stackoverflow.com/q/25295882
downvote count: 0
linked to: http://stackoverflow.com/q/22497706
favorite count: 0
accepted answer: http://stackoverflow.com/a/25296595
tagged with: angularjs
type: Question
upvote count: 2
answer count: 3
tagged with: directive
possible better answer: http://stackoverflow.com/a/27648516
has body: like the title says, I'm attempting to make an attribute directive that wraps its parent and allows me to toggle between editing and showing the actual model value.. In short: Would end up looking like: {{model}} If everything went right. However, I keep on getting something more along the lines of: <!-- html from allow-edit directive's template --!> I've used input as an example here, but I'd like to be able to wrap arbitrary content (select, etc) as well... Has anyone been able to make a directive that wraps other content on the same element? Is there a better way to do this that I'm not considering? Thanks for your help!
has answer: http://stackoverflow.com/a/27648516
has title: Angular attribute directive that wraps its element
has answer: http://stackoverflow.com/a/25296595
tagged with: javascript
score: 2
has answer: http://stackoverflow.com/a/25296295
type: AnsweredQuestion

http://stackoverflow.com/q/25273213
possible better answer: http://stackoverflow.com/a/25568758
type: AnsweredQuestion
upvote count: 3
tagged with: cefglue
has answer: http://stackoverflow.com/a/26441046
type: Question
tagged with: c#
score: 3
has comment: http://stackoverflow.com/comment/41229861
has comment: http://stackoverflow.com/comment/41525303
has answer: http://stackoverflow.com/a/25568758
answer count: 2
has body: I have been experimenting with CEFGlue in C# recently particularly from the JS>Native integration. I have tried 3 approaches but none seems to be appropriate. Through XHR and Custom SchemeHandler - generally great but seems to blocks both the renderer and browser for long running tasks. Through V8 callbacks - awesome but blocks the renderer for long running tasks Through cefQuery aka Asynchronous Bindings - does not block the renderer or browser but does not seem to have support for passing any parameters. I have a trivial requirement it seems. Asynchronous execution i.e. neither browser nor renderer are to block on long running tasks. I need to pass parameters and process return values in Javascript. Is there a feature of CEFGlue that I can experiment with that will allow me to accomplish this task? Thanks.
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: chromium-embedded
accepted answer: http://stackoverflow.com/a/26441046
has title: Xilium CefGlue Async Javascript to native C# with parameters and return values?
tagged with: asynchronous

http://stackoverflow.com/comment/39541319
has text: Which version of jQuery and jQuery UI you are using ?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25359875

http://stackoverflow.com/comment/39302597
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25230845
has text: I added my code into question. please look at it. :-)

http://stackoverflow.com/q/25238962
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25239170
type: AnsweredQuestion
upvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/39318154
favorite count: 0
has body: here is the fiddle I have two tables. table1 and table2. I have "add" button in table1 and "input text " in table2. By clicking add it should insert new row(input text box).
type: Question
has comment: http://stackoverflow.com/comment/39318812
has answer: http://stackoverflow.com/a/25239170
downvote count: 6
has comment: http://stackoverflow.com/comment/39318348
answer count: 1
has comment: http://stackoverflow.com/comment/39318919
score: -6
has title: how to add row in other table?
has comment: http://stackoverflow.com/comment/39318163

http://stackoverflow.com/q/25274426
has comment: http://stackoverflow.com/comment/39384817
has comment: http://stackoverflow.com/comment/39384767
favorite count: 0
has body: I am trying to pull the 12 latest tumblr posts to a website and maintain the bootstrap structure, but I can't figure out how to make the loop pull different photos for each of the span4's. Right now it is pulling 12 rows, each photo is repeated 3 times, I would like it to be 4 rows of 3 photos where each is different. Can anyone help out here? function formatPhotoHTML(post) { var html = ' '; html += ' '; html += ' '; for (var i = 0; i < post.photos.length; i++) { var photo = post.photos[i] ; html += ' '; html += ' '; html += ' '; var photo = post.photos[i]; html += ' '; html += ' '; html += ' '; var photo = post.photos[i]; html += ' '; html += ' '; } html += ' '; html += ' '; return html; } function appendPostToPage(post) { $('.postspot').append(post); } function getPosts() { $.getJSON('(TUMBLR_API_KEY)', function(r) { var posts = r.response.posts; for (var i = 0; i < 12; i++) { var html = ""; if (posts[i].type === "text") { html = formatTextHTML(posts[i]); } else if (posts[i].type === "photo") { html = formatPhotoHTML(posts[i]); } appendPostToPage(html); } }); } $(document).ready(function() { getPosts(); });
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: Running a Javascript loop inside a bootstrap "row"
has comment: http://stackoverflow.com/comment/39384666
has answer: http://stackoverflow.com/a/25274613
has answer: http://stackoverflow.com/a/25274792
has comment: http://stackoverflow.com/comment/39384936
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/25274910
downvote count: 0
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/39384793
has comment: http://stackoverflow.com/comment/39384738
answer count: 3

http://stackoverflow.com/comment/40205817
type: Comment
has text: @DaveA Ryan Wheale's explanation is correct. That was exactly what I meant and I wasn't aware of the `RequireJS` approach. Thank you for that. ps. I'm sorry that I answer after 2 weeks, but I was on holiday :)
comment on: http://stackoverflow.com/a/25454757
score: 0
type: AnswerComment

http://stackoverflow.com/q/25284608
tagged with: javascript
has body: I am working with intellij and want to debug javascript. My debug configuration has "with javascript debugger". I put breakpoint on javascript variable, but I get error "ReferenceError: eventsArr is not defined" at javascript console. And at ide I cann't evaluate this variable. How can I debug javascript with intellij and js console? Screen: ide: http://www.foto-me.ru/v.php?id=2c4d0de3efc7c42490645cc870dcefca js console http://www.foto-me.ru/v.php?id=b2dd3ceeb38e9443428898b4e192b2ec Thanks.
has answer: http://stackoverflow.com/a/25285862
type: UnansweredQuestion
tagged with: google-chrome
has title: Why doesn't work js debug for intellij?
type: Question
tagged with: debugging
has comment: http://stackoverflow.com/comment/39402640
tagged with: java
score: 0
answer count: 1

http://stackoverflow.com/comment/39418128
has text: Thanks SimpleJ! I will try it and let you know about the progress. Many thanks once again.
type: AnswerComment
comment on: http://stackoverflow.com/a/25291369
score: 0
type: Comment

http://stackoverflow.com/comment/39451901
comment on: http://stackoverflow.com/q/25310827
has text: I hope `function(a,b,c) {` these params are different from `function(nameOfEvent,a,b,c)`..
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25334462
type: Answer
has body: Figured it out. The problem was the line breaks themselves. My solution was to take a textarea input $input, change all the line breaks to &lt;br /&gt; via nl2br($input), replace all the &lt;br /&gt; to \r\n\r\n via str_replace('&lt;br /&gt;','\r\n\r\n',nl2br($input)) because Facebook recognizes \r\n\r\n as a new line and then remove all hidden line breaks via preg_replace( "/\r|\n/", "",str_replace('&lt;br /&gt;','\r\n\r\n',nl2br($share))); Taking the user's form input and running it through that last preg_replace function allows Facebook to read it correctly and post a bulletted list with line breaks!
score: 1
downvote count: 1
accepted answer of: http://stackoverflow.com/q/25319926
answers question: http://stackoverflow.com/q/25319926
type: AcceptedAnswer
upvote count: 2

http://stackoverflow.com/comment/39513869
has text: could you provide plunker for this code? from the first look, seems correct
comment on: http://stackoverflow.com/q/25344297
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39419099
has text: You can loop with `{{#each}}`
comment on: http://stackoverflow.com/a/25292591
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25281640
has body: querySelector(All) will not let you specify the content of the element you're looking for. You would have to look into each anchor individually. You could try something like this: var hrefs = document.getElementById('all_anchors').querySelectorAll('a'); for (var x=0;x&lt;hrefs.length;x++) { if (hrefs[x].innerHTML==text) { alert(hrefs[x].href); } } (JSFiddle)
type: Answer
answers question: http://stackoverflow.com/q/25281217
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/39510612
comment on: http://stackoverflow.com/q/25341779
type: QuestionComment
type: Comment
has text: _"The type's name has been changed during minification, and will not equal "Grid" as the condition above demands"_ By curiosity, what is the type _before_ and _after_ minification ?
score: 0

http://stackoverflow.com/comment/39434933
type: QuestionComment
comment on: http://stackoverflow.com/q/25294701
has text: @digitalfresh, thats my problem the error says firebase is not defined, which I am guessing its not loading at all. Thats what I am trying to figure out how to do.
score: 0
type: Comment

http://stackoverflow.com/comment/39591340
score: 0
comment on: http://stackoverflow.com/q/25386073
type: Comment
type: QuestionComment
has text: ie11 does have `navigator.plugins`.

http://stackoverflow.com/comment/39653180
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25301666
has text: What about other browsers?

http://stackoverflow.com/a/25277302
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: First of all, this is a work in progress. Your code is very large and to solve this I removed a lot o noise from your plunkr, I left there only what's essential to make it work and only the code involved in it. Working Demo First thing to notice, on your JobController you are doing: ////GET Jobs $scope.jobArray = Job.query(); This worked on previous versions of angular, on the current version there is no automatic promise unwrapping anymore, so you must use the then function: ////GET Jobs Job.query().then(function(retrievedData){ $scope.jobArray = retrievedData; }); Notice that on the plunkr I "mocked" the returning of data using $q and a timeout, I actually cleaned the json leaving only the properties that are used on the table, just to make it simpler, you don't need to do that on your code ok? Just keep that part as it is. Maybe you'll have to modify it just to resolve the promise with the returned data, but this is up to you, the important thing is to return a promise from your query() method and resolve it. On the HTML I noticed that you are binding the customer name like this: &lt;td&gt;{{job.Customers.CustomerName}}&lt;/td&gt; But on your Json, the Customers property is an array of customers, so you either return one customer from your api or bind it like this: &lt;td&gt;{{job.Customers[0].CustomerName}}&lt;/td&gt; I also noticed that there are a lot of jQuery references on your controllers like this: $('#editJobModal').modal(); This is not recommended and I don't think it will work at all, when dealing with the DOM, always use directives and comunicate with them using bindings, thats the angular way. Well after all this, my plunkr is showing the table with the 2 fake customers from the Json. Now I suggest you to study that code and apply those principles to your app. I hope I could help or at least point you at the right direction.
has comment: http://stackoverflow.com/comment/39412823
score: 1
accepted answer of: http://stackoverflow.com/q/25274727
upvote count: 1
answers question: http://stackoverflow.com/q/25274727

http://stackoverflow.com/comment/39558911
has text: What happens when the number is greater than 9?
type: Comment
comment on: http://stackoverflow.com/q/25368726
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39583366
type: AnswerComment
type: Comment
has text: @SteffenMangold, you're welcome! If you used either of approaches, could you please accept the answer?
comment on: http://stackoverflow.com/a/25289555
score: 1

http://stackoverflow.com/a/25313863
upvote count: 2
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25313392
has body: The comment by @Pointy is correct. Javascript supports "first-class functions" which is a fancy way of saying that you can think of a function like any other data type (e.g. string or number in javascript). See https://stackoverflow.com/a/705184/2308858. This is powerful because it means your program can decide at runtime which function you want to run! You can even determine the "environment" in which your function executes at runtime, meaning that your function can use a global variable that has one value in one context and another value under a different set of conditions. This is called a closure, and can be pretty powerful. By the way, in your example, it would be preferable to pass the jQuery context in through the function parameters rather than calling it directly. This way your anyFunction function has no knowledge of its environment; it is simply acting on the inputs it receives. For example: function main(statement, callback) { $("body").append("Statement: " + statement + "\n"); callback( $("body") ); } function anyFunction( jqueryDomElement ) { jqueryDomElement.append(" I'm writing to a wall "); } main("This is test 1",anyFunction);

http://stackoverflow.com/comment/39370979
has text: Feel free to try it out. It will remain active wherever user decide to click.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25266840

http://stackoverflow.com/comment/39315259
comment on: http://stackoverflow.com/q/25237156
type: QuestionComment
type: Comment
has text: Do you have error 404 or a different one? How are you deploying your app, what container? Do you use maven? Do you have jackson in your classpath?
score: 0

http://stackoverflow.com/q/25263768
type: Question
has comment: http://stackoverflow.com/comment/39364144
has title: Create a cloned div that works separately in the same page
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25264080
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25264080
tagged with: http://stackoverflow.com/tag/html
has body: I have a div in my page which contains a table with inputs (with ids), I have some conditions and functions on the inputs written in the Javascript code. What I'm trying to do is to make a button (add new) that clones exactly the same div in the page but with same conditions and functions on the new elements and the submit button to work for each separately. I tried this : $('#button-add').bind({ click: function() { $("#repeat").clone().appendTo("#add"); } }); the problem is that I get the same appearance for the div but the functions are not working (because the inputs have the same id) and i cannot submit only that block (new div). Is there a simpler way to achieve that?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25263920
has answer: http://stackoverflow.com/a/25264179
has answer: http://stackoverflow.com/a/25263920

http://stackoverflow.com/a/25273479
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25273386
type: Answer
has body: The structure of the JSON returned is: { data: { after: "", before: null, children: [ { data: { url: "" } }, ... ], modhash: "" }, kind: "Listing" } The name of the result variable is called data in the callback function parameters. So to get to the children you need to type: data.data.children; Next, in the $.each loop, each entry from the children array is assigned to an item variable in that callback function. It is from there where you drill down to the url. property (item.data.url). You could name these whatever you want if data.data is confusing.
downvote count: 0

http://stackoverflow.com/a/25338957
type: Answer
has comment: http://stackoverflow.com/comment/39504547
has body: temp.split("").map ( function (e) { return e.charCodeAt(0)-97 }).join("")
answers question: http://stackoverflow.com/q/25338868
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/a/25236568
has comment: http://stackoverflow.com/comment/39315170
downvote count: 0
has body: As per the implementation by OP, it should be var response = layoutProcessor.process(); not var response = new LayoutProcessor().process(); Please refer the fiddle The error message is appropriate, as its not a constructor but an object. new LayoutProcessor() is not a constructor. LayoutProcessor.js returns an Object. return new LayoutProcessor();
has comment: http://stackoverflow.com/comment/39315562
type: Answer
has comment: http://stackoverflow.com/comment/39314615
has comment: http://stackoverflow.com/comment/39314818
upvote count: 1
has comment: http://stackoverflow.com/comment/39314937
has comment: http://stackoverflow.com/comment/39314657
score: 1
answers question: http://stackoverflow.com/q/25236386
has comment: http://stackoverflow.com/comment/39315398

http://stackoverflow.com/comment/39542720
type: Comment
comment on: http://stackoverflow.com/q/25360605
has text: — What does that have to do with anything? Show us the HTML you send to the browser, not the ASP that you use to generate it.
score: 0
type: QuestionComment

http://stackoverflow.com/a/25282070
has body: Follow the following code snippet There are some properties/methods you can use: $().scrollTop()//how much has been scrolled $().innerHeight()// inner height of the element DOMElement.scrollHeight//height of the content of the element So you can take the sum of the first two properties, and when it equals to the last property, you've reached the end: jQuery(function($) { $('#flux').bind('scroll', function() { if($(this).scrollTop() + $(this).innerHeight() &gt;= this.scrollHeight) { alert('end reached'); } }) }); or $(document).ready(function() { $('#btm').bind('scroll', function() { if($(this).scrollTop() + $(this).innerHeight() &gt;= this.scrollHeight) { alert('end reached'); } }); });
has comment: http://stackoverflow.com/comment/39398356
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25281919

readonly
tag name: readonly
type: Tag
tags question: http://stackoverflow.com/q/25301034

http://stackoverflow.com/comment/39469623
score: 0
type: Comment
has text: but check my update ..It not work.It should become one when I press login button
comment on: http://stackoverflow.com/a/25320465
type: AnswerComment

http://stackoverflow.com/q/25243716
possible better answer: http://stackoverflow.com/a/25243969
has comment: http://stackoverflow.com/comment/39327207
has comment: http://stackoverflow.com/comment/39327262
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25243911
has comment: http://stackoverflow.com/comment/39327062
upvote count: 1
type: Question
score: 1
tagged with: forms
has body: I am trying to do an extra check on a form using OnChange so an alert box appears if the text if equal to a specific value BEFORE the form is submitted. If i remove the If value then the alert box WILL appear but its not coming up if the field is set to 'No Longer Required' Reason for Return No Longer Required Duplicated Order Choice of Two Incorrectly Supplied Incorrect for Application Incorrectly Packaged Late Delivery Incorrectly Picked Never Ordered Surcharge Unit Damaged Poor Fitment Why isnt the alert box coming up when there is an IF statement ?
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25243911
has answer: http://stackoverflow.com/a/25243969
favorite count: 0
has title: How to Validate form by using OnChange Javascript HTML
tagged with: onchange
has comment: http://stackoverflow.com/comment/39327083
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25333529
type: Answer
upvote count: 1
has body: Since you are new to server side programming I assume that you are programming in plain PHP and not using any PHP framework. Setting up the HTML In your HTML file you have to setup a form that will allow the user specify a file to upload to the server. When you submit this form, the data (of the file) will be sent (POSTED) to the PHP file specified by you in the form. Here is a little example of the HTML form (this can be anywhere in your script, I think you are already familiar with these): &lt;form enctype="multipart/form-data" action="fileprocessor.php" method="post"&gt; File: &lt;input name="file_up" type="file"&gt; &lt;input type="submit" value="Upload File"&gt; &lt;/form&gt; fileprocessor.php &lt;?php $file_upload = "true"; $file_up_size = $_FILES['file_up'][size]; echo $_FILES[file_up][name]; if ($_FILES[file_up][size] &gt; 250000) { $msg = $msg . "Your uploaded file size is more than 250KB so please reduce the file size and then upload.&lt;BR&gt;"; $file_upload = "false"; } if (!($_FILES[file_up][type] == "image/jpeg" OR $_FILES[file_up][type] == "image/gif")) { $msg = $msg . "Your uploaded file must be of JPG or GIF. Other file types are not allowed&lt;BR&gt;"; $file_upload = "false"; } $file_name = $_FILES[file_up][name]; $add = "upload/$file_name"; // the path with the file name where the file will be stored if ($file_upload == "true") { if (move_uploaded_file($_FILES[file_up][tmp_name], $add)) { // do your coding here to give a thanks message or any other thing. } else { echo "Failed to upload file Contact Site admin to fix the problem"; } } else { echo $msg; } There are plenty of tutorials on the web that explains these. I used this as the source for this answer. If you are learning server side programming in PHP, you could try finding video tutorials on YouTube, there are plenty of them. Good luck.
score: 1
answers question: http://stackoverflow.com/q/25332692
downvote count: 0

http://stackoverflow.com/comment/39549443
comment on: http://stackoverflow.com/q/25364224
type: Comment
type: QuestionComment
has text: @Novocaine: One can still use tables for tabular data.
score: 2

http://stackoverflow.com/comment/39365862
comment on: http://stackoverflow.com/a/25264657
type: Comment
has text: i would write it easier so that the thread starter would understand how to work with the data in his post.php.
score: 0
type: AnswerComment

gruntjs
tags question: http://stackoverflow.com/q/25378682
tags question: http://stackoverflow.com/q/25379815
tags question: http://stackoverflow.com/q/25379177
tags question: http://stackoverflow.com/q/25249143
tags question: http://stackoverflow.com/q/25323697
tags question: http://stackoverflow.com/q/25240960
tags question: http://stackoverflow.com/q/25306578
tags question: http://stackoverflow.com/q/25332482
tags question: http://stackoverflow.com/q/25234028
type: Tag
tags question: http://stackoverflow.com/q/25365377
tags question: http://stackoverflow.com/q/25374790
tags question: http://stackoverflow.com/q/25318319
tags question: http://stackoverflow.com/q/25328886
tags question: http://stackoverflow.com/q/25291388
tags question: http://stackoverflow.com/q/25276989
tags question: http://stackoverflow.com/q/25365218
tags question: http://stackoverflow.com/q/25299333
tags question: http://stackoverflow.com/q/25292235
tags question: http://stackoverflow.com/q/25324378
tags question: http://stackoverflow.com/q/25342928
tags question: http://stackoverflow.com/q/25329945
tags question: http://stackoverflow.com/q/25294758
tags question: http://stackoverflow.com/q/25295678
tag name: gruntjs
tags question: http://stackoverflow.com/q/25362783

http://stackoverflow.com/comment/39433043
has text: its weird. I tried to add a line "@TempData["message"]" just under the "toastr.success('Added');" and set a breakpoint on it. it still was executed (but didnt show anything) even the TempData was null. @@
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25300611
type: Comment

http://stackoverflow.com/comment/39335658
comment on: http://stackoverflow.com/q/25247499
type: Comment
type: QuestionComment
score: 0
has text: @Katana314 I don't know if I have to tag you in a comment for you to see it or not...

http://stackoverflow.com/q/25237334
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25237428
upvote count: 2
has answer: http://stackoverflow.com/a/25237454
has comment: http://stackoverflow.com/comment/39315373
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25237454
has body: Now, I have a button and I have a validation process taking place in its click [onclick]. I have a web service call and other processes if the validation is successful, which I have in the ng-click. I doubt validation is not taking place. My Page: &lt;script&gt; validate(){ // my validation code goes here... } &lt;/script&gt; &lt;input type="button" id="btnLogin" title="Login" value="Login" onclick="validate();" ng-click="login_authentication();"/&gt; My Controller: $scope.login_authentication = function() { // My login code goes here.... }
tagged with: javascript
has title: Which gets executed first? onclick or ng-click
answer count: 2
has comment: http://stackoverflow.com/comment/39315271
score: 2
has answer: http://stackoverflow.com/a/25237428
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/39549809
comment on: http://stackoverflow.com/a/25277652
has text: Though all the other answers are great too but I think the syntax errors are the major problems in my case. Thanks a lot guys!
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39514078
has text: Forbidden because it wouldn't work anyway. Syntax errors.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25344573

http://stackoverflow.com/comment/39567055
score: 0
type: QuestionComment
type: Comment
has text: I am not sure what the problem is,, The link you shared seems to be working fine. The grid doesnt break at all
comment on: http://stackoverflow.com/q/25373111

http://stackoverflow.com/comment/39512895
has text: It’s spelled `success` …
comment on: http://stackoverflow.com/q/25343831
score: 4
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25301824
type: Answer
has body: Can you please try if this works (just add your API key and URL): http://jsfiddle.net/gqLgf4vx/ var sensorForm = $("#form"); sensorForm.on("submit", postSen()); function postSen() { var formData = { "version": $('input[name=version]').val(), "sensors": [{ "sensor": $('input[name=sensors_name]').val(), "output": [{ "name": $('input[name=sensors_name]').val(), "type": $('input[name=sensors_type]').val() }] }], }, formDataStr = JSON.stringify(formData); sendAjax(formDataStr); } function sendAjax(formDataStr) { $.ajax({ url: "abc.com", headers: { "x-api-key": "abcd=", "content-type": "application/json" }, type: "POST", data: formDataStr, success: function (fromData, status, jqXHR) { //alert(JSON.stringify(fromData)); }, error: function (jqXHR, status) { alert(JSON.stringify(jqXHR)); } }); }
has comment: http://stackoverflow.com/comment/39435480
answers question: http://stackoverflow.com/q/25301036
score: 0
has comment: http://stackoverflow.com/comment/39435636

http://stackoverflow.com/comment/39597916
score: 1
comment on: http://stackoverflow.com/q/25389615
type: Comment
type: QuestionComment
has text: You need to pass picture as a parameter in your soldOut function. Then console.log(picture.source).

http://stackoverflow.com/comment/39576520
has text: how did i miss that.
score: 0
comment on: http://stackoverflow.com/q/25378295
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/46113646
type: Comment
has text: Oh thanks for that, will this make this solution unnecessary?
type: AnswerComment
comment on: http://stackoverflow.com/a/25359714
score: 0

http://stackoverflow.com/comment/39349697
type: AnswerComment
comment on: http://stackoverflow.com/a/25255550
score: 0
type: Comment
has text: hey Alexis, this worked! Is there an explanation as to why? my default css is display:none for the div.

http://stackoverflow.com/comment/39562035
type: QuestionComment
score: 1
has text: From the jQuery API documentation: "The .prop() method should be used to set disabled and checked instead of the .attr() method". Also see this tutorial: http://learn.jquery.com/using-jquery-core/faq/how-do-i-disable-enable-a-form-element/
comment on: http://stackoverflow.com/q/25370526
type: Comment

http://stackoverflow.com/a/25313212
score: 0
has body: You should be able to use jQuery's map method. var data = { "results": [ { "information1": "Some info1", "information2": "Some info2" }, { "information1": "Some info1", "information2": "Some info2" } ]} // assumes keys are the same for every object in the array var headers = $.map(data.results[0], function(v, k) { return k }) var values = []; $.map(data.results, function(row) { values.push( $.map(row, function(v, k) { return v; }) ); }); console.log( headers ) // ['information1', 'information2'] console.log( values ) // [['Some info1', 'Some info2'], ['Some info1', 'Some info2']] Then it's just a matter of using your new data format in your function: $('#container').TidyTable({ columnTitles : headers, columnValues : values}); fiddle here: http://jsfiddle.net/4ftoxw16/ Documentation on .map(): http://api.jquery.com/jquery.map/
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39457816
accepted answer of: http://stackoverflow.com/q/25313025
answers question: http://stackoverflow.com/q/25313025
type: Answer
has comment: http://stackoverflow.com/comment/39458399

http://stackoverflow.com/comment/39511871
has text: What get are you talking about?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25343234
score: 1

http://stackoverflow.com/q/25230527
has comment: http://stackoverflow.com/comment/39304403
type: Question
has comment: http://stackoverflow.com/comment/39302854
has comment: http://stackoverflow.com/comment/39302824
has comment: http://stackoverflow.com/comment/39302970
answer count: 1
has comment: http://stackoverflow.com/comment/39302510
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25232226
score: 0
tagged with: pug
tagged with: events
tagged with: backbone.js
has body: I am building a Backbone App, my view is like this define(function (require) { 'use strict'; var MyBackbone = require('mybackbone'), template = require('utils/template'), Handlebars = require('handlebars'), Contest = require('controllers/ads/contest'); var Main = MyBackbone.View.extend({ initialize : function( options ) { MyBackbone.View.prototype.initialize.apply(this, [options]); this.template = Handlebars.compile( template.get( "presentation/page/main" ) ); this.loadChildViews( "footer", new Contest() ); }, render: function(){ var renderedContent = this.template(); this.$el.html( renderedContent ); return this; }, events: { "click .show-message": "hideAndShowMessage" }, hideAndShowMessage: function(e){ var self = this; e.preventDefault(); this.$el.find('.is-hidding:visible').addClass('hideFade'); this.$el.find('.bg-lets-go').removeClass('hideFade'); var targetLink = $(e.currentTarget); targetLink.removeClass('show-message'); setTimeout(function(){ $('a.no-style:not(".show-message")', self.$el).trigger("click"); //$('a.no-style:not(".show-message")').click(); //targetLink.trigger('click'); }, 750); } }); return Main; }); and my main.jade div.main-container .container-fluid.is-hidding .row .col-xs-6 a.no-style.btn-ipurpose.show-message(href="/#ipurpose") i.fa.fa-tree.fa-3x | JE PROPOSE .col-xs-6 a.no-style.btn-ichoose.show-message(href="/#ichoose") i.fa.fa-flag-checkered.fa-3x | JE CHOISIS .bg.bg-lets-go.is-hidding.hideFade .bg.bg-simple the goal is to display a "let's go message" for 750ms after the link is clicked. I have tried few stuff into the setTimeout but none of them work. No javascript error, is it the right way to do so ?
has comment: http://stackoverflow.com/comment/39302472
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39302846
has comment: http://stackoverflow.com/comment/39302775
has title: How to trigger click after a short delay

http://stackoverflow.com/comment/39397472
has text: Can you not add the optional parameter to the `t_prospect` object and add to the form as a hidden field? You could then populate it as part of the ajax call and it would be submitted as part of the form.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25281577
score: 1

http://stackoverflow.com/a/25409446
score: 0
type: AcceptedAnswer
has body: what i did was i was not creating 2 different materials 1 for color and other for the texture and i shifted to obj/mtl from collada importer and it solved my problem also remember to clip the image texture in blender texture settings under image sampling.
type: Answer
accepted answer of: http://stackoverflow.com/q/25340552
answers question: http://stackoverflow.com/q/25340552

http://stackoverflow.com/comment/39401102
has text: I know there is a stupid way to overcome this issue. That is to add the javascript files in every separated jade. But I hope there will be a more elegant way to solve this.
comment on: http://stackoverflow.com/q/25283821
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25279221
has body: I have a Kendo grid in which I have a checkbox in the last column and I am binding this grid from the server side(filling the data from the server) and in that the checkbox value is also coming from the server.I want to disable the entire row in which the checkbox value is true i.e it is checked and want to allow the editing when the checkbox value is false i.e it is not checked. My code as follows: @(Html.Kendo().Grid(Model) .Name("UpdatedHeadGrid") .Columns(columns =&gt; { columns.Bound(p =&gt; p.ID).Hidden(true).ClientTemplate("#= ID#" + "&lt;input type='hidden' class='ID' value='#=ID#' /&gt;").Width(10); columns.Bound(p =&gt; p.IsAllocated).HeaderHtmlAttributes(new { title = "Allocatable" }).Title("Allocatable").ClientTemplate("&lt;input type='checkbox' ${ IsAllocated == true ? checked='checked' : ''} class='IsAllocated' value='#=data.IsAllocated#' style='width:50px;' /&gt;").Width(50).HtmlAttributes(new { style = "text-align: center;vertical-align: middle;"}); columns.Bound(p =&gt; p.Total).HeaderHtmlAttributes(new { title = "Total Amount" }).Title("Total").ClientTemplate("&lt;input type='text' disabled='disabled' class='Total' value='#=data.Total#' style='width:65px;' /&gt;").Width(60).HtmlAttributes(new { style = "text-align:right", onclick = "DisableEdit(this)" }); .Editable(editable =&gt; editable.Mode(GridEditMode.InCell)) .Events(e =&gt; { e.DataBound("onRowBound"); e.Edit("onEdit"); }) .PageSize(15) .Resizable(resize =&gt; resize.Columns(true)) ) For this i have written the edit function i.e onEdit function as follows: &lt;script&gt; function onEdit(e) { var fieldName12548 = e.container.find('input[type="checkbox"][name="IsAllocated"]').attr("value"); if (fieldName12548 === "Total") { this.closeCell(); } } &lt;/script&gt; Here Instead of only the column with the fieldname="Total" i have to disable all the row.
has answer: http://stackoverflow.com/a/25280806
type: Question
tagged with: kendo-grid
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
has title: Disable the editing in Incell Kendo grid
has answer: http://stackoverflow.com/a/71548577
answer count: 2
downvote count: 0
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: checkbox
score: 1

http://stackoverflow.com/comment/41175786
score: 0
has text: Then adding the line `$('a[href="'+window.location.hash.substr(1)+'"').trigger('click')` will trigger the popup that generated the hash when the page is reloaded.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26240125

http://stackoverflow.com/q/25283586
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/9308257
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39402929
has title: moving the position of an image one block at a time
has comment: http://stackoverflow.com/comment/39401705
type: Question
has body: i was wondering how i would move my picture(the green block) down the already created blocks one block at a time, i would like to do it someway without using setinterval like through a for loop or an if statement to increment x or something, any suggestions? here is a link to a jsfiddle http://jsfiddle.net/ueo30Lg0/ var rows = 20; var cols = 10; var size = 32; function drawBoard(){ ctx.fillStyle="#D3D3D3"; ctx.fillRect( 0,55,320, 400); var colors = ['#FFFFFF','#000000']; var squares = colors; var square = 0; canvas = document.getElementById('gameCanvas'); canvas_width = canvas.width; canvas_height = canvas.height; for(var row=0; row&lt;rows; row++) { for(var col=0; col&lt;cols; col++) { var x = col*size; var y = row*size; ctx.fillStyle = squares[square++%colors.length]; ctx.fillRect(x,y,size,size); } square += colors.length-1; } } and here is where the block i want to move is var logo2 = new Image(); logo2.src = 'http://hdwallphotos.com/wp-content/uploads/2014/02/Green-Background-Image-CSS-Wallpaper.png' function blocks(){ logo2.onload = function(){ canvas = document.getElementById('gameCanvas'); ctx = canvas.getContext('2d'); for(var row=0; row&lt;rows; row++) { for(var col=0; col&lt;cols; col++) { var x = col; var y = row; ctx.drawImage(logo2, x,y,23,13); } } }; }
tagged with: javascript
has answer: http://stackoverflow.com/a/25495258

http://stackoverflow.com/comment/39597608
comment on: http://stackoverflow.com/q/25389437
score: 0
type: Comment
type: QuestionComment
has text: Have you seen this: http://stackoverflow.com/questions/5901049/how-to-url-encode-parameters-in-asp-net-mvc

http://stackoverflow.com/q/25320844
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/25320869
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/25320869
has answer: http://stackoverflow.com/a/25320919
tagged with: parse-platform
tagged with: facebook
type: AnsweredQuestion
score: 2
linked to: http://stackoverflow.com/q/3611682
upvote count: 2
has title: Saving other fields in a parse user logged in through facebook
accepted answer: http://stackoverflow.com/a/25320919
type: Question
has body: I am making an app in which I want the users to login through facebook. My code looks like the following: Myapp NEW But what this code does is that it creates a user in the Data Browser of my Parse app but leaves the "email" field as "undefined". I tried to explicitly save the email in the above code but to no success. I seriously need the email to communicate with my users and it should be present in the class "User". Is there any way of achieving this?

http://stackoverflow.com/a/25231301
has body: this.template = template Is in fact your problem, as you are overwriting the function that is set on the instance. You end up overwriting it to your args array as you pass that as your argument to the initial template function. It basically will do this: this.template = ["some template"]; Thus the next time instance[opt](args) runs it will try to execute that array as if it were a function and hence get the not a function error. JSFiddle
accepted answer of: http://stackoverflow.com/q/25231156
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39303497
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25231156
type: Answer

http://stackoverflow.com/comment/39361350
has text: what is ` $("#Sregion").val('');</script` Is it required if yes then close it properly as `</script` must be ` `
score: 0
comment on: http://stackoverflow.com/q/25261564
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39442690
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25305795
has text: looks like `this` inside new MessageListView doesent point to Chat, try like this : var coll = this.messageList; messageListView: new MessageListView({collection: coll})
score: 0

http://stackoverflow.com/a/27042587
type: Answer
has body: In the end I built a custom solution for this and made it available on npm. It supports simple shapes (lines, boxes, circles), text and hover/click events. A demo is available here.
answers question: http://stackoverflow.com/q/25262951
score: 0
accepted answer of: http://stackoverflow.com/q/25262951
type: AcceptedAnswer

http://stackoverflow.com/comment/39511275
type: Comment
has text: I saw my mistake. I have rectified it. Thanks.
type: AnswerComment
comment on: http://stackoverflow.com/a/25307215
score: 0

http://stackoverflow.com/q/25310474
has body: How can I implement a guided user interface for input math formulas and expresions? There is any GUI that I can embed in my page. An analogy is a date picker for entering the date.
has comment: http://stackoverflow.com/comment/39451024
type: Question
score: 2
answer count: 1
tagged with: user-interface
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39451153
has answer: http://stackoverflow.com/a/25310619
has title: Simple way to implement a GUI for input math formula?
favorite count: 0
has comment: http://stackoverflow.com/comment/39450820
tagged with: php
downvote count: 1
accepted answer: http://stackoverflow.com/a/25310619
type: AnsweredQuestion
upvote count: 3
tagged with: math

http://stackoverflow.com/comment/39588242
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25384661
has text: try to set focus on other element, using `$("element").focus();`
type: Comment

http://stackoverflow.com/q/25318353
linked to: http://stackoverflow.com/q/17509263
accepted answer: http://stackoverflow.com/a/25319402
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25318401
has title: How to change css pseudo-element through javascript?
type: Question
has comment: http://stackoverflow.com/comment/39466003
has comment: http://stackoverflow.com/comment/39465809
linked to: http://stackoverflow.com/q/311052
has comment: http://stackoverflow.com/comment/39466100
has comment: http://stackoverflow.com/comment/39465930
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25318401
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39465905
has comment: http://stackoverflow.com/comment/39465982
favorite count: 0
has answer: http://stackoverflow.com/a/25319402
has comment: http://stackoverflow.com/comment/39465952
has comment: http://stackoverflow.com/comment/39466500
has comment: http://stackoverflow.com/comment/39465757
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39466244
has comment: http://stackoverflow.com/comment/39465882
tagged with: css
has comment: http://stackoverflow.com/comment/39465954
type: AnsweredQuestion
has body: My webpage randomly generates a color, and some elements, like inputs, get colors generated as border or so through javascript. Something like this: document.getElementById('input').style.color = color; The thing is I want a thumb from &lt;input type="range" /&gt; to get the random color generated and I don't know how to do it, tried and searched the web without finding a solution to get this css style input[type=range]::-webkit-slider-thumb in javascript. Can anyone help me please? Thanks in advance.
has comment: http://stackoverflow.com/comment/39465843

http://stackoverflow.com/comment/39543517
type: Comment
comment on: http://stackoverflow.com/q/25361132
score: 0
has text: check this answer http://stackoverflow.com/questions/17419957/css-style-on-select-option
type: QuestionComment

http://stackoverflow.com/comment/39355087
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25258520
type: AnswerComment
has text: I do not mind doing it on my own server, I just can't find the right tech to do it.

knockout.js
tags question: http://stackoverflow.com/q/25299940
tags question: http://stackoverflow.com/q/25281816
tags question: http://stackoverflow.com/q/25325320
tags question: http://stackoverflow.com/q/25233454
tags question: http://stackoverflow.com/q/25251273
tags question: http://stackoverflow.com/q/25360103
tags question: http://stackoverflow.com/q/25272616
tags question: http://stackoverflow.com/q/25307143
tags question: http://stackoverflow.com/q/25333013
tags question: http://stackoverflow.com/q/25313796
tags question: http://stackoverflow.com/q/25261632
tags question: http://stackoverflow.com/q/25361856
tags question: http://stackoverflow.com/q/25239001
tags question: http://stackoverflow.com/q/25241805
tags question: http://stackoverflow.com/q/25380625
tags question: http://stackoverflow.com/q/25269159
tags question: http://stackoverflow.com/q/25239142
tags question: http://stackoverflow.com/q/25270972
tags question: http://stackoverflow.com/q/25240503
tags question: http://stackoverflow.com/q/25250377
tag name: knockout.js
tags question: http://stackoverflow.com/q/25327885
tags question: http://stackoverflow.com/q/25266621
tags question: http://stackoverflow.com/q/25370125
tags question: http://stackoverflow.com/q/25360510
tags question: http://stackoverflow.com/q/25279447
tags question: http://stackoverflow.com/q/25279819
tags question: http://stackoverflow.com/q/25376632
tags question: http://stackoverflow.com/q/25290977
tags question: http://stackoverflow.com/q/25305856
tags question: http://stackoverflow.com/q/25329433
tags question: http://stackoverflow.com/q/25327002
tags question: http://stackoverflow.com/q/25306449
tags question: http://stackoverflow.com/q/25267375
tags question: http://stackoverflow.com/q/25329998
tags question: http://stackoverflow.com/q/25375764
tags question: http://stackoverflow.com/q/25371468
tags question: http://stackoverflow.com/q/25385994
tags question: http://stackoverflow.com/q/25297242
tags question: http://stackoverflow.com/q/25363816
tags question: http://stackoverflow.com/q/25246304
tags question: http://stackoverflow.com/q/25240318
tags question: http://stackoverflow.com/q/25349266
type: Tag
tags question: http://stackoverflow.com/q/25262247
tags question: http://stackoverflow.com/q/25296756
tags question: http://stackoverflow.com/q/25371869
tags question: http://stackoverflow.com/q/25368393
tags question: http://stackoverflow.com/q/25264392

http://stackoverflow.com/comment/39420239
has text: -1 The pattern `[^\s|^{|^}]+` shows a lack of basic regex knowledge.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25290127

http://stackoverflow.com/q/25316840
type: Question
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/39462922
tagged with: http://stackoverflow.com/tag/html
has title: Questions about relative in javascript file
has body: I have a file structure like this: Just for the demo, please ignore other issue. Like try to access json file from html. Say I want to access data/employees.json file both from js/test.html and js/widget.js As you can see, both test.html and widget.js are at the same folder. And I link widget.js in the index.html file &lt;script src="js/widget.js"&gt;&lt;/script&gt; As I always thought, if I want to access data/employees.json from files from js folder, I use relative path, in this case, for widget.js , I wrote this: $(document).ready(function () { console.log(window.location); $.getJSON('../data/employees.json', function (data) { //some code here }); // end getJSON }); // end ready for test.html, I wrote this: &lt;link rel="stylesheet" type="text/css" href="../data/employees.json"&gt; The console gives me no error for test.html, but the code in widget.js has a 404 error. SO my question is, now I am in widget.js file, I want to access employees.json file. What's the correct relative path I should use if widget.js in linked at the index.html in the root folder? Why? It looks to me, the widget.js and test.html are at the same level and should use the same path for the employees.json, that is "../data/employees.json" Thanks.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25316926
accepted answer: http://stackoverflow.com/a/25316926
possible better answer: http://stackoverflow.com/a/25316947
has answer: http://stackoverflow.com/a/25316947

http://stackoverflow.com/q/25244482
score: 0
linked to: http://stackoverflow.com/q/12953704
has comment: http://stackoverflow.com/comment/39328358
linked to: http://stackoverflow.com/q/19098797
has title: Get value from javascript object 9
has comment: http://stackoverflow.com/comment/39328527
duplicate of: http://stackoverflow.com/q/12953704
answer count: 0
has comment: http://stackoverflow.com/comment/39328382
type: UnansweredQuestion
tagged with: object
has comment: http://stackoverflow.com/comment/39328826
type: Question
has body: var params = { "draw":"1", "columns[0][data]":"0", "columns[0][name]":"", "columns[0][searchable]":"true", "columns[0][orderable]":"true", "columns[0][search][value]":"", "columns[0][search][regex]":"false", "columns[1][data]":"1", "columns[1][name]":"", "columns[1][searchable]":"true", "columns[1][orderable]":"true", "columns[1][search][value]":"", "columns[1][search][regex]":"false", "columns[2][data]":"2", "columns[2][name]":"", "columns[2][searchable]":"true", "columns[2][orderable]":"true", "columns[2][search][value]":"", "columns[2][search][regex]":"false", "order[0][column]":"0", "order[0][dir]":"asc", "start":"0","length":"10", "search[value]":"", "search[regex]":"false", "_":"1407762649868" } If I want to get draw, I write code like this: draw = params.draw; So, my questions are: how can I get search[value] value ? how can I get _ value ? Is that possible?
has comment: http://stackoverflow.com/comment/39330080
tagged with: javascript

http://stackoverflow.com/a/25383576
type: Answer
has body: Everybody suggests using jQuery and it's not needed at all in this case. The same for more javascript, it's not needed and will probably make your code less readable. The only thing you need to do is an an if statement in the html tag. Just add the following if statement: if (window.event.keyCode == 13) getMailList($('#email').val()) 13 is the keycode for enter. &lt;input type="email" name="email" id="email" style="width:100%;" onkeypress="if (window.event.keyCode == 13) getMailList($('#email').val())" required&gt;
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25383518
accepted answer of: http://stackoverflow.com/q/25383518

http://stackoverflow.com/a/25252862
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: If you initialize it inside the loop, then the initialization happens on each iteration. I would use the word "reinitialize" in fact. I mean, it's just basic control flow &mdash; you initialize an accumulator variable before the loop begins, and then you modify it on each iteration of the loop.
score: 3
answers question: http://stackoverflow.com/q/25252849
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25252849

http://stackoverflow.com/a/25382913
type: Answer
has body: It looks like the problem might be at $urlRouterProvider.otherwise({redirectTo: '/'});. Try changing it to $urlRouterProvider.otherwise('/'); as seen in docs https://github.com/angular-ui/ui-router/wiki/URL-Routing#otherwise-for-invalid-routes
has comment: http://stackoverflow.com/comment/39589300
score: 0
has comment: http://stackoverflow.com/comment/39585924
has comment: http://stackoverflow.com/comment/39585068
has comment: http://stackoverflow.com/comment/39584924
answers question: http://stackoverflow.com/q/25382659

flexslider
tags question: http://stackoverflow.com/q/25288964
tags question: http://stackoverflow.com/q/25364070
tag name: flexslider
tags question: http://stackoverflow.com/q/25308102
type: Tag

http://stackoverflow.com/q/25352487
has answer: http://stackoverflow.com/a/25352577
score: 0
has body: I have the following directive that my application is using. I was under the impression that my application was working fine with AngularJS 1.3 but after a lot of changes including a move to the latest version, the removal of jQuery, and also the use of controller as then now this directive is giving me errors: app.directive('pagedownAdmin', function ($compile, $timeout) { var nextId = 0; var converter = Markdown.getSanitizingConverter(); converter.hooks.chain("preBlockGamut", function (text, rbg) { return text.replace(/^ {0,3}""" *\n((?:.*?\n)+?) {0,3}""" *$/gm, function (whole, inner) { return " " + rbg(inner) + " \n"; }); }); return { require: 'ngModel', replace: true, scope: { modal: '=modal' }, template: ' ', link: function (scope, iElement, attrs, ngModel) { var editorUniqueId; if (attrs.id == null) { editorUniqueId = nextId++; } else { editorUniqueId = attrs.id; } var newElement = $compile( ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' test div ' + ' ')(scope); iElement.html(newElement); var help = function () { alert("There is no help"); } var editor = new Markdown.Editor(converter, "-" + editorUniqueId, { handler: help }); var $wmdInput = iElement.find('#wmd-input-' + editorUniqueId); var init = false; editor.hooks.chain("onPreviewRefresh", function () { var val = $wmdInput.val(); if (init && val !== ngModel.$modelValue) { $timeout(function () { scope.$apply(function () { ngModel.$setViewValue(val); ngModel.$render(); }); }); } }); ngModel.$formatters.push(function (value) { init = true; $wmdInput.val(value); // editor.refreshPreview(); return value; }); editor.run(); } } }); Can someone explain to me what the following is doing: scope: { modal: '=modal' }, and also the )(scope); Here is how I am calling this directive: If anyone can see anything that may not work in 2 then I would much appreciate some help. In particular it seems that the following code returns null: var $wmdInput = iElement.find('#wmd-input-' + editorUniqueId);
linked to: http://stackoverflow.com/q/17283697
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25352577
has comment: http://stackoverflow.com/comment/39527800
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39527707
has title: Is the way of creating a directive scope the same in versions 1.3 and 2 of AngularJS?
type: Question
has comment: http://stackoverflow.com/comment/39527686
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/25305719
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/69385852
has answer: http://stackoverflow.com/a/25305882
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/25305812
has answer: http://stackoverflow.com/a/25305779
answer count: 5
has title: Change Css for All elements from JS
tagged with: css
linked to: http://stackoverflow.com/q/524696
possible better answer: http://stackoverflow.com/a/25305779
type: AnsweredQuestion
score: 3
upvote count: 3
has body: I'm trying to change jQuery dialog's font-family from a little display settings panel. I've tried all of these to no avail: $('#orderHolder').style.fontFamily='Bookman Old Style'; $('.ui-dialog-content').style.fontFamily='Bookman Old Style'; $('.ui-widget-content').style.fontFamily='Bookman Old Style'; $('#orderHolder').css("font-family", "Bookman Old Style'; $('*').css('font-family', 'Bookman Old Style'); //this is what I'm after (#orderHolder being the div that contains the dialog content) I found *{ font-family: 'Bookman Old Style'; } in the .css file works fine, and the overall effect is what I am after. So, How do you select all elements for styling in javascript?
accepted answer: http://stackoverflow.com/a/25305812
type: Question
has comment: http://stackoverflow.com/comment/39442089
has answer: http://stackoverflow.com/a/25305890
downvote count: 0

http://stackoverflow.com/comment/39509356
score: 0
type: Comment
type: QuestionComment
has text: If you want to preserve `0.0` from your JSON-like format as float instead of `0` int, then there is no other way than using a separate field to denote it during processing since custom properties on `number`s disappear.
comment on: http://stackoverflow.com/q/25341466

http://stackoverflow.com/comment/39534757
has text: u mean i need to check if(val== ([A-Za-z]{1,100}-[A-Za-z]{1,100})){ validation}?? Right??
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25356345
type: AnswerComment

http://stackoverflow.com/a/25284599
accepted answer of: http://stackoverflow.com/q/25284479
has comment: http://stackoverflow.com/comment/39402702
downvote count: 0
has comment: http://stackoverflow.com/comment/39402599
has body: You can use regex: /page=([0-9]+)/.exec($scope.projects.next)[1] That uses a regular expression with a capture group (the bit in ()) for the page number, and captures one or more digits after page=. The result is an array, where the first element is the whole match, and the second is the capture group (that's why we have [1] at the end).
score: 5
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25284479
upvote count: 5

http://stackoverflow.com/comment/39450449
comment on: http://stackoverflow.com/q/25310008
score: 0
type: QuestionComment
has text: Thank you, I understand how to use the conditional comment, but what I have to insert inside? There is a specific rule to disable another script?
type: Comment

http://stackoverflow.com/a/25237680
accepted answer of: http://stackoverflow.com/q/25232403
answers question: http://stackoverflow.com/q/25232403
score: 0
type: AcceptedAnswer
type: Answer
has body: The event is working, it's the code in the event handler that is the problem. You need to call the height method to get the value: var headerHeight = function() { $("#header-wrapper").css("min-height",$(window).height()); }

http://stackoverflow.com/q/25360412
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39547047
has answer: http://stackoverflow.com/a/25368555
tagged with: ember.js
score: 3
upvote count: 3
has body: I tried to update each object in my model within a each loop I wanna add size property to each object in the model. But it seems doesn't work. CONSOLE (it didn't work after I appended size property) self.model().get(i).size=123 &gt;&gt; 123 self.model().get(i) &gt;&gt; id: 1 name: "URL_Command_Comparison" rounds: 2 team: "cvt" __proto__: Object CODE model: function(){ return Ember.A([ {id: 1, name: 'URL_Command_Comparison', team: 'cvt' }, {id: 2, name: 'Auto Test', 'manualHours':20 ,'autoHours': 3, .... $.each(this.model(),function(i,d){ self.model().get(i).set("size",self.perRoundROI(d)*d.rounds*d.coverage) });
has comment: http://stackoverflow.com/comment/39543072
type: Question
has comment: http://stackoverflow.com/comment/39543659
tagged with: javascript
has comment: http://stackoverflow.com/comment/39544430
has title: how to update model's object in each loop

http://stackoverflow.com/a/25370458
has comment: http://stackoverflow.com/comment/39563368
has body: The .resetExpectations() does work as you expected, but you just forgot to flush a http request for the second one. // set the fake data AGAIN $httpBackend.expectGET(url).respond(200, 'doof the magic cragwagon'); // get the service AGAIN $http.get(url).success(successCallback); $httpBackend.flush(); // flush the second http request here expect( result ).toContain('doof'); // does not work, result is original result console.log( result ); // logs 'mock data' Example JSFiddle: http://jsfiddle.net/4aw0twjf/ PS. Actually, the $httpBackend.resetExpectations() is not necessary for your test case.
score: 4
upvote count: 4
accepted answer of: http://stackoverflow.com/q/25370273
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25370273
has comment: http://stackoverflow.com/comment/39571040
type: Answer
has comment: http://stackoverflow.com/comment/39565060

http://stackoverflow.com/comment/39335348
type: AnswerComment
comment on: http://stackoverflow.com/a/25247766
type: Comment
has text: Yep, for some reason current_user method messes things up, so I passed user from controller instead, and it works now. Thanks! However, why didn't rails say that it couldn't render badge1 partial and instead said it cannot find the index partial?
score: 0

http://stackoverflow.com/a/25538741
type: Answer
has comment: http://stackoverflow.com/comment/39885670
has body: A different way to the other two answers is to use CSS to print only the iframe: @media print { * { display: none; } iframe { display: block; width: 100%; height: 100%; } } This basically makes the iframe the full width and height of the page, and hides other elements, so that the iframe is the only thing in view when the user clicks print. The advantage over the other options is that it will work with JavaScript turned off, which some users may have done for security reasons.
score: 2
answers question: http://stackoverflow.com/q/25388318
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/25383758
tagged with: jquery
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
score: 2
answer count: 0
upvote count: 2
tagged with: wordpress
has title: Infinite Scroll with JScrollPane in Wordpress
type: Question
tagged with: javascript
has body: I've done AJAX post loaders before but I'm having quite an hard time with jScrollPane. Two things: where should I load the posts? the div i created (#reviewspostscont) or .jspPane that JScrollPane makes? what if i have multiple loops then? a more practical one now, this is the code i have so far, I can't get the function that triggers the AJAX to get the isAtRight variable (undefined in console), any fix? Thanks in advance, Matt $(function() { $('#reviewspostscont').each(function() { $(this).bind( 'jsp-scroll-x', function(event, scrollPositionX, isAtLeft, isAtRight) { console.log('Handle jsp-scroll-x', this, 'scrollPositionX=', scrollPositionX, 'isAtLeft=', isAtLeft, 'isAtRight=', isAtRight); } ); $(this).jScrollPane({ horizontalDragMaxWidth: 100 }); var api = $(this).data('jsp'); var throttleTimeout; $(window).bind('resize', function() { if (!throttleTimeout) { throttleTimeout = setTimeout(function() { api.reinitialise(); throttleTimeout = null; }, 50); } }); }); $('#reviewspostscont').scroll(function() { var $this = $(this); var scrollWidth = $this[0].scrollWidth - $this.width(); var scrollPercentage = $this.scrollLeft() / scrollWidth * 100; if (isAtRight == true) { loadArticle(count); count++; } }); function loadArticle(pageNumber) { $.ajax({ url: "&lt;?php bloginfo('wpurl') ?&gt;/wp-admin/admin-ajax.php", type:'POST', data: "action=infinite_scroll&amp;page_no="+ pageNumber + '&amp;loop_file=loop', success: function(html) { $("#reviewspostscont").append(html); // This will be the div where our content will be loaded } }); return false; } });
tagged with: jscrollpane
downvote count: 0

http://stackoverflow.com/a/25285998
answers question: http://stackoverflow.com/q/25285857
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/39446071
upvote count: 1
has body: Here is what a simple Google search got me: PrimeFaces uses under the covers jQuery to deal with ajax requests. So, your best bet is to hook on the generic $.ajaxComplete() handler. $(document).ajaxComplete(function(event, xhr, options) { var $source = $("[id='" + options.source + "']"); if ($source.hasClass("myCommandButton")) { // ... } }); The $source represents the jQuery object of the original HTML DOM element on which the ajax action was been triggered, which is in case of this particular example the itself. This offers you the possibility to delegate it further to the desired handler by e.g. examining element's class. Source
downvote count: 0

http://stackoverflow.com/comment/39564779
comment on: http://stackoverflow.com/a/25371914
type: AnswerComment
score: 0
type: Comment
has text: I like this. Is there any issue putting like 40 calcs inside that one function?

http://stackoverflow.com/comment/39492722
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25318165
type: AnswerComment
has text: Thanks @PSL for your quick answer. I'm reading into the promises a bit, is there a way to build a wrapper for a method that requires a callback, so that it returns a promise instead?

http://stackoverflow.com/comment/39451297
comment on: http://stackoverflow.com/q/25310739
type: QuestionComment
type: Comment
has text: You should put label inside of the input tag
score: 1

http://stackoverflow.com/q/25307224
has body: I want to add a overlay on the images of a website when you hover them. I implemented this here and it's working fine http://jsfiddle.net/stujLbjh/ This is the js code: var divs = document.querySelectorAll('.image-thumb'); for (var i = 0; i &lt; divs.length; i++) { var overlay = document.createElement('a') overlay.className = 'icon-overlay'; overlay.href = '#'; divs[i].appendChild(overlay); divs[i].onmouseover = function () { this.querySelector('.icon-overlay').style.display = 'block';} divs[i].onmouseout = function () { this.querySelector('.icon-overlay').style.display = 'none';} overlay.onclick = function() { alert("clicked");} } Further on, i wanted to get rid of those div declarations in html that are including the imgs and add them dynamically straight from javascript, in order to have the same result as in the first jsfiddle, but the behaviour is weird and i miss something. You can see that here: http://jsfiddle.net/uwrae91p/1/ Any hints? Zack.
has comment: http://stackoverflow.com/comment/39447100
has answer: http://stackoverflow.com/a/25309738
accepted answer: http://stackoverflow.com/a/25309313
possible better answer: http://stackoverflow.com/a/25309738
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39446972
answer count: 2
has title: Javascript logic/behaviour error
has comment: http://stackoverflow.com/comment/39447365
tagged with: javascript
has answer: http://stackoverflow.com/a/25309313
has comment: http://stackoverflow.com/comment/39447582
has comment: http://stackoverflow.com/comment/39447388
score: 0
has comment: http://stackoverflow.com/comment/39450245
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39366095
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25263863
has text: Hello @Farshad , I check the link. There the fancybox is loading after the image click. i am not loading the fancybox after page load. I am loading the fancybox straightaway when i open a page. i need to reduce the time taken to load the page by loading only the first image and all the thumbnails, whenever i load that particular page in fancybox.
type: Comment

http://stackoverflow.com/comment/39476713
has text: Nevermind, I think I'm mixing stuff up myself (Twig & Angular).
comment on: http://stackoverflow.com/q/25324326
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25311826
answer count: 1
tagged with: javascript
tagged with: word-cloud
favorite count: 0
has comment: http://stackoverflow.com/comment/49877380
upvote count: 18
has comment: http://stackoverflow.com/comment/78727485
tagged with: http://stackoverflow.com/tag/svg
downvote count: 0
tagged with: d3.js
type: UnansweredQuestion
has title: D3: Using force layout for word clouds
has answer: http://stackoverflow.com/a/45188251
tagged with: force-layout
has comment: http://stackoverflow.com/comment/73243305
score: 18
has body: I'm working on a tag visualization where tags transition between different force-directed layouts. I had few issues figuring out how to transition from a bubble chart to a node chart, but I'm a bit stuck as to how to get the charts to transition into a word cloud. My difficulties largely stem from my inexperience at writing custom clustering/collision detection functions. I declare the forces as globals and then stop and start them when the user clicks a button: var force1 = d3.layout.force() .size([width, height]) .charge(0) .gravity(0.02) .on("tick", ticka); //layout for node chart var force2 = d3.layout.force() .size([width, height]) .charge(-50) .gravity(0.005) .linkDistance(120) .on("tick", tickb); //layout for bubble chart var force3 = d3.layout.force() .size([width, height]) .charge(0) .gravity(0.02) .on("tick", tickc); Relevant node/link functions are added to the force when the function that draws the nodes is called (as data changes according to a slider value). The code for creating node data is as follows: nodes = splicedCounts.map(function(d, e) { var choice; var i = 0, r = d[1], d = { count: d[1], sentiment: d[2]/d[1], cluster: i, radius: radScale(r), name: d[0], index: e, x: Math.cos(i / m * 2 * Math.PI) * 200 + width / 2 + Math.random(), y: Math.sin(i / m * 2 * Math.PI) * 200 + height / 2 + Math.random() }; if (!clusters[i] || (r &gt; clusters[i].radius)) clusters[i] = d; return d; }); In order to keep this question relatively brief, the code I use for drawing the bubble chart is derivative of this example: http://bl.ocks.org/mbostock/7881887 and the code for drawing the node chart are similarly generic (I am happy to provide this code if it would help to solve my issue). This is where my issue comes in: I found this nice example for collision detection between rectangles and incorporated it into my code. However, since I'm using SVG text and the font size changes on transition, I opted to estimate the text size/bounding box size based on text-length…
type: Question
has comment: http://stackoverflow.com/comment/48137573

http://stackoverflow.com/a/25300506
type: Answer
has body: You can achieve the functionality by following method: Apply some class to controls which you don't want to clear like below: Clear Now write following code to clear all controls except ignore class controls: $('#clear').click(function(){ $(this).closest('form').find('input:not(".ignoreT"), textarea:not("ignoreTA")').val(''); }); or you can apply same class(suppose ignore) to all controls and write following code: $('#clear').click(function(){ $(this).closest('form').find('input, textarea').not('.ignore').val(''); }); See if it works for you or not.
accepted answer of: http://stackoverflow.com/q/25300478
upvote count: 4
answers question: http://stackoverflow.com/q/25300478
type: AcceptedAnswer
downvote count: 0
score: 4
has comment: http://stackoverflow.com/comment/39432707

http://stackoverflow.com/q/25301547
tagged with: angularjs-directive
tagged with: javascript
type: UnansweredQuestion
has title: AngularJS - directive dynamic template. Variable is treated as text?
has answer: http://stackoverflow.com/a/49555792
type: Question
has comment: http://stackoverflow.com/comment/39437027
has comment: http://stackoverflow.com/comment/39436663
has comment: http://stackoverflow.com/comment/39436158
has body: I need to modify this Angular component: http://khan4019.github.io/tree-grid-directive/test/treeGrid.html (more info: https://github.com/khan4019/tree-grid-directive) My problem is simple. Tree-grid not allow to formatting specified column e.g. by filters. For example I want to transform every cell in description column to uppercase. Look here: http://plnkr.co/edit/6vSAKpZtoEB98fTOqtA4?p=preview In treeGridTest.js, lines 36-41 are responsible by column definitions: $scope.col_defs = [ { field: "Description"}, { field: "Area"}, { field: "Population"}, { field: "TimeZone", displayName: "Time Zone"} ]; In tree-grid-directive.js file, 31th line (part of template code) responsibles for printing data in cells: &lt;td ng-repeat=\"col in colDefinitions\"&gt;{{row.branch[col.field]}}&lt;/td&gt;\ I would like to have solution known from ng-grid, so first, I added new element to each object in $scope.col_defs which I called cellDef : $scope.col_defs = [ { field: "Description", cellDef: ""}, { field: "Area", cellDef: "{{row.branch[col.field]}}"}, { field: "Population", cellDef: "{{row.branch[col.field]}}"}, { field: "TimeZone", displayName: "Time Zone", cellDef: "{{row.branch[col.field]}}"} ]; and I replaced 31th line in tree-grid-directive.js file by: &lt;td ng-repeat=\"col in colDefinitions\"&gt;{{col.cellDef}}&lt;/td&gt;\ But instead of uppercase description, there is text {{row.branch[col.field]}} in every cell in the column, just have a look: http://plnkr.co/edit/97fcUbUKC5e5svh3r7ML?p=preview How to fix this? i would be grateful for your help, I'm quite new in java script and angularJS framework.
tagged with: treegrid
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39436102
answer count: 2
has answer: http://stackoverflow.com/a/27480416
score: 0
has comment: http://stackoverflow.com/comment/39436458

http://stackoverflow.com/comment/39367654
score: 0
type: AnswerComment
has text: I'll just quote [John](http://stackoverflow.com/a/888902/1438393): "*Step back and ask yourself what you are actually trying to accomplish. Then try to accomplish it without making any assumptions about what people's surnames are, or what they mean.*".
type: Comment
comment on: http://stackoverflow.com/a/25265515

http://stackoverflow.com/q/25335656
tagged with: javascript
type: Question
tagged with: canvas
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25335855
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39498846
has comment: http://stackoverflow.com/comment/39498970
has body: I am a beginner in canvas and I got stuck in creating multiple images in canvas. I created a ball which bounces inside canvas. Now I want to create a second ball when I click somewhere in the canvas. If my question is too dump please spare me. Here is the code. The animate function gets executed onpage load: function animate() { // do something setInterval(function(){drawBall(ball_props,color,null);},10); } function drawBall(ball_props,color) { var c = document.getElementById("bouncy_ball"); var context = c.getContext("2d"); context.clearRect(0,0,c.width,c.height); trajactory(ball_props); context.beginPath(); context.arc(ball_props.center_x,ball_props.center_y,radius,0,Math.PI*2,false); context.stroke(); context.fillStyle = color; context.fill(); context.lineWidth = "2"; context.lineCap = "round"; context.strokeStyle = "black"; context.stroke(); boundaryConditions(ball_props); accelerator(ball_props); }; This helped me in creating the first ball in my canvas animation. Now i have a click function which is supposed to trigger the second ball but instead its deleting the first ball and creating a new one. function onclickingCanvas() { setInterval(function(){drawBall(ball2_props,color2);},10); } Could you please help me fix this.Thanks in advance.
score: 1
upvote count: 1
type: AnsweredQuestion
has title: creating new canvas animations on click
has answer: http://stackoverflow.com/a/25335855

http://stackoverflow.com/q/25271204
has body: I would like to add a comment block (/**/) in the middle of a javascript code for obfuscation reasonds. I want this: alert(document.cookie); to look like this: alert(document.co/**/okie); but adding the comment block makes the code invalid. Why? Is there a way to do this?
linked to: http://stackoverflow.com/q/194397
has comment: http://stackoverflow.com/comment/39378324
tagged with: cookies
tagged with: comments
tagged with: document
score: -1
has comment: http://stackoverflow.com/comment/39378524
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39397604
has comment: http://stackoverflow.com/comment/39378548
has comment: http://stackoverflow.com/comment/39378646
has answer: http://stackoverflow.com/a/25271342
accepted answer: http://stackoverflow.com/a/25271342
has title: Can i place a javascript comment in the middle of a property?
type: AnsweredQuestion
downvote count: 1
type: Question

http://stackoverflow.com/a/25368789
has comment: http://stackoverflow.com/comment/39560317
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: Since you are already using jQuery, you can use the jQuery.when() method to wait for multiple Deferreds to finish. Note that jQuery.ajax() (and its wrapper methods, like jQuery.get()) returns a jqXHR object that is a type of Deferred. You'll get your Deferreds from your $.ajax or equivalent calls, and then pass those all to $.when. You will get back a Promise, which is basically a read-only Deferred*. You can then attach completion/error handlers to this Promise, which will be resolved once all of your passed-in Deferreds are resolved, or is rejected if any one of your Deferreds is rejected. var def1 = $.ajax(), def2 = $.ajax({ /* some params */}); var masterPromise = $.when(def1, def2); masterPromise.done(function() { console.log('def1 and def2 are done!'); }); A Deferred allows attaching various done and error handlers, as well as resolving and canceling and otherwise controlling the asynchronous action. A Promise only allows the attachment of handlers, and does not allow control over the asynchronous action. You can get a Promise from a jQuery Deferred with the Deferred.promise() method.
answers question: http://stackoverflow.com/q/25368526
has comment: http://stackoverflow.com/comment/39558893
has comment: http://stackoverflow.com/comment/39559179
has comment: http://stackoverflow.com/comment/39558345
has comment: http://stackoverflow.com/comment/39558315

http://stackoverflow.com/q/25261422
tagged with: ajax
has answer: http://stackoverflow.com/a/25261609
has answer: http://stackoverflow.com/a/25261567
score: 2
upvote count: 2
has answer: http://stackoverflow.com/a/25261456
possible better answer: http://stackoverflow.com/a/25261567
has title: after submit clear textbox
type: Question
type: AnsweredQuestion
has body: I'm inserting data into a table using Ajax. I'm using ajax so my page wouldn't get refresh. Here is my Ajax code for calling the inserting page: &lt;script type="text/javascript"&gt; var i = jQuery.noConflict(); i(document).ready(function(){ i('#myForm').on('submit',function(e) { i.ajax({ url:'insert.php', data:$(this).serialize(), type:'POST' }); e.preventDefault(); }); }); &lt;/script&gt; Now every time i write in the textbox and hit the submit button the data gets entered but it remains in textbox and i have to press the delete button to erase it. Question: how can I make so my data gets cleared when I press the submit button?
tagged with: javascript
answer count: 3
accepted answer: http://stackoverflow.com/a/25261456
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/39477089
type: AnswerComment
comment on: http://stackoverflow.com/a/25324587
has text: Don't use `.live()`, it has been long deprecated. Use event delegation instead.
type: Comment
score: 0

http://stackoverflow.com/q/25379577
answer count: 1
has body: I'm having trouble getting relationship data from localstorage when loading a model in the route. The first time I get the data from the server through an ajax request everything is fine but as soon as I get to a new route and reload the data all the relationship have disappeard. I don't understand how to reload these relationship! Ideally I would like to call the user-exam model and get all the hasMany array as well. thanks for your help. here are my two models import DS from 'ember-data'; exam-question.js: export default DS.Model.extend({ question : DS.attr('string'), questionID : DS.attr('string'), answer1 : DS.attr('string'), answer2 : DS.attr('string'), answer3 : DS.attr('string'), answer4 : DS.attr('string'), answer5 : DS.attr('string'), answer6 : DS.attr('string'), answer7 : DS.attr('string'), numberOfAnswers : DS.attr('number'), solutions : DS.attr('string'), examID : DS.attr('string'), chosenAnswers : DS.attr('string'), result : DS.attr('string'), userexam: DS.belongsTo('user-exam') }); user-exam.js: import DS from 'ember-data'; export default DS.Model.extend({ salesforceid : DS.attr('string'), name : DS.attr('string'), examType: DS.attr('string'), resultPercentage : DS.attr('number'), result : DS.attr('string'), numberOfQuestions : DS.attr('number'), rightAnswers : DS.attr('number'), passingPercentage : DS.attr('string'), questions: DS.hasMany('exam-question') }); on my account.js route import Ember from 'ember'; export default Ember.Route.extend({ model: function () { return this.store.find('user-exam'); }, afterModel: function() { var applicationController = this.controllerFor('application'); if (!applicationController.isLoggedIn) { this.transitionTo('index'); } this.controllerFor('account').send('loadData'); } }); & controller (on first load I manage to populate all data and relationships are mapped perfectly) import Ember from 'ember'; export default Ember.ArrayController.extend({ needs: ['application', 'newexam-modal'], isLoading: true, actions:{ load…
has answer: http://stackoverflow.com/a/25389395
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has title: ember.js localstorage adapter cannot load relationships (ember-cli)
type: Question
tagged with: ember.js
accepted answer: http://stackoverflow.com/a/25389395
score: 0

http://stackoverflow.com/a/25257716
answers question: http://stackoverflow.com/q/25257580
has body: EDIT: Hmm, after i posted saw the error was not what I beleived it was, guess I'm wrong then. I may be completely wrong due to the formatting of the iframe but from looking at it for a minute or two it appears you are missing a &amp;quot. Here is the line in question, i cut alot of it off to be easier to read var widgetReplace = "&lt;iframe src=&amp;quothttp://localhost:5000/app/#/widget" + id + "?height=" After the id or ? I believe should be the end quote to complete the src. E.G. "&lt;iframe src=&amp;quothttp://localhost:5000/app/#/widget" + id + "?&amp;quotheight=" Of course depending on the fromatting the &amp;quot could be in a different place, I have no way to know.
score: 0
type: Answer

model
tags question: http://stackoverflow.com/q/25304314
tag name: model
type: Tag
tags question: http://stackoverflow.com/q/25365312
tags question: http://stackoverflow.com/q/25345426
tags question: http://stackoverflow.com/q/25303955
tags question: http://stackoverflow.com/q/25293061
tags question: http://stackoverflow.com/q/25380134

http://stackoverflow.com/a/25314924
answers question: http://stackoverflow.com/q/25314380
has body: i moved the counter of the elements inside the function and now it works.Thank you! function ektipwsi() { var numOfEl = document.psonia.elements.length; for(var i=0; i &lt; numOfEl ; i++){ if(document.psonia.elements[i].checked) { lista.push(document.psonia.elements[i].value); } };
score: 0
type: Answer

http://stackoverflow.com/q/25329870
has comment: http://stackoverflow.com/comment/39487602
answer count: 3
has comment: http://stackoverflow.com/comment/39488658
has answer: http://stackoverflow.com/a/25330563
tagged with: datatables
accepted answer: http://stackoverflow.com/a/25330563
has title: I have a button in each row of a table: How can the OnClick handler tell which row it was called from?
favorite count: 0
has answer: http://stackoverflow.com/a/25330831
has comment: http://stackoverflow.com/comment/39488584
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39488129
downvote count: 0
has answer: http://stackoverflow.com/a/37655438
has comment: http://stackoverflow.com/comment/39489083
type: Question
upvote count: 2
possible better answer: http://stackoverflow.com/a/25330831
has comment: http://stackoverflow.com/comment/39488710
has comment: http://stackoverflow.com/comment/39487562
has body: The goal: ,, So I've got a Table (Which is initialized as a JQuery DataTable). Each row contains a 'remove me' button, and when that button is pressed, I want to delete the row from the current table. What I've tried: tr = $(this).closest('tr'); $('.my-table-class').dataTable().fnDeleteRow(tr); What happens No matter what row I click on, the last row is deleted from the table is deleted, except if there's only one row in the table, in this situation a javascript error: "TypeError: j is undefined" is thrown from Jquery.dataTable.min.js. Both baffle me. I can get the attributes of the right row - for example, If do something like: alert($(this).attr("data-name")); I click on John Smith's row, I'll see 'John Smith' in an alert box... so $(this) is the a tag, so why doesn't the .closest() method grab the right trtag? My Questions: How do I get 'this' row (the one which contained the button which was pressed) in order to delete it? Any idea what's causing the 'TypeError: j is undefined" error when there's only one row in the table? Details: Here's the rendered (from .jsp) HTML table: Name John Smith Robert Paulson Juan Sanchez Here's how I initialize the tables as a Jquery DataTable: $('.st-my-table-class').dataTable( { "bInfo": true, "aaSorting": 0, "desc" , // sort 1st column "bFilter": true, // allow search bar "bPaginate": false, // no pagination "sDom": '<"top"f>rt<"bottom"lp><"clear">' // (f)ilter bar on top, page (i)nfo omitted } ); And here's the whole event handler: $('.my-button-class').on("click", function(){ tr = $(this).closest('tr'); $('.my-table-class').dataTable().fnDeleteRow(tr); });
has comment: http://stackoverflow.com/comment/39488454
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39488232

ios
tags question: http://stackoverflow.com/q/25298493
tags question: http://stackoverflow.com/q/25238632
tags question: http://stackoverflow.com/q/25362872
tags question: http://stackoverflow.com/q/25372330
tags question: http://stackoverflow.com/q/25322420
type: Tag
tags question: http://stackoverflow.com/q/25261315
tags question: http://stackoverflow.com/q/25369183
tags question: http://stackoverflow.com/q/25335829
tags question: http://stackoverflow.com/q/25273719
tags question: http://stackoverflow.com/q/25262040
tags question: http://stackoverflow.com/q/25314259
tags question: http://stackoverflow.com/q/25264076
tags question: http://stackoverflow.com/q/25382263
tags question: http://stackoverflow.com/q/25239843
tag name: ios
tags question: http://stackoverflow.com/q/25386203
tags question: http://stackoverflow.com/q/25253293
tags question: http://stackoverflow.com/q/25339784
tags question: http://stackoverflow.com/q/25316629
tags question: http://stackoverflow.com/q/25259491
tags question: http://stackoverflow.com/q/25275127
tags question: http://stackoverflow.com/q/25262740
tags question: http://stackoverflow.com/q/25281403
tags question: http://stackoverflow.com/q/25241932
tags question: http://stackoverflow.com/q/25371868
tags question: http://stackoverflow.com/q/25292365
tags question: http://stackoverflow.com/q/25333510
tags question: http://stackoverflow.com/q/25366128
tags question: http://stackoverflow.com/q/25287724
tags question: http://stackoverflow.com/q/25387338
tags question: http://stackoverflow.com/q/25315316
tags question: http://stackoverflow.com/q/25323860

http://stackoverflow.com/a/25233694
score: 0
has body: Of course you can do it; you just can't do it with primitives. Libraries like JSDecimal represent numbers in other ways.
type: Answer
answers question: http://stackoverflow.com/q/25232531

http://stackoverflow.com/comment/39329490
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25244994
score: 3
has text: Have you tried loading the client.json file with a script tag? If the data is static and sitting in that file, you can load it as a script.

http://stackoverflow.com/a/25280469
has body: how about change html? &lt;input name='sensors[0][sensor]' value=''&gt; to &lt;input class="d_sensors" name='sensor' value=''&gt; read javascript var data = {}; data['version'] = $("input[name='version']").val(); data['sensors'] = []; var sensorsList = $(".d_sensors"); for (var i = 0; i &lt; sensorsList.length; i++) { var $item = sensorsList.eq(i); var sensor = {}; sensor['sensor'] = $item.val(); sensor['output'] = []; // do same way }
answers question: http://stackoverflow.com/q/25280241
score: 0
type: Answer

http://stackoverflow.com/comment/39470218
type: QuestionComment
has text: Can't see anything wrong in Chrome 36.0.1985.125. Can you post some screenshots of the problem?
comment on: http://stackoverflow.com/q/25320758
type: Comment
score: 1

http://stackoverflow.com/comment/39571584
type: QuestionComment
comment on: http://stackoverflow.com/q/25375567
has text: possible duplicate of [What is the best regular expression to check if a string is a valid URL?](http://stackoverflow.com/questions/161738/what-is-the-best-regular-expression-to-check-if-a-string-is-a-valid-url)
score: 0
type: Comment

http://stackoverflow.com/a/25237711
answers question: http://stackoverflow.com/q/25237646
upvote count: 1
has comment: http://stackoverflow.com/comment/39316277
has comment: http://stackoverflow.com/comment/39316464
type: Answer
has comment: http://stackoverflow.com/comment/39316201
has comment: http://stackoverflow.com/comment/39316034
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39316131
has body: You have to remember the this as self before declaring the success function: var self = this; var success = function(){ self.user = self.userEdit; }; Or an alternative would be just using this, but bind the function with this variable: var success = function() { this.user = this.userEdit; }.bind(this); Hope this helps.
has comment: http://stackoverflow.com/comment/39316344

http://stackoverflow.com/q/25335566
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25335623
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: javascript width / height not functioning and colors
has body: &lt;http://jsfiddle.net/skarchmit/dndumodr/2/&gt; I usually get the javascript to work, but this simple action isn't working. (more code can be seen on JSFIDDLE.) NOTE: #PHOTOS IS attached to an UL JAVASCRIPT: function resize(){ document.getElementById('photos').width = "100px !important"; } CSS: #photos{ width: 500px; display: block; border: 2px solid red; background-color: yellow; }
has answer: http://stackoverflow.com/a/25336071
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25335623
possible better answer: http://stackoverflow.com/a/25336071
type: Question
answer count: 2

http://stackoverflow.com/q/25384040
has body: I set up a hyperlink whose href attribute needs to be changed by javascript, after an if statement, but it doesn't. LINK Also a JSFiddle What am I missing?
has comment: http://stackoverflow.com/comment/39586942
accepted answer: http://stackoverflow.com/a/25384294
has comment: http://stackoverflow.com/comment/39586928
type: AnsweredQuestion
type: Question
tagged with: href
has title: Javascript with if statement not changing href attribute
tagged with: hyperlink
tagged with: javascript
tagged with: variables
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25384294

http://stackoverflow.com/q/25262554
has answer: http://stackoverflow.com/a/25262672
has title: selector not working after append inside the .on() click event
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
duplicate of: http://stackoverflow.com/q/6658752
favorite count: 0
has comment: http://stackoverflow.com/comment/39362166
score: 2
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/6658752
has comment: http://stackoverflow.com/comment/39362371
type: Question
has body: class selectors that are produced on the fly with my jquery functions are not working. here is my jquery: $(".add-category").on("click",function () { // var id = $('#row-panel #col-panel').length.toString(); var id2 = ($('#parent-row #child-row').length + 1).toString(); $('#parent-row').append('&lt;div class="row p-10" id="child-row"&gt;\ &lt;div class="col-lg-12"&gt;\ &lt;div class="panel panel-default panel-grey"&gt;\ &lt;div class="panel-body"&gt;\ &lt;div class="row p-10"&gt;\ &lt;div class="col-lg-4" &gt;\ &lt;label&gt;Category Name&lt;/label&gt;\ &lt;/div&gt;\ &lt;div class="col-lg-8"&gt;\ &lt;input type="text" class="form-control" id="website-url"&gt;\ &lt;/div&gt;\ &lt;/div&gt;\ &lt;div class="row p-10"&gt;\ &lt;div class="col-lg-4" &gt;\ &lt;label&gt;Category URL&lt;/label&gt;\ &lt;/div&gt;\ &lt;div class="col-lg-8"&gt;\ &lt;input type="text" class="form-control" id="website-url"&gt;\ &lt;/div&gt;\ &lt;/div&gt;\ &lt;/div&gt;\ &lt;/div&gt;\ &lt;/div&gt;\ &lt;/div&gt;\ '); }); $(".remove-category").on("click",function () { if ($('#parent-row #child-row').length == 1) { alert("You cannot remove the last form!"); return false; } $("#parent-row #child-row:last-child").remove(); }); and here is the mark-up &lt;div class="panel-body" id="parent-row"&gt; &lt;div class="row p-10"&gt; &lt;div class="col-lg-4"&gt; &lt;label&gt;1 Category&lt;/label&gt; &lt;/div&gt; &lt;div class="col-lg-8"&gt; &lt;input type="text" class="form-control"&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="row"&gt; &lt;div class="col-lg-offset-6 col-lg-4"&gt; &lt;label&gt;Add Sub Panel&lt;/label&gt; &lt;/div&gt; &lt;div class="col-lg-2"&gt; &lt;a href="#" id="add-category" class="add-category"&gt; &lt;i class="fa fa-plus"&gt;&lt;/i&gt; &lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="#" id="remove-category" class="remove-category"&gt; &lt;i class="fa fa-times"&gt;&lt;/i&gt; &lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="row p-10" id="child-row"&gt; &lt;div class="col-lg-12"&gt; &lt;div …
has comment: http://stackoverflow.com/comment/39389744
accepted answer: http://stackoverflow.com/a/25262672
has comment: http://stackoverflow.com/comment/39362084
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39362042
has comment: http://stackoverflow.com/comment/39362471
upvote count: 3

http://stackoverflow.com/comment/39527681
has text: don't u need to hide all of the infos instead of just one
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25352468

http://stackoverflow.com/q/25389437
has comment: http://stackoverflow.com/comment/39597808
tagged with: asp.net-mvc-3
has comment: http://stackoverflow.com/comment/39597608
type: Question
has title: Encoding special characters < and > in MVC parameters
has comment: http://stackoverflow.com/comment/39598404
has answer: http://stackoverflow.com/a/25390915
tagged with: javascript
linked to: http://stackoverflow.com/q/5901049
downvote count: 0
answer count: 1
has body: I am trying to encode &lt; and &gt; in a MVC parameter, tried using encodeURIComponent, however the decoding seem to occur prior to reaching the controller and it blows up the routing public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "Default", "Home/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional } ); } http://localhost/HomeStretch/Home/ListAll?Value=%22%7B%3Cdbid%3E%7BD576959C-31F8-469B-9C23-17B046DF590F%7D%3Cdbid%3E%7D%22" If I take away the &lt;&gt; carets it works, if I leave them in the call fails. I can do my own silly conversion using a * instead of %, however I am wondering if there is a better way of getting around this? Turns out this maybe a security issue, I was scouring the event log and found below exception had been thrown. How do I properly insulate my tags, so this won't happen? Exception information: Exception type: HttpRequestValidationException Exception message: A potentially dangerous Request.QueryString value was detected from the client (Filters[0].Value=""{&lt;dbid&gt;{D576959C-31F8..."). at System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) at System.Web.HttpValueCollection.GetValues(String name)
favorite count: 0
accepted answer: http://stackoverflow.com/a/25390915
has comment: http://stackoverflow.com/comment/39599682
has comment: http://stackoverflow.com/comment/39597740
has comment: http://stackoverflow.com/comment/39598327
upvote count: 1
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/75980
has comment: http://stackoverflow.com/comment/39598402
score: 1

http://stackoverflow.com/a/29497680
upvote count: 122
type: Answer
answers question: http://stackoverflow.com/q/25245716
has comment: http://stackoverflow.com/comment/132362326
accepted answer of: http://stackoverflow.com/q/25245716
has comment: http://stackoverflow.com/comment/138987061
has comment: http://stackoverflow.com/comment/50335329
has body: The regex you should be using is /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=&gt;&lt;]/g This matches most of the ANSI escape codes, beyond just colors, including the extended VT100 codes, archaic/proprietary printer codes, etc. Note that the \u001b in the above regex may not work for your particular library (even though it should); check out my answer to a similar question regarding acceptable escape characters if it doesn't. If you don't like regexes, you can always use the strip-ansi package. For instance, the string jumpUpAndRed below contains ANSI codes for jumping to the previous line, writing some red text, and then going back to the beginning of the next line - of which require suffixes other than m. var jumpUpAndRed = "\x1b[F\x1b[31;1mHello, there!\x1b[m\x1b[E"; var justText = jumpUpAndRed.replace( /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=&gt;&lt;]/g, ''); console.log(justText);
has comment: http://stackoverflow.com/comment/132367845
score: 122
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39440045
comment on: http://stackoverflow.com/a/25304358
type: Comment
type: AnswerComment
has text: @AlmaDo See edit. And I'd suggest reading https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#3-managing-arguments
score: 0

http://stackoverflow.com/comment/39306793
type: Comment
type: QuestionComment
has text: @user244394 Unfortunately at this time there's no CSS solution for selecting the content. But you can achieve that by using JavaScript.
comment on: http://stackoverflow.com/q/25232862
score: 0

http://stackoverflow.com/a/25381314
has comment: http://stackoverflow.com/comment/39581801
answers question: http://stackoverflow.com/q/25381013
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25381013
type: Answer
has body: you are looking like this: <?php $your_file = "file.txt"; //open the file $read_your_file = @fopen($your_file, "r") or die ("Couldn't Access $your_file"); //create a variable to hold the contents of the file $contents_your_file = fread($read_your_file, filesize($your_file)); //array of file contents $your_array = explode("\n",$contents_your_file); //close the file fclose($read_your_file); //counts the number elements in the property_categories array $num_elmnts_array = count($your_array) ; //elements in the drop down list //$drop_elmnts = 0; //begin creating your dropdown menu... $your_menu = " "; //For loop to begin for($counter = 0; $counter < $num_elmnts_array; $counter++){ $your_menu .= " $your_array[$counter] "; //$counter++; } //end select menu $your_menu .= " "; ?> <?php echo "$your_menu"; ?>
upvote count: 1
score: 1

http://stackoverflow.com/a/26303000
score: 0
has body: Either what derdida said, or a modal. jqModal seems like a good choice to go along with your jqGrid :) http://jquery.iceburg.net/jqModal/
type: Answer
answers question: http://stackoverflow.com/q/25296101

http://stackoverflow.com/q/25315460
has comment: http://stackoverflow.com/comment/39460303
has body: i am trying to get the query parameter for http://url.com?send_volume=send_300_gb and then set a form select option based on this. I can grab the get value and assign to var to use in the assignment but for the life of me can't understand why i can't get the option to set as selected: Select Form looks like this: - Please Select - Send up to 300GB/month Send up to 500GB/month Send up to 1TB/month Custom
tagged with: html-select
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39460587
has answer: http://stackoverflow.com/a/25315585
has comment: http://stackoverflow.com/comment/39460434
has comment: http://stackoverflow.com/comment/39460343
type: Question
has title: Grab URL parmeter and set select option
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25315640

http://stackoverflow.com/comment/39564222
has text: use `Fruit.Lemon.Color = Fruit.Banana.Color` instead of `Lemon:{ Color: Fruit.Banana.Color }`
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25371672

http://stackoverflow.com/comment/39483957
type: Comment
has text: I like it, especially because you gave it another try, but I'm waiting if someone figures out the real solution. I found one and don't want to waste rep.. As soon as I can you'll get an +1 :D
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25326973

http://stackoverflow.com/comment/39514196
has text: Why are you downvoting every answer?
score: 0
comment on: http://stackoverflow.com/q/25344603
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39333012
comment on: http://stackoverflow.com/a/25243379
has text: I have added a new solution to my answer it uses a cache as you requested. Try that out with your data. I have the new fiddle. If it still does not come up to pace on your clients machine as I said their other other ways to speed it up. Right now it touches the dom for every row, that it a major speed bloat especially on older pc, small devices, browsers.
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/39388173
score: 0
type: Comment
type: AnswerComment
has text: can you elaborate more please. I need the menu item when I right click the app button on the browser tray. Do you think if this is something possible?
comment on: http://stackoverflow.com/a/25276570

http://stackoverflow.com/q/25265034
favorite count: 0
has comment: http://stackoverflow.com/comment/39366742
linked to: http://stackoverflow.com/q/25258415
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25265295
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39366894
has body: This is an extension of my previous question described on this SO link From the given solution i am able to get on hover effect. but the problem is i m not able to give different image to different . Can anyone suggest me some solution!
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25265295
tagged with: javascript
tagged with: jquery
has title: How to create onhover effect for different images useing display:flex;?
has comment: http://stackoverflow.com/comment/39367216
score: 0
answer count: 1

http://stackoverflow.com/q/25340490
score: 0
has comment: http://stackoverflow.com/comment/39518473
has answer: http://stackoverflow.com/a/25341712
answer count: 1
has body: I am trying to create a full page interface using the excellent jQuery UI Layout plugin. but unfortunately west side unable to resize with mouse which i have mentioned in below image. i am not able to find any solution for it. Below is my code which i used: &lt;div class="ui-layout-west"&gt; &lt;%@include file="abc.jsp"%&gt; &lt;/div&gt; Below is my sample image of west pane.
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25341712
has title: how to activate resize option in ui-layout-west
has comment: http://stackoverflow.com/comment/39579709
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39445127
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25307410
score: 0
has text: Do you want `$('#'+idvalue).addClass('found');` ?

http://stackoverflow.com/comment/39302010
comment on: http://stackoverflow.com/a/25230663
has text: What are you trying to do? I dont understand. Are you trying to make the list element that is clicked show in the input box?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39481161
comment on: http://stackoverflow.com/q/25326659
score: 1
has text: It's not clear what you're asking--scriptlets are executed on the server. JavaScript is executed on the client. What are you trying to do, and where, specifically, do you want to do it, noting that you can't arbitrarily mix client/server side operations without some form of communication, e.g., Ajax.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25310457
has body: There should be var legendText = $(this).data('title'); If you want to replace whole text $('p.map-legend-key__copy').text(legendText); If you want to replace just Marker text $('p.map-legend-key__copy').text($('p.map-legend-key__copy').text().replace('Marker text', legendText));
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25310417
upvote count: 2
answers question: http://stackoverflow.com/q/25310417
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39451820
type: Answer

http://stackoverflow.com/comment/39518702
comment on: http://stackoverflow.com/q/25347237
type: Comment
type: QuestionComment
score: 0
has text: In the future it is preferable to ask and research one question at a time rather than multiple questions.

http://stackoverflow.com/q/25296285
has comment: http://stackoverflow.com/comment/39443924
possible better answer: http://stackoverflow.com/a/25296351
answer count: 2
has title: Copy values from json string to javascript object
accepted answer: http://stackoverflow.com/a/25349143
has answer: http://stackoverflow.com/a/25296351
has comment: http://stackoverflow.com/comment/39463302
tagged with: angularjs
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/25349143
type: Question
has comment: http://stackoverflow.com/comment/39424970
has body: The angular extend https://docs.angularjs.org/api/ng/function/angular.extend copies all properties from source to target. This is not what I want because my target is already created I just need to copy all values from json string to the target javascript object. Those values who shall copied have the same property names in source and target object. Does there exist any angularJS or javascript predefined function to do this job?
tagged with: javascript

http://stackoverflow.com/q/25273085
accepted answer: http://stackoverflow.com/a/25273614
answer count: 1
has body: If I have the following table: I want one Controller function A invoked when the red dot is clicked on any row but function B invoked when the edit icon is click on any row. I have successfully gotten one function to be invoked when clicking the red dot on any row with this javascript: var myTable = document.getElementById('indivTble'); if (myTable != null) { rows = myTable.getElementsByTagName('tr'); var selectedUniqueId, selectedSecondaryId; for (var i=1,len=rows.length; i&lt;len; i++) { rows[i].onclick = function() { selectedUniqueId = this.cells[2].innerHTML; selectedSecondaryId = parseInt(this.cells[3].innerHTML); &lt;g:remoteFunction controller="customer" action="editRecord" update="flagsSummary" params="{uniqueId: selectedUniqueId, secondaryId: selectedSecondaryId}"/&gt; but I am having trouble binding the second function to the edit icons which is: &lt;g:remoteFunction controller="customer" action="displayRecordDetails" update="flagsSummary" params="{uniqueId: selectedUniqueId, secondaryId: selectedSecondaryId}"/&gt; I would greatly appreciate any help thanks.
type: AnsweredQuestion
has title: Javascript table click functions in Grails
score: 0
has answer: http://stackoverflow.com/a/25273614
type: Question
tagged with: javascript
tagged with: grails

http://stackoverflow.com/a/25329669
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25329550
has body: You should pass the function for binding and unbinding the handlers, something like: var mouseEnterHandler = function () { $(this).addClass('active'); } var mouseLeaveHandler = function () { $(this).removeClass('active'); }; $('.square').bind("mouseenter", mouseEnterHandler) .bind("mouseleave", mouseLeaveHandler); $('.hover_enabled').click(function () { $(this).addClass('active'); $('.hover_disabled').removeClass('active'); // I need to bind hover here $('.square').bind("mouseenter", mouseEnterHandler) .bind("mouseleave", mouseLeaveHandler); }); But the code becomes ugly and unmaintainable. You can use event delegation instead: $(document).on('mouseenter mouseleave', '.square.hoverable', function(event) { // toggle the class by checking the type of the event $(this).toggleClass('active', event.type === 'mouseenter'); }); // caching the state changers var $e = $('.hover_enabled, .hover_disabled').click(function () { var $this = $(this).addClass('active'), isHoverable = $this.hasClass('hover_enabled'); // exclude the clicked element from the set and remove the class $e.not($this).removeClass('active'); $('.square').toggleClass('hoverable', isHoverable); }); The above mouseenter mouseleave handler is only executed when the .square element has hoverable className. You can also remove the event handler and use CSS for styling. .square.hoverable:hover { } http://jsfiddle.net/bztec1f4/
has comment: http://stackoverflow.com/comment/39487676
has comment: http://stackoverflow.com/comment/39487256
has comment: http://stackoverflow.com/comment/39488133
has comment: http://stackoverflow.com/comment/39487494
downvote count: 0

http://stackoverflow.com/comment/39559164
type: Comment
comment on: http://stackoverflow.com/q/25368799
has text: Add each element to an array with the date being the key, then you can use the array sort method before adding them to the page, good luck!
score: 0
type: QuestionComment

http://stackoverflow.com/q/25373131
has body: Piping the response of an http request to a file is pretty easy: http.get(url, function (res) { var file = fs.createWriteStream(filename) res.pipe(file) file.on('finish', function () { file.close() }) }) But when I try to set up a retry system, things get complicated. I can decide whether to retry based on res.statusCode, but then if I decide to retry, this means not piping the response to the writable stream, so the response just stays open. This considerably slows down execution when I do many retries. A solution to this is to (uselessly) listen to the data and end events just to get the response to close, but then if I decide not to retry, I can not longer pipe to the writeStream, as the response is now closed. Anyways, I'm surely not the only one wanting to stream the response of an http request to a file, retrying when I get a 503, but I can't seem to find any code "out there" that does this.
tagged with: javascript
tagged with: node.js
type: AnsweredQuestion
score: 0
tagged with: stream
has title: How to stream an http response to a file, retrying on 503
tagged with: http
type: Question
has answer: http://stackoverflow.com/a/25379429
has comment: http://stackoverflow.com/comment/39578347
has comment: http://stackoverflow.com/comment/39569108
accepted answer: http://stackoverflow.com/a/25379429
answer count: 1

http://stackoverflow.com/a/25378222
answers question: http://stackoverflow.com/q/25378185
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: Use like this. You need to specify negative margin-top with half of your div height. Here i have assumed your div have a height of 200px. .cycle-overlay { position:absolute; top:50%; left:0; margin-top:-100px; }

http://stackoverflow.com/q/25236969
has body: We have a requirement to refresh the form after saving (to ensure that some hide/show logic works as expected based on a field value). Currently the form does not automatically refresh after saving the record. I have gone through some articles and found this reference: http://msdn.microsoft.com/en-us/library/dn481607%28v=crm.6%29.aspx When I try to do either of the below, it results in an infinite loop and throws a 'Callstack exceeded Max limit' error. OnSave(context) { //my logic ... ... Xrm.Page.data.save.then(SuccessOnSave, ErrorOnSave); } function SuccessOnSave() { //force refresh Xrm.Page.data.refresh(); } function ErrorOnSave() { //do nothing } OnSave(context) { ... ... //force refresh Xrm.Page.data.refresh(true).then(SuccessOnSave, ErrorOnSave); } function SuccessOnSave() { //do nothing } function ErrorOnSave() { //do nothing } Can someone please explain me how to use the refresh or save method to do a force refresh of the form ?? Rajesh
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/30719945
favorite count: 0
has answer: http://stackoverflow.com/a/25294780
has comment: http://stackoverflow.com/comment/42494925
has answer: http://stackoverflow.com/a/34843582
has answer: http://stackoverflow.com/a/43892729
has answer: http://stackoverflow.com/a/30482837
upvote count: 4
type: UnansweredQuestion
has title: CRM 2013: Force refresh a form after save
has answer: http://stackoverflow.com/a/25646503
has answer: http://stackoverflow.com/a/29648905
tagged with: dynamics-crm-2013
linked to: http://stackoverflow.com/q/22163863
tagged with: dynamics-crm
has comment: http://stackoverflow.com/comment/50219874
downvote count: 0
type: Question
answer count: 8
has answer: http://stackoverflow.com/a/25332989

http://stackoverflow.com/a/25258904
score: 0
upvote count: 1
type: AcceptedAnswer
has body: DataStore //some class .prime //probably the function ( 'standings', //argument 1 which is a string calling a string event { stageId: 36 }, //argument 2 an object, must be referencing to a stage event [ [36,13,'Arsenal',1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,,,] ,[36,24,'Aston Villa',2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,,,] ,[36,184,'Burnley',3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,,,] ] //Argument 3 Multidimensional Array which looks like some stats for a certain team ); Is this some highscore table for a game?
accepted answer of: http://stackoverflow.com/q/25257979
type: Answer
answers question: http://stackoverflow.com/q/25257979
downvote count: 1

http://stackoverflow.com/q/25306381
answer count: 1
has comment: http://stackoverflow.com/comment/39444581
tagged with: twitter-bootstrap-3
has comment: http://stackoverflow.com/comment/39443353
has answer: http://stackoverflow.com/a/25312263
has title: Bootstrap toggle chevron
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25312263
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39446048
has body: I am using bootstrap 3 and I have some collapsible panels which act as filters on a results page. So it isnt really an accordion menu as more than one can be open at any given time. Plus some will be open upon page load (using class in). So I need some javascript that will toggle the chevron depending on the state of the panel (opened or closed). Here is the mark up: Subject Foreign Relations (15676) Vietnam War (13013) Government Documents (10479) Military Assistance More... Geography Foreign Relations (15676) Vietnam War (13013) Government Documents (10479) Military Assistance More... Person As Subject Foreign Relations (15676) Vietnam War (13013) Government Documents (10479) Military Assistance More... Obviously at the minute all of the panels have the chevron down icon. Many thanks
has comment: http://stackoverflow.com/comment/39443379
score: 0

http://stackoverflow.com/comment/73804113
type: Comment
score: 2
comment on: http://stackoverflow.com/a/25410176
type: AnswerComment
has text: While this method may feel like the easiest (and most like jQuery) way to access the element, Facebook now says "We advise against it because string refs have some issues, are considered legacy, and are likely to be removed in one of the future releases. If you're currently using this.refs.textInput to access refs, we recommend the callback pattern instead". You should use a callback function instead of a string ref. [Info Here](https://facebook.github.io/react/docs/refs-and-the-dom.html)

http://stackoverflow.com/a/25260056
accepted answer of: http://stackoverflow.com/q/25236746
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25236746
has body: You might find this post interesting - How to protect widgets from forged requests: You don't want this [widget] to be vulnerable to CSRF so you write an iframe to the page. Based on the origin inheritance rules the parent site won't be able to read the CSRF token. However what about clickjacking (or likejacking )? Because of CSRF you must be within an iframe and there for the x-frame-options cannot help, and the same holds true for frame-busters Negatives of IFrame approach Vulnerable to Clickjacking / Likejacking Negatives of DOM approach Vulnerable to CSRF. CORS headers on your server will be allowing access to either the whole world, or whole sites that are pre-registered with you. While this doesn't in itself present a vulnerability, care must be taken to make sure no sensitive information is made available (such as user data). There is no way to limit access to your widget only - you would be giving access to the whole Origin (i.e. protocol, domain and port). As you are manipulating the DOM these objects would be accessible from the remainder of the page outside of your widget. Summary In the end it depends on the functionality of your widget. What is the consequence of the parent site automatically submitting the form or clicking a button on your widget under the context of the user? If there is a like or +1 button, the hosting page could be fraudulently promoting their site by making the like/+1 be registered with you without the user's knowledge or consent. This would apply to both approaches, only the attack method would differ (i.e. CSRF or Clickjacking). The accepted answer on the above post has a solution for CSRF vs Clickjacking: Clicking on the widget needs to open a pop-up window containing a new page -- an iframe is not good enough, it must be a new window -- which is entirely under the control of your web application. Confirm the action, whatever it is, on that page. Yes, this is somewhat inelegant, but the present Web security architecture doesn't…
type: Answer
score: 5
upvote count: 5
has comment: http://stackoverflow.com/comment/39386891

http://stackoverflow.com/comment/39442472
type: QuestionComment
comment on: http://stackoverflow.com/q/25305919
type: Comment
score: 1
has text: This sort of questions has [been asked](http://stackoverflow.com/questions/7056669) and [also answered](http://stackoverflow.com/questions/7056669/prevent-default-event-in-onclick/7056673#7056673).

http://stackoverflow.com/a/25239595
answers question: http://stackoverflow.com/q/25239345
type: Answer
accepted answer of: http://stackoverflow.com/q/25239345
type: AcceptedAnswer
has body: This will work here $existingText.find('tr').each(function(){ if($(this).text().indexOf('expired') &gt; -1){ $(this).find('td:first-child').hide() } }) DEMO
score: 0

http://stackoverflow.com/comment/39872686
type: Comment
comment on: http://stackoverflow.com/a/25379265
score: 0
type: AnswerComment
has text: I wish I could, but I can not. The java script hold data to use and a counter. We load a block of macro code with specific values. I would send you the code but it is very dear to us and best kept private.

http://stackoverflow.com/a/25322004
score: 1
answers question: http://stackoverflow.com/q/25321988
upvote count: 1
has body: Use continue instead of break. continue skips the rest of the loop body and moves on to the next iteration.
type: Answer
downvote count: 0

http://stackoverflow.com/comment/39321310
comment on: http://stackoverflow.com/q/25240666
type: Comment
type: QuestionComment
has text: Are you looking for something like this: http://jsfiddle.net/kiranm/jw5du15v/3/ ?
score: 0

http://stackoverflow.com/q/25329786
has comment: http://stackoverflow.com/comment/39488593
has comment: http://stackoverflow.com/comment/39518235
tagged with: javascript
has comment: http://stackoverflow.com/comment/39487877
has answer: http://stackoverflow.com/a/25329950
answer count: 3
has comment: http://stackoverflow.com/comment/39487469
downvote count: 0
has comment: http://stackoverflow.com/comment/39513487
has comment: http://stackoverflow.com/comment/39513462
has answer: http://stackoverflow.com/a/25344623
has comment: http://stackoverflow.com/comment/39514697
tagged with: nan
favorite count: 0
score: 8
has comment: http://stackoverflow.com/comment/39487739
has comment: http://stackoverflow.com/comment/39488084
upvote count: 8
has comment: http://stackoverflow.com/comment/39514337
has comment: http://stackoverflow.com/comment/39487770
accepted answer: http://stackoverflow.com/a/25344623
has answer: http://stackoverflow.com/a/25329935
has comment: http://stackoverflow.com/comment/39487424
has comment: http://stackoverflow.com/comment/39487485
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25329935
has body: I have set up a js / three.js program for calculating cylinders by only two given values. The only calculation that is quite difficult happens when volume and surface are given. From both values I need to calculate the radius or the height. To recall the formulas: Volume V = π·r²·h Surface A = 2·π·r·(r+h) If you do the math, you will get the cubic formula: 0 = r^3 + A/(-2*pi)*r + V/pi which I honestly could not solve, so I used wolframalpha that gives this result for the radius r: Note: There are three formulas for r, this is the first of them. See wolframalpha. By trying to implement this equation in Javascript I realized that the radicand of √(54πV^2 - A^3) is negative and Javascript is returning NaN. This leads to my question: How can I overcome the NaN and continue the calculation - should I use complex numbers, how? What workarounds have you used? Can I just multiply the radicand by *(-1), remember this value and consider it later on? I am a bit lost here, this is the first time I have to defeat NaN :-) Thanks in advance for all your tips, advices, solutions and code. Edit (reaching the goal): Is someone living on this earth feasable of solving the three equations in Javascript and can post his code? I have generally googled "calculate cylinder by surface and volume" and it seems nobody has done it before...
has comment: http://stackoverflow.com/comment/41042887
has title: How to overcome the NaN and continue the calculation in Javascript - Negative value for radicand of sqrt
type: Question
linked to: http://stackoverflow.com/q/15399340
has comment: http://stackoverflow.com/comment/39487588

http://stackoverflow.com/comment/39476740
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25323070
type: AnswerComment
has text: Fantastic. I'm still on a steep learning curve! Any ideas why the output doesn't quite match the structure from the php code with json below? javascript object {name1: Object, name2: Object, x: Object, y:Object, a: Object...} php Object {data: Object, errors: Array[0]}

http://stackoverflow.com/q/25236095
answer count: 2
linked to: http://stackoverflow.com/q/4770025
favorite count: 0
has title: e.preventDefault() vs preventDefault(e)
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39313022
possible better answer: http://stackoverflow.com/a/25236213
upvote count: 2
has answer: http://stackoverflow.com/a/25236213
downvote count: 2
type: Question
has answer: http://stackoverflow.com/a/25236121
has body: I just see the following code here: function wheel(e) { preventDefault(e); } Beforehand I was used to using like this: function wheel(e) { e.preventDefault(); } So, what's the different between these?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25236121
score: 0

http://stackoverflow.com/comment/39614632
type: Comment
has text: Works fine with JQuery, but when you select the JQuery Mobile at the jsfiddle you posted (I use jquery 1.9.1 / jquarymobile 1.3.1) you get exactely the same problem i get..
score: 1
comment on: http://stackoverflow.com/a/25387740
type: AnswerComment

http://stackoverflow.com/q/25314266
tagged with: css
has comment: http://stackoverflow.com/comment/39458103
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/25314301
upvote count: 1
has answer: http://stackoverflow.com/a/25314301
accepted answer: http://stackoverflow.com/a/25315024
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39458243
has title: Is it possible to make an entire img clickable even if it is overlapped by another element through z-index?
downvote count: 0
tagged with: javascript
tagged with: image
favorite count: 0
has answer: http://stackoverflow.com/a/25315024
has body: Here's my current situation: I have an image defined in &lt;img&gt; and a header defined in &lt;h3&gt;. However, because the part of the header was hidden behind the image, I set z-index: 300 to the header in order to put it above the image. However, I also want to set onClick action to the image, so that when an user clicks on the image, he or she sees some sort of actions there. But since the header now covers the most of the image, the space that the user can tap to evoke the action is pretty small. So I wonder whether it is still feasible to make the image fully clickable despite the fact that it is overlapped by another element. And I would like to know how to do it if it can be done in either CSS or JavaScript (or both). I use HTML5 and CSS3.

http://stackoverflow.com/comment/39597860
has text: @Michael true, I'm used to building for government systems which are predominantly IE6 but don't have an pursue world connection
type: Comment
comment on: http://stackoverflow.com/a/25386969
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39392455
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25279113
has text: There are dozens of datepicker controls -- are you referring to the jquery UI component (http://jqueryui.com/datepicker/)? If so, show also your initialization code; something like `$( "#SelectedDate" ).datepicker({ })` ...
type: QuestionComment

http://stackoverflow.com/q/25251011
has answer: http://stackoverflow.com/a/25269133
type: Question
tagged with: javascript
tagged with: jquery
has title: Angular directive select2-blur event not working as expected
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
tagged with: css
has body: I have the following directive: angular.module('click-to-edit-select2', []) .directive("clickToEditSelect2", function() { var editorTemplate = '&lt;td id="4" class="click-to-edit-select2"&gt;' + '&lt;div id="3" style="height:20px" ng-click="enableEditor()" ng-hide="view.editorEnabled"&gt;' + '{{value}} ' + '&lt;/div&gt;' + '&lt;div id="2" ng-show="view.editorEnabled" style="padding:0px 10px 0px 0px";&gt;' + '&lt;input id="1" type="hidden" ui-select2="select2Options" ng-model="view.editableValue" ng-change="changeText()" /&gt;' + '&lt;/div&gt;' + '&lt;/td&gt;'; return { restrict: "A", replace: true, template: editorTemplate, scope: { value: "=clickToEditSelect2" }, controller: function($scope, $element, $attrs) { $scope.view = { //editableValue: $scope.term.TermId.id, editorEnabled: false }; $scope.enableEditor = function() { if ($scope.$parent.term.Status == "new") { $scope.view.editorEnabled = true; $scope.view.editableValue = $scope.value; } }; $scope.disableEditor = function() { $scope.view.editorEnabled = false; }; $scope.save = function() { //alert($scope.term.TermId.id); $scope.value = $scope.view.editableValue.id; $scope.disableEditor(); }; $scope.$watch('view.editableValue', function(newVal, oldVal) { if (newVal != undefined &amp;&amp; newVal != "") { if (oldVal == newVal) return; $element.addClass('valueChangedTD'); var str = newVal.text; var res = str.split(" - "); //slice the termID res.splice(res.length - 1, 1); var termDescription = res.join(' - '); } }, true); //select2 has its own blur event ! $element.on('select2-blur', function(event) { $scope.save(); }); var initSelectionCb = function(item, callback) { if (item != "") { var id = item.val(); var data = { id: id, text: id }; callback(data); } }; $scope.select2Options = { placeholder: "Select Terminal", dropdownAutoWidth: 'true', multiple: false, width: "resolve", selectOnBlur: true, //this does not seem to work initSelection: function(item, callback) { //selects the initial item initSelectionCb.call(…

http://stackoverflow.com/a/25260840
type: Answer
score: 5
answers question: http://stackoverflow.com/q/25260582
upvote count: 5
downvote count: 0
has body: First off, I will assume this is a theoretical discussion because no page design should ever contemplate multiple millions of DOM elements. If ever it was thought there could be this many elements, then a different design that involves showing smaller windows of the data at a time should be worked out. To get around the unresponsive dialog, you have to break your javascript process into pieces and execute each piece separately while allowing the system to process other events between pieces. This is normally done by breaking the work into chunks and then executing each chunk on a setTimeout(). You can see several examples of processing a large array here: Best way to iterate over an array without blocking the UI. But, you have a number of issues with this test because you will also have to stop using document.write() because once you're letting the system processing other events between setTimeout() operations, you can no longer use document.write() to insert new elements in the parsing stream because the document will finish parsing. Instead, you would have to change to dynamically insert the DOM elements at the appropriate place in the DOM. Here's some code: function insertElements(num) { var totalCntr = 0; var chunkSize = 1000; var parent = document.getElementById("container"); var progress = document.getElementById("progressCntr"); function doChunk() { var chunkCntr = 0; var fragment = document.createDocumentFragment(); while (chunkCntr &lt; chunkSize &amp;&amp; totalCntr &lt; num) { var li = document.createElement("li"); li.innerHTML = "&lt;div&gt;&lt;input value='" + totalCntr + "'/&gt;&lt;/div&gt;"; fragment.appendChild(li); ++totalCntr; ++chunkCntr; } parent.appendChild(fragment); progress.innerHTML = totalCntr; if (totalCntr &lt; num) { setTimeout(doChunk, 0); } } // start the whole thing doChunk(); } insertElements(100000); Working demo: http://jsfiddle.net/jfriend00/0vw82q5y/ This is currently set to 100,000 elements. If you want to experiment with higher…

http://stackoverflow.com/a/25350918
upvote count: 1
has body: T.J. Crowder already gave a great answer, however I wanted to show an alternative way of solving the problem using OO. You could create an object that wraps over an array and makes sure that a random unused item is returned everytime. The version I created is cyclic, which means that it infinitely loops over the collection, but if you want to stop the cycle, you can just track how many movies were chosen and stop once you reached the total number of movies. function CyclicRandomIterator(list) { this.list = list; this.usedIndexes = {}; this.displayedCount = 0; } CyclicRandomIterator.prototype.next = function () { var len = this.list.length, usedIndexes = this.usedIndexes, lastBatchIndex = this.lastBatchIndex, denyLastBatchIndex = this.displayedCount !== len - 1, index; if (this.displayedCount === len) { lastBatchIndex = this.lastBatchIndex = this.lastIndex; usedIndexes = this.usedIndexes = {}; this.displayedCount = 0; } do index = Math.floor(Math.random() * len); while (usedIndexes[index] || (lastBatchIndex === index &amp;&amp; denyLastBatchIndex)); this.displayedCount++; usedIndexes[this.lastIndex = index] = true; return this.list[index]; }; Then you can simply do something like: var randomMovies = new CyclicRandomIterator(Object.keys(movies)); var randomMovie = movies[randomMovies.next()]; Note that the advantage of my implementation if you are cycling through items is that the same item will never be returned twice in a row, even at the beginning of a new cycle.
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/25350625

http://stackoverflow.com/a/25230717
accepted answer of: http://stackoverflow.com/q/25230232
has comment: http://stackoverflow.com/comment/39303662
type: Answer
has comment: http://stackoverflow.com/comment/39426499
has comment: http://stackoverflow.com/comment/39425202
has body: You can use the following regex and get the content of the capturing group to check if your string is valid: .*\d{3}.*|^([\w\+$#/\\]{6,})$ Working demo Using \w allows A-Za-z0-9_ if you don't want underscore on your regex you have to replace \w by A-Za-z0-9 For the following examples: pass12p --&gt; Pass pass125p --&gt; Won't pass asdfasf12asdf34 --&gt; Pass asdfasf12345asdf34 --&gt; Won't pass Match information is: MATCH 1 1. `pass12p` MATCH 2 1. `asdfasf12asdf34`
downvote count: 1
has comment: http://stackoverflow.com/comment/39303708
score: 3
upvote count: 4
answers question: http://stackoverflow.com/q/25230232
has comment: http://stackoverflow.com/comment/39303369
type: AcceptedAnswer

http://stackoverflow.com/a/25349874
accepted answer of: http://stackoverflow.com/q/25349545
answers question: http://stackoverflow.com/q/25349545
upvote count: 3
type: AcceptedAnswer
has body: See the flot example here on multiple axis. Minimal example: $.plot("#placeholder", [ { data: d1 }, { data: d2, yaxis: 2 } // set second series to use second axis ], { yaxes: [ { min: 0 // options for first axis }, { alignTicksWithAxis: 1 // options for second axis, put it on right position: "right" } ], }); Two mix a bar and line chart set that in each's series object: $.plot("#placeholder", [{ data: d1, lines: { show: true } }, { data: d2, bars: { show: true } }]); Putting these together, here's an example:
type: Answer
score: 3
downvote count: 0

http://stackoverflow.com/comment/39376396
has text: If I understood you correctly, I think your problem is event propagation. [Read here](http://www.quirksmode.org/js/events_order.html). Basically you need to make sure that child div event doesn't get fired on parent div.
score: 0
comment on: http://stackoverflow.com/q/25270114
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39334249
type: Comment
comment on: http://stackoverflow.com/a/25247449
has text: You could also add an `} else { return false; }` to stop it from looping through remaining elements on the page if there is no associated data for them
score: 0
type: AnswerComment

http://stackoverflow.com/q/25357251
tagged with: django-forms
has answer: http://stackoverflow.com/a/25371902
accepted answer: http://stackoverflow.com/a/25371902
upvote count: 2
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 2
tagged with: django-templates
downvote count: 0
has title: django TypedChoiceField - not allow default value of 0
type: Question
tagged with: parsley.js
type: AnsweredQuestion
has body: I am not so sure I have designed my forms.py file correctly, when it comes to a TypedChoiceField and not allowing a selected value of "0" to be entered by the user. I have read the django docs, but couldn't find anything about this. There is something about empty_value, but I couldn't find any examples about this for the TypedChoiceField. I have a list of country names in a select list: Select a country or territory Afghanistan Aland Islands Albania ...... In my forms.py file I have the following (including the cleaned data code): @parsleyfy class AddressDetailsForm(forms.Form): required_css_class = 'required' address_country_style_type = forms.TypedChoiceField( coerce=int, label=_('Address Format'), choices=[(x, x) for x in range(0, 256)], required=True) .... def clean(self): cd_addf = super(AddressDetailsForm, self).clean() if 'address_country_style_type' in cd_addf and cd_addf['address_country_style_type'] == 0: self._errors['address_country_style_type'] = self.error_class([_("You must select an Address Format.")]) del self.cleaned_data['address_country_style_type'] else: .... I have added django-parsley to set up the client side validation. Is there a way in the forms.py file in the "address_country_style_type = forms.TypedChoiceField" declaration to state that the address_country_style_type must not accept an option value of 0, so that this validation will be picked up automatically by django-parsley and I can cull the cleaned data if statement?

http://stackoverflow.com/a/25353840
answers question: http://stackoverflow.com/q/25353659
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39530374
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25353659
has body: Since all JS variables default to undefined, if you say the term assigned, the previous answers are not precise: function isGloballyDefined(varName) { return window[varName] !== undefined } If a variable has a null or false value, it already has been assigned by some piece of code. Since you didn't specify the context, depending where you are running this code, the window object might not be available, so if you want to use this in a node context, then you probably want to look for the variable in the global object. Hope this helps.

minify
tags question: http://stackoverflow.com/q/25370995
tags question: http://stackoverflow.com/q/25316018
tag name: minify
tags question: http://stackoverflow.com/q/25324378
tags question: http://stackoverflow.com/q/25258435
tags question: http://stackoverflow.com/q/25244876
type: Tag
tags question: http://stackoverflow.com/q/25248630

http://stackoverflow.com/comment/39553612
type: QuestionComment
comment on: http://stackoverflow.com/q/25366474
score: 5
has text: IDs **must** be unique.
type: Comment

http://stackoverflow.com/q/25382759
has comment: http://stackoverflow.com/comment/39584578
answer count: 6
possible better answer: http://stackoverflow.com/a/25382864
score: 0
has answer: http://stackoverflow.com/a/25383012
has answer: http://stackoverflow.com/a/25382934
has answer: http://stackoverflow.com/a/25383036
has answer: http://stackoverflow.com/a/25382864
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25382961
has body: I have an array of objects in this form : [ { id:"123", url:"example1.com"}, { id:"123", url:"example2.com"}, { id:"456", url:"example3.com"}, { id:"789", url:"example4.com"}, ] I'm looking for a fast performing way to filter this array to keep only objects with a unique id, in this case, the output should be : [ { id:"123", url:"example1.com"}, { id:"456", url:"example3.com"}, { id:"789", url:"example4.com"}, ] I'm using a double for loop to compare my objects, but it's painfully slow on a large array... Does anyone have a good solution?
has comment: http://stackoverflow.com/comment/39584428
has title: Javascript : Objects with unique key within an array
type: Question
has comment: http://stackoverflow.com/comment/39584366
has answer: http://stackoverflow.com/a/25383057
accepted answer: http://stackoverflow.com/a/25383057
tagged with: arrays
tagged with: javascript

http://stackoverflow.com/comment/39626168
score: 0
type: Comment
has text: Call it using `onclick` of a button. E.g. ` Login to Facebook `
comment on: http://stackoverflow.com/a/25360137
type: AnswerComment

http://stackoverflow.com/a/25533255
has body: I'm having a similar problem, but I think this may be useful: http://jsfiddle.net/robdodson/KWRxW/ var x = d3.time.scale() .domain([new Date(data[0].date), d3.time.day.offset(new Date(data[data.length - 1].date), 1)]) .rangeRound([0, width - margin.left - margin.right]); Also, Mike enumerates on Date/Time offsets here: https://github.com/mbostock/d3/wiki/Time-Intervals :)
answers question: http://stackoverflow.com/q/25284256
score: 0
type: Answer

http://stackoverflow.com/comment/39468240
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25319388
has text: For us to be able to see what is going on we need the code that you are using. Also a isolated example of the issue would be very helpful but it's not compulsory.

http://stackoverflow.com/comment/39466654
has text: @FelixKling Yeah I can understand the string escaping could be an issue, but I am not sure I can think of "many" reasons to avoid this--especially in the example provided. I think in "many" cases this is a perfectly acceptable solution.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25318448

http://stackoverflow.com/comment/39351418
type: QuestionComment
comment on: http://stackoverflow.com/q/25255935
score: 0
has text: I have some buttons on the page that call methods on it. even changing a simple property of the object from the console doesn't update. I guess i may have to dig into Deps, or just create a simple mongo cursor to back end it.
type: Comment

http://stackoverflow.com/q/25235784
tagged with: angularjs
score: 6
has title: Javascript (Angularjs) websocket with promises?
accepted answer: http://stackoverflow.com/a/25236690
type: AnsweredQuestion
upvote count: 7
downvote count: 1
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/25235894
has answer: http://stackoverflow.com/a/25235894
tagged with: javascript
has answer: http://stackoverflow.com/a/25236690
has body: I use Angularjs in a project. I use $q.all with multiple request from $http, It's work. In new case, I use websocket, but I don't know how to use promises with websocket. $http return promises, but websocket is not. Websocket Example: (it's not real code) I send pack id is 1000, and I reviced pack id is 2000. websocket.send(1000); websocket.onMessage(data) { if (data.id == 2000) { // do something } } I went to use Promises with websocket, it's possible?
favorite count: 0

http://stackoverflow.com/comment/39648319
score: 1
has text: @FrankvanPuffelen In case you're interested I figured out the answer! Unfortunately d3.chart's draw function can only accept a data object, so rather than pass it a function that calculates the data object I looped through and manually set the data for each chart. And it works now! (: Yay! Now if only I could figure out how to have d3 chart layers within layers I'd be set.. :P
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25316432

http://stackoverflow.com/a/25232743
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25232676
has comment: http://stackoverflow.com/comment/39306361
upvote count: 1
has body: You can use the +, but for your use case (matching all words in a sentence), you might be better off using split. var input = "This is a something"; input.split(' '); // ["This", "is", "a", "something"] And in this case, it looks like split is what you're looking for too: input = "words with a-hyphen"; input.split(' '); // ["words", "with", "a-hyphen"] input.match(/[a-z0-9]+/gi); //["words", "with", "a", "hyphen"] You can always use a match on it later if needed
type: Answer
has comment: http://stackoverflow.com/comment/39306240

http://stackoverflow.com/comment/39328785
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25244683
score: 2
has text: It won't really do the trick, because one you do that then the whole header disappears completely.

http://stackoverflow.com/a/25268085
answers question: http://stackoverflow.com/q/25267800
score: 0
type: Answer
has body: The returning JSON data stream does not contain a property "data.response" Referring to this as a parameter $.each(data.response, ....will lead to the length error in data.response[i].link Have a look at the structure of the returned JSON data and handle exceptions properly.

http://stackoverflow.com/comment/39307032
comment on: http://stackoverflow.com/a/25232614
has text: When I tried your method, the code appeared to being working in that when I requested a specific page it would display the correct console.log message, but it wouldn't load the page and I got a Windows "Firewall blocked a requested from V8 Engine, etc." error
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25349118
has comment: http://stackoverflow.com/comment/39523691
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39523752
score: 0
has comment: http://stackoverflow.com/comment/39522406
tagged with: ng-animate
answer count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39524433
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39522097
has title: AngularJS slide right / left animation
has body: I'm trying to create a simple slide animation with AngularJS. I have a feedback tab that when someone click on it it will slide from right to left and will open, another click will do the animation again and will close it. The thing is i'm not sure how to create the slide animation. I read about that that ng-animation is obsolete and now i need to use class and it automatically hook on ng-hide and ng-show I have 2 div elements: i need some code that will make the slide animation from close to open and from open to close. can anyone help me out ? a nice slide example will be in here : http://feedback-me.appspot.com/example_bootstrap.html

http://stackoverflow.com/q/25257020
has comment: http://stackoverflow.com/comment/39352369
has comment: http://stackoverflow.com/comment/39352493
has title: jQuery AJAX request 'parseerror' error on JSON
answer count: 2
upvote count: 0
score: -2
accepted answer: http://stackoverflow.com/a/25257561
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
tagged with: matrix
has comment: http://stackoverflow.com/comment/39352438
has comment: http://stackoverflow.com/comment/39352471
has comment: http://stackoverflow.com/comment/39352342
has body: When sending an AJAX request to get a JSON object, which specifically is an nxn matrix, I get a 'parseerror' error. This only occurs for really large matrices (800x800). The AJAX request works perfectly for smaller sized matrices (200x200). I also commented out dataType: "json" and it works, but since I run the code twice in succession, it breaks the second time. var dir = "filename"; $.ajax({ type: "POST", url: "getSimMatrix.php?dir=" + dir + "%2F", dataType: "json", //timeout:80000, //80 seconds error: function(x, t, m) { if(t==="timeout") { alert("timeout occurred"); } else { alert(t); } }, success: function(data) { console.log("matrix done"); } }); Edit: Here's a sample JSON object that is created: [[0,4,3,2,5,6,1],[1,2,5,3,0,4,6],[2,1,0,5,3,4,6],[3,0,4,5,2,1,6],[4,0,3,6,5,2,1],[5,3,2,0,1,4,6],[6,4,0,3,2,5,1]]
possible better answer: http://stackoverflow.com/a/25257176
has comment: http://stackoverflow.com/comment/39352765
downvote count: 2
has answer: http://stackoverflow.com/a/25257176
has answer: http://stackoverflow.com/a/25257561
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39352589
has comment: http://stackoverflow.com/comment/39352403
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/a/25244142
accepted answer of: http://stackoverflow.com/q/25238971
has body: I have found solution. here i have hide paging elements, so next link is not display,so here i just show a next link and hide other element so it's works fine. Regards, vinit
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25238971
has comment: http://stackoverflow.com/comment/49462272

http://stackoverflow.com/q/25239142
has answer: http://stackoverflow.com/a/25239242
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/14321012
tagged with: javascript
score: 0
has body: In my view model I have a boolean property that's visualized by a checkbox in the view. I want the user to be able to click on the containing element as well to toggle the property, but that poses problems when the user clicks the checkbox: the change is not registered then. Consider this view: &lt;div class="my-option" data-bind="click: toggleOption1"&gt; &lt;input type="checkbox" data-bind="checked: isOption1Checked" /&gt; Entire div is clickable to select this option. &lt;/div&gt; With this view model: var ViewModel = function() { var self = this; self.isOption1Checked = ko.observable(false); self.toggleOption1 = function(){ self.isOption1Checked(!self.isOption1Checked()); }; }; As you can see in this corresponding jsfiddle, this will not allow you to click on the checkbox to change the boolean observable. This kinda makes sense to me, probably the click handler changes the value, but the checked binding also handles the change and reverts it. The general solution I felt I needed was a one way checked binding or something of the sort, so I tried using the attr binding: &lt;div class="my-option" data-bind="click: toggleOption1"&gt; &lt;input type="checkbox" data-bind="attr: { checked: isOption1Checked() ? 'checked' : '???'" /&gt; Entire div is clickable to select this option. &lt;/div&gt; However, this will not work: there is no checked="false" option in html. You just omit the checked attribute altogether. I don't think the attr binding can do that however. One other workaround I thought of was to create my own binding (possibly based on / delegating the read bit to the default checked binding), but it feels like overkill. Am I missing an obvious, elegant Knockout solution? My current workaround (trying to evade creating such a custom binding) involves some elaborate view logic: &lt;div class="my-option" data-bind="click: toggleOption1"&gt; &lt;!-- ko if: isOption1Checked --&gt; &lt;input type="checkbox" checked="checked" /&gt; &lt;!-- /ko --&gt; &lt;!-- ko if: !…
answer count: 1
accepted answer: http://stackoverflow.com/a/25239242
tagged with: knockout.js
has title: Combining checked binding with click binding on containing element
type: Question
duplicate of: http://stackoverflow.com/q/14321012

http://stackoverflow.com/q/25236989
has answer: http://stackoverflow.com/a/26923615
tagged with: android
has title: HIde HTML Elements Xamarin Android WebView?
type: UnansweredQuestion
type: Question
tagged with: c#
has body: I am creating a web wrapper app, and am wanting to only show certain elements in an html page. I have the current code below, and I know I need to use javascript possibly but am not sure where to go to from here. public class MainActivity : Activity { protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); // Set our view from the "main" layout resource SetContentView (Resource.Layout.Main); var webView = FindViewById&lt;WebView&gt; (Resource.Id.webView); webView.Settings.JavaScriptEnabled = true; // Use subclassed WebViewClient to intercept hybrid native calls webView.SetWebViewClient (new WebViewClient ()); webView.LoadUrl ("http://bobhoil.com/"); } public override bool OnCreateOptionsMenu(IMenu menu) { base.OnCreateOptionsMenu (menu); MenuInflater inflater = this.MenuInflater; inflater.Inflate (Resource.Menu.menu, menu); return true; } } Thanks
tagged with: javascript
score: 0
tagged with: wrapper
tagged with: xamarin
answer count: 1

http://stackoverflow.com/q/25301269
tagged with: complete.ly
tagged with: wordpress
type: Question
tagged with: javascript
tagged with: jquery
upvote count: 1
answer count: 1
has title: adding complete.ly script in Worpdress
favorite count: 0
has body: I have a Wordpress 3.9.1 and added complete.ly script to my WP-page so there is an autocomplete field but it does not show the dropdown list and even not available to edit. The code list below works in plain html but does not work in WordPress. Where I am wrong and how to do it right?
has answer: http://stackoverflow.com/a/25319142
type: UnansweredQuestion
tagged with: php
downvote count: 0
score: 1

http://stackoverflow.com/q/25295867
has answer: http://stackoverflow.com/a/25296051
type: Question
has comment: http://stackoverflow.com/comment/39424275
has title: how to set div element to always be one third from left
tagged with: javascript
has comment: http://stackoverflow.com/comment/39424248
score: 0
has answer: http://stackoverflow.com/a/25295952
has answer: http://stackoverflow.com/a/25295956
has body: I have a div element inside another div element like this: &lt;div id="container"&gt; &lt;div id="inner" style="width:50%;"&gt; some text &lt;/div&gt; &lt;/div&gt; inner div now covers half of the width of container. I want to position my inner div so that it is 1/3 of the empty space from left and 2/3 from right. In other words 1/6 of the width of the container from left and 2/6 from right. I want the inner div to be always like that even if you resize container. How do I do it?
has answer: http://stackoverflow.com/a/25295982
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39424372
tagged with: css
answer count: 4
accepted answer: http://stackoverflow.com/a/25295952
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25296051

http://stackoverflow.com/comment/39416047
type: Comment
has text: voila: http://jsfiddle.net/bhqvbd3y/3/
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/25291797

http://stackoverflow.com/comment/39494003
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25298316
has text: I'm having errors and all the actions or updates that I have won't work look the last image on the post.
type: AnswerComment

http://stackoverflow.com/a/67295161
downvote count: 1
upvote count: 3
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25323823
has body: For my case, I instead wanted something like 04-28-2021 20:00 => 04-28-2021 20:00 04-28-2021 20:30 => 04-28-2021 20:30 04-28-2021 20:11 => 04-28-2021 20:00 04-28-2021 20:35 => 04-28-2021 20:30 so the function below did the trick function toNearest30Minutes(date) { const start = moment(date) let remainder: number const elapse = start.minute() % 30 if (elapse === 0) { return moment(date).format() } else { remainder = 30 - elapse return moment(start).add(remainder, "minutes").format() } } The function above is just an adaptation of @jtromans answer higher above

http://stackoverflow.com/q/25358897
possible better answer: http://stackoverflow.com/a/25359079
favorite count: 0
has answer: http://stackoverflow.com/a/25361283
has answer: http://stackoverflow.com/a/25359079
tagged with: angularjs
tagged with: requirejs
score: 2
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/25361283
type: Question
has answer: http://stackoverflow.com/a/30536230
has title: ZeroClipboard and RequireJS - ZeroClipboard is not defined
tagged with: javascript
answer count: 3
tagged with: zeroclipboard
downvote count: 0
has body: I'm attempting to use ZeroClipboard inside an AngularJS/RequireJS Application. I have put ZeroClipboard.js into the location /assets/js/vendors/ZeroClipboard.js I have set up the main.js of the RequireJS application main.js requirejs.config({ paths: { jQuery: 'vendors/jquery.min', 'clipboard': 'vendors/ZeroClipboard', underscore: 'vendors/underscore-min', angular: 'vendors/angular.min', 'angular-route': 'vendors/angular-route.min', 'controllers': 'controllers', 'services': 'services', 'filters': 'filters', 'directives': 'directives', 'app': 'app' }, shim: { underscore: { exports: '_' }, 'jQuery': { 'exports': 'jQuery' }, 'angular': { exports: 'angular' }, 'states': { deps: ['angular'], exports: 'states' }, 'angular-route': { deps: ['angular'] } }, priority: [ 'angular' ] }); requirejs(['angular', 'app', 'underscore', 'routes', 'vendors/jquery.min', 'services/services', 'directives/directives', 'filters/filters', 'controllers/controllers' ], function (angular, app, _) { angular.element(document).ready(function () { angular.bootstrap(document, ['App']); document.getElementsByTagName('html')[0].dataset.ngApp = 'App'; }); }); And inside the controller that I am calling ZeroClipboard controller.js define(['clipboard'], function() { var AppCtrl = function($scope, $modal, $timeout, $log, $http, $routeParams, $rootScope) { var client = new ZeroClipboard( $("li#copy-buildr") ); }; return AppCtrl; }); All I seem to get is ReferenceError: ZeroClipboard is not defined

modal-dialog
tags question: http://stackoverflow.com/q/25387489
tag name: modal-dialog
tags question: http://stackoverflow.com/q/25258773
tags question: http://stackoverflow.com/q/25266142
tags question: http://stackoverflow.com/q/25344246
type: Tag
tags question: http://stackoverflow.com/q/25235558

http://stackoverflow.com/a/25546307
upvote count: 2
answers question: http://stackoverflow.com/q/25347238
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25347238
has body: Hey Chinthaka, I am giving you fiddle link.. Link- http://jsfiddle.net/falafelsoftware/B8ynX/ I hope you like it.. if you like then don't forget to vote me...
type: Answer
score: 2

http://stackoverflow.com/q/25367089
upvote count: 3
possible better answer: http://stackoverflow.com/a/25367225
type: Question
has body: at the moment I have hidden the 2nd banner and currently banner 1 shows. When I click the arrow I want banner 1 to hide and banner 2 to show coming in from the right hand side. at the moment it comes from the bottom using this: $(".homeArrow").on('click', function () { $('.homeImage').animate({ width: 'toggle' }); }); this is the JS fiddle: http://jsfiddle.net/8a7GL/174/ How do i get the slider moving horizontal rather than verticle. thanks
answer count: 2
accepted answer: http://stackoverflow.com/a/25367393
linked to: http://stackoverflow.com/q/25362589
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39555237
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/39555596
has answer: http://stackoverflow.com/a/25367393
has title: Jquery slider goes down how to make it go horizontal
downvote count: 1
has answer: http://stackoverflow.com/a/25367225
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/39555161

http://stackoverflow.com/a/25325276
has body: My advice: use single quotes (or, better, nowdoc on php 5.3+) to prevent excessive escaping encode all values that are used in javascript as json to avoid quotation/newline issues use mini-templating for variable substitutions Example: $js = &lt;&lt;&lt;'JS' $("#toggle1").click(function(){ if(toggle != 1 &amp;&amp; open == true){ open = false; var panel = "#panel"+toggle; $(panel).slideToggle("slow"); } toggle = {{input}}; // I need this to update from php argument $("#panel1").slideToggle("slow",function(){ $('html, body').animate({ scrollTop: $("#panel1").offset().top }, animation_time );}); if(open == true) open = false; else open = true; return false; }); return; JS; $input = json_encode($input); return str_replace('{{input}}', $input, $js); } print returnJS('hi "there" ');
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25324666
type: Answer
answers question: http://stackoverflow.com/q/25324666
downvote count: 0

http://stackoverflow.com/comment/39571405
comment on: http://stackoverflow.com/a/25375355
has text: If you have ` `, Chrome and Firefox do not override the `window.stop()` function. As best I know, they only make those auto globals if nothing else occupies that property.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39469229
has text: Unless I'm missing something, I don't see anything different based on this example alone.
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25320253
type: QuestionComment

http://stackoverflow.com/q/25273931
has body: I am currently working with jQuery Datatables and filling it with Ajax data. I don't have an endpoint that returns all the results, it is based on the page number and amount you want returned. The page has a maximum of 100 results. I of course don't want to long all results at once, however I am not entirely sure how to do this correctly and efficiently since I don't want the loading time long. Any help would be wonderful and appreciated! $.when( $.get("url", function(result) { brands.pages = result.totalPages; brands.total = result.totalElements; brands.data = []; for(var i = 0; i &lt; brands.pages; i++) { $.get('url/'+ i +'/size/100', function(data) { $.each(data, function(key, val) { if(key === 'content'){ $.each(val, function(num, brand) { brands.data = brands.pages }) } }); }); } }), ).then(function() { $('#table').DataTable({ data: brands.data, other options... }); });
has comment: http://stackoverflow.com/comment/39384684
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
tagged with: load
has comment: http://stackoverflow.com/comment/39417714
tagged with: datatable
answer count: 0
score: 0
type: UnansweredQuestion
has title: Ajax + Multiple URLs + Datatable

http://stackoverflow.com/q/25342928
score: 5
accepted answer: http://stackoverflow.com/a/25343117
upvote count: 5
tagged with: javascript
tagged with: gruntjs
answer count: 2
downvote count: 0
favorite count: 0
has body: The code My latest commit is in a repo on GitHub. The problem... I am setting up a project (link above) using GruntJS. While trying to run any Grunt task, I'm getting a No "&lt;insert-taskname&gt;" targets found; a few examples: No "browserSync" targets found. Warning: Task "browserSync" failed. Use --force to continue. No "jshint" targets found. Warning: Task "jshint" failed. Use --force to continue. No "sass" targets found. Warning: Task "sass" failed. Use --force to continue. What I'm doing I am using external .js Grunt config files using the load-grunt-configs plugin. I have used a very similar setup in other projects without problems. I'm passing the shared Grunt variables which were initialized in the Gruntfile.js to each of the grunt-configs files using the options object that is a part of the load-grunt-configs plugin. What I've tried so far... I've tried checking my Grunt variables that are being used in the external config files, double checking my syntax and bracket matching, and searching through other stack overflow questions with no luck. Any help would be greatly appreciated! Thank you.
has title: GruntJS setup: No targets found
has answer: http://stackoverflow.com/a/25343117
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25343142
has answer: http://stackoverflow.com/a/25343142
type: Question

http://stackoverflow.com/comment/39527307
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25352189
type: Comment
has text: Did you add the controller before you called the config block?

http://stackoverflow.com/comment/39577575
comment on: http://stackoverflow.com/a/25377112
has text: @Realto619 It should be `console.log("tb.val = " + tb.val());`. If you log `tb.val`, it will give you the `.val()` function's definition. You have to do the function call `tb.val()` instead.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39837387
has text: are you using Apache Cordova / Phonegap to load your webview?
score: 0
comment on: http://stackoverflow.com/q/25377383
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39332918
type: AnswerComment
comment on: http://stackoverflow.com/a/25246816
has text: Great, thanks for the catch. Will accept when SO allows
type: Comment
score: 0

http://stackoverflow.com/comment/39323489
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25239976
has text: gud answer on the whole now
score: 0

http://stackoverflow.com/q/25362783
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39553127
tagged with: google-chrome-extension
favorite count: 0
answer count: 0
duplicate of: http://stackoverflow.com/q/14798528
upvote count: 2
type: UnansweredQuestion
score: 2
tagged with: gruntjs
tagged with: webdriver
has title: Is there a way to automate the testing of chrome extensions?
type: Question
tagged with: tdd
has body: I'm writing an extension for Google's Chrome browser and, in good TDD fashion, I'd like to start writing some BDD-like end-to-end integration tests before I start. However, I'm finding documentation on how to automate Chrome extension is sparse especially if you're using JavaScript/Grunt. The main problem being: how do I automatically install a Chrome extension in your Webdriver run? As far as I can see the only way to do this is in Java: http://releasematic.wordpress.com/2013/12/29/automation-testing-chrome-extensions/ No similar API exists for Javascript! Is this correct? Is anyone else automating the testing of their chrome extensions?

http://stackoverflow.com/q/25387876
has answer: http://stackoverflow.com/a/25393559
tagged with: mapbox
has title: Overlaying water in Mapbox
tagged with: maps
accepted answer: http://stackoverflow.com/a/25393559
type: AnsweredQuestion
tagged with: leaflet
type: Question
answer count: 1
has body: I'm trying to overlay all water on a map with a .png file. I successfully managed to do this in Tilemill, but it's 1000GB when I try to export it, so this isn't an option. I noticed it has been done before: https://roadtrippers.com/ But I can't seem to figure out how they placed the overlay on top of the water. Thank you for any hints!
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39310409
comment on: http://stackoverflow.com/a/25234692
has text: @Derek朕會功夫 - They aren't creating a generic objects here - that would have a capital letter `Object`. I assume they're just using pseudocode here.
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39513895
type: AnswerComment
has text: Maybe you did, but it's in the Low Quality Posts queue for a reason. Throwing down some code without explaining what it does and why it works typically doesn't help the OP as much as explaining would.
type: Comment
comment on: http://stackoverflow.com/a/25296336
score: 0

http://stackoverflow.com/comment/39541196
score: 0
has text: is response type json or simple html
type: Comment
comment on: http://stackoverflow.com/a/25359850
type: AnswerComment

http://stackoverflow.com/q/25381772
has title: How to set filter in table dropdown based on table row data
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/39614488
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25394735
has comment: http://stackoverflow.com/comment/39614387
linked to: http://stackoverflow.com/q/25387580
score: 2
tagged with: sapui5
has body: The following question was driven by this SAPUI5 topic on SCN: 2 dropdownboxs, filtering second off the the value in first We have a SAPUI5 table, containing two columns, each record in the table shows a dropdown: one for Divisions, and one for Business Units. Depending on the value of the selected Division, the Business Unit dropdown should only show the BU's which are valid for the chosen division The actual table data is stored in a named model tablemodel, the data for the dropdowns is stored in a named model metamodel See below example of how the table should look like: In order to be able to filter the Business Units on Division, the named model metamodel looks like: divisions: [ { division : "div1", divisiondesc: "Division 1" }, { division : "div2", divisiondesc: "Division 2" }, //etc ], bunits: [ { busunit : "bus1", busunitdesc: "Business Unit 1", division : "div1" }, { busunit : "bus2", busunitdesc: "Business Unit 2", division : "div3" }, //etc ] so the 2nd dropdown (which binds to /bunits) can be filtered on property division. The sap.ui.commons.table.Table is built in a JSView component as follows: var oTable = new sap.ui.table.Table() //First column w/ dropdown Divisions .addColumn(new sap.ui.table.Column({ label: new sap.ui.commons.Label({ text: "Division" }), template: new sap.ui.commons.DropdownBox({ selectedKey: "{tablemodel&gt;division}", items: { path: "metadatamodel&gt;/divisions", template: new sap.ui.core.ListItem({ text: "{metadatamodel&gt;divisiondesc}", key: "{metadatamodel&gt;division}" }) } }) })) //Second column w/ dropdown Business Units, which should be filtered .addColumn(new sap.ui.table.Column({ label: new sap.ui.commons.Label({ text: "Business Unit" }), template: new sap.ui.commons.DropdownBox({ selectedKey: "{tablemodel&gt;bus_unit}", items: { path: "metadatamodel&gt;/bunits", template: new sap.ui.core.ListItem({ text: "{metadatamodel&gt;busunitdesc}", key: "{metadatamodel&gt;busunit}" }) , filters: [new sap.ui.model.Filter("division…

vb.net
tags question: http://stackoverflow.com/q/25361378
tags question: http://stackoverflow.com/q/25240521
tags question: http://stackoverflow.com/q/25337400
type: Tag
tags question: http://stackoverflow.com/q/25366038
tag name: vb.net
tags question: http://stackoverflow.com/q/25376595
tags question: http://stackoverflow.com/q/25281284
tags question: http://stackoverflow.com/q/25283991
tags question: http://stackoverflow.com/q/25385338

http://stackoverflow.com/comment/39347995
has text: my questions asks to achieve it without using java script.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25254429
type: Comment

http://stackoverflow.com/a/25680752
has comment: http://stackoverflow.com/comment/40357538
has body: Here's what i did to get the from email id from message After calling the listThread() method, i called getThread() method to fetch the from email ID from that thread as following. listThreads("me", "", function (dataResult) { $.each(dataResult, function (i, item) { getThread("me", item.id, function (dataMessage) { var temp = dataMessage.messages[0].payload.headers; $.each(temp, function (j, dataItem) { if (dataItem.name == "From") { Console.log(dataItem.value); } }); }); }); }); Similarly you can fetch other details from the message. Reference : JSON Format for the message
upvote count: 1
answers question: http://stackoverflow.com/q/25353304
has comment: http://stackoverflow.com/comment/40464553
has comment: http://stackoverflow.com/comment/40357358
has comment: http://stackoverflow.com/comment/40387861
downvote count: 0
has comment: http://stackoverflow.com/comment/40430655
has comment: http://stackoverflow.com/comment/40343764
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/40272260

http://stackoverflow.com/comment/39368704
type: QuestionComment
has text: it can be done from the DOM but why can't you create the array at server ?
comment on: http://stackoverflow.com/q/25266005
score: 0
type: Comment

http://stackoverflow.com/a/25315203
has body: you can use the function in bellow... function objToColumnValues(results, headers){ var values = results.map(function(resultItem){ var row = []; headers.forEach(function(header){ row.push(resultItem[header] || '' ); }); return row; }); return values; } you will use ... //in var json is your json-string var parsed = JSON.parse(json); var colValues = objToColumnValues(parsed.results, ['name', 'address', 'age']);
answers question: http://stackoverflow.com/q/25314912
score: 0
type: Answer

http://stackoverflow.com/q/25277412
score: 0
has comment: http://stackoverflow.com/comment/39389573
has comment: http://stackoverflow.com/comment/39389690
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has title: AngularJS: I have the same function in more than one controller. Keeping DRY in mind, what's the best solution?
has body: app.controller('Controller', ['$scope', function($scope){ $scope.getNote = function (note) { return 'http://mydummyaudiofile.com/'+note+'.mp3'; }; $scope.notes = function(note){ var id = "audio-"+note; var audio = document.getElementById("audio-"+note); audio.load(); audio.play(); }; }]); The code as it is written is functioning. If you are curious, it is essentially a keyboard that loops through an array of audio files using ng-repeat, and has them line up with the correct keys. Again, this works already, but I am making several different controllers with different arrays of audio files (several types of keyboards), and I don't want to copy/paste the code several times. Is there a solution that allows me to "scope" the function so that I can still use ng-repeat? I have tried using a factory, but it failed. So far the solution seems to be using a custom directive, but before I spend any more time messing with it I wanted to make sure there wasn't an alternative. Thank you!
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39389686

http://stackoverflow.com/q/25387439
tagged with: fade
has title: Have an image fade out when I have reached the bottom of the page, then reappear if otherwise
has answer: http://stackoverflow.com/a/25387789
has body: I currently have a div with an image inside that fades in when the user has scrolled 300px down, and when they scroll back to the top, the div fades away. This div is essentially a "Back To Top" anchor. What I would like to add to this is, when the user is 650px away from the bottom of the page, to have the image fade away, and then fade in when the user is greater than 650px away. JavaScript $(function(){ $(".top").hide(); $(window).scroll(function(){ if($(this).scrollTop()&gt;300){ $(".top").fadeIn(500) }else{ $(".top").fadeOut(100) } }) }); HTML &lt;div class="top"&gt; &lt;a href="#top"&gt;&lt;img src="img/toTop.png" width="50"&gt;&lt;/a&gt; &lt;/div&gt; Once again, I need to add on to my current JS. Thanks!
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25387789
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39593715
score: 0
tagged with: scroll
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39456773
type: AnswerComment
has text: I've learned a couple of things today. Thank you for your detailed answer!
type: Comment
comment on: http://stackoverflow.com/a/25309313
score: 0

http://stackoverflow.com/q/25302535
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39436334
has title: link to an anchor on another page with a bunch of images before it
type: Question
has answer: http://stackoverflow.com/a/25302570
tagged with: javascript
has body: I have a link to a dom element on another page, the problem is that dom element has a lot of images before it, so when navigate to that element, the page fist works as expected but than jump to anywhere before it. I think the issue is it first calculate the right position before images load, but than loaded images makes page longer than before so the target dom element is displayed at wrong place. Is there any way to avoid this happening?
has comment: http://stackoverflow.com/comment/39436323
score: 0
answer count: 1

http://stackoverflow.com/comment/39585078
has text: Have you tried *anything* yet? Show us your effort!
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25383124

http://stackoverflow.com/a/25232933
answers question: http://stackoverflow.com/q/25232837
score: 0
type: Answer
has body: Define basic position in JS as well, and add parseInt when reading style (left is string in format like this 200px). document.getElementById("foo").style.left = "300px"; function doMove() { var foo = document.getElementById("foo"); foo.style.left = (parseInt(foo.style.left) + 200) + 'px'; }

http://stackoverflow.com/comment/39448336
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25308845
has text: Hey... calm down. I can't understand what you are asking. Please, reformulate your question.
score: 1

http://stackoverflow.com/comment/39377355
comment on: http://stackoverflow.com/q/25270181
type: QuestionComment
score: 0
has text: I think what you are describing is exactly what the jquery adaptive background (https://github.com/briangonzalez/jquery.adaptive-backgrounds.js) and others such as color thief (http://lokeshdhakar.com/projects/color-thief/) do. The only problem is that both of them use canvas with images. But just as derdida, I don't think it is possible without using canvas... Can you give us an example of using this on an object instead of an image? A few use cases in html?
type: Comment

http://stackoverflow.com/comment/39304389
has text: Hmm thanks @cookiemonster, your are right, but It is supporting for string also
type: Comment
comment on: http://stackoverflow.com/a/25231054
score: 0
type: AnswerComment

http://stackoverflow.com/q/25237286
has answer: http://stackoverflow.com/a/38016129
has body: So I am making a website for radio streams and was told I should use Jquery and AJAX to load the HTML files into a div on button click so that I wouldn't have to make the user load a completely new HTML page for each radio stream. But I am a bit lost since I am new to this language and I am not entirely sure what I am doing wrong. Currently I have a index.html page that loads each individual div and loads all the available radio stations in an iframe linking to an HTML file. In this HTML file there are around 40 buttons that each have to link to their own radio stream. On a button press I want said stream to load into the 'radio player' div for a smooth transition. After trying to google the problem I was told to do this with the following JavaScript code: $(function(){ $(".538").click(function(){ $("#div3").load("/includes/about-info.html"); }); }); Since each button is also showing its own image file, I tried to add class="538 to each image source so the JavaScript knows what is targeted. Unfortunately it doesn't seem to work at all and I have no clue what to do. I tried to do this in a separate index.js file which unfortunately didn't work, so I tried to use the JavaScript code in the HTML file itself, and this didn't seem to do the trick either. TL/DR: trying to load HTML code in a div when an image button is clicked. Is there perhaps a tutorial for this available? I tried to search the web but couldn't find anything at all. If anyone is able to help me out with this problem I'd love you forever.
type: Question
has comment: http://stackoverflow.com/comment/39315215
has comment: http://stackoverflow.com/comment/63474368
tagged with: javascript
has answer: http://stackoverflow.com/a/25237598
has comment: http://stackoverflow.com/comment/39315362
has title: Can't load HTML code into a div when an image button is clicked
score: 0
linked to: http://stackoverflow.com/q/203198
has comment: http://stackoverflow.com/comment/39318770
tagged with: jquery
has answer: http://stackoverflow.com/a/25237779
tagged with: ajax
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25238873
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/39315193

http://stackoverflow.com/q/25264878
accepted answer: http://stackoverflow.com/a/25285089
tagged with: ajax
answer count: 3
has answer: http://stackoverflow.com/a/25281050
has answer: http://stackoverflow.com/a/25265048
possible better answer: http://stackoverflow.com/a/25265048
has body: I am struggling from past 2 hours . Tried : location.reload(); reset form many features but after i close my popup and when reopen or open some another id ..my previous id data is still seen there and its continuous for all id. style : #overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #000; filter:alpha(opacity=70); -moz-opacity:0.7; -khtml-opacity: 0.7; opacity: 0.7; z-index: 100; display: none; } .content a{ text-decoration: none; } .popup{ width: 100%; margin: 0 auto; display: none; position: fixed; z-index: 101; } .content{ min-width: 800px; width: 900px; min-height: 150px; margin: 0px auto; background: #f3f3f3; position: relative; z-index: 103; padding: 10px; border-radius: 5px; box-shadow: 0 2px 5px #000; } .content p{ clear: both; color: #555555; text-align: justify; } .content p a{ color: #d91900; font-weight: bold; } .content .x{ float: right; height: 35px; left: 22px; position: relative; top: -25px; width: 34px; } .content .x:hover{ cursor: pointer; } Jquery / ajax : Below is my popup box + ajax to fetch and show record under Input field $('#class').on('click delegate mouseenter', 'a', function (e) { var data = dt.row( $(this).parents('tr') ).data(); var valuea = data[1]; $(function(){ e.preventDefault(); var table = $('#class').DataTable(); var overlay = $(' '); $('.close').click(function(){ $('.popup').hide(); overlay.appendTo(document.body).remove(); location.reload(); resetForms(); $("span.ajax_loader").hide(); // success var pathlaser = "server_processing_laser.php"; tablel.clear(); tablel.draw(); tablel.ajax.url(pathlaser).load(); return false; }); $('.xclose').click(function(){ $('.popup').hide(); overlay.appendTo(document.body).remove(); location.reload(); resetForms(); $("span.ajax_loader").hide(); // success var pathlaser = "server_processing_laser.php"; tablel.clear(); tablel.draw(); tablel.ajax.url(pathlaser).load(); return false; }); // POPUP BOX $('.click_'+data[0]+'').click(function(e){e.preventDefault…
tagged with: php
type: AnsweredQuestion
has title: On Popup data fetch is seen twice through ajax : php mysql
score: 0
tagged with: mysql
type: Question
has answer: http://stackoverflow.com/a/25285089
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/26282241
has body: Using bower init, you'll be able to regenerate from scratch your bower.json file with all the current dependencies
type: AcceptedAnswer
downvote count: 0
score: 4
type: Answer
accepted answer of: http://stackoverflow.com/q/25288219
answers question: http://stackoverflow.com/q/25288219
upvote count: 4

http://stackoverflow.com/a/25235012
score: -1
has body: Your callback is in the wrong place. It is not waiting for the insert operation to complete before you return from it's own callback. Altering your code: var insertCountry = function(document, callback) { db.model('Countries').count({code: document.code}, function (err, count) { if (count &lt; 1) { db.collection('Countries').insert(document, function (err, result) { if (!err) { console.log('country ' + document.name + ' added'); } else { console.log('- [' + document.name + '] ' + err); } callback(null,document); }); } }); }; That is part of your problem, but it does not completely solve it. The other part is the loop which also does not wait for the wrapping function to complete before moving on. You want something like asyc.eachSeries in order to wait for inserts to complete before performing the next iteration. This is mostly why you are exceeding the call stack: async.eachSeries( countries, function(current,callback) { // make your nCountry object insertCountry(nCountry,function(err,value) { // do something, then callback(err); }) }, function(err) { // called where done, err contains err where set console.log( "done" ); } ); There is really still and issue with the array, which must be reasonably large if you are exceeding the call stack limit. You probably should look at using event streams to process that rather that load everything in memory to the array. Personally, if you were just trying not to insert duplicates for a field and had MongoDB 2.6 available I would just use the Bulk Operations API with "unordered operations" and allow non fatal failures on the duplicate keys. Coupled with the fact that bulk operations are sent in "batches" and not one at a time, this is much more efficient than checking for the presence on every request: var Country = mongoose.Schema({ name: String, code: { type: String, unique: true }, // define a unique index extra: [Extra] }); var insertCountries = function(countries,callback) { var bulk = Country.collection.initializeUnorde…
downvote count: 1
has comment: http://stackoverflow.com/comment/39339771
type: Answer
upvote count: 0
answers question: http://stackoverflow.com/q/25233514

http://stackoverflow.com/a/35231820
has body: tileSources: url, ajaxWithCredentials : true,
type: Answer
answers question: http://stackoverflow.com/q/25290960
has comment: http://stackoverflow.com/comment/58178887
score: 0

http://stackoverflow.com/a/25380955
answers question: http://stackoverflow.com/q/25380862
type: Answer
upvote count: 2
score: 2
has body: Wit odd / even (I don't see what is wrong with it) $(".myTable tr.dtal:odd").css({"background-color": "#505050"}); $(".myTable tr.dtal:even").css({"background-color": "#2a2a2a"}); Otherwise $(".myTable tr.dtal").each(function (idx, domEl) { // iterate over the matched set var color = idx%2 ? "#505050":"#2a2a2a"; // if idx is odd: "#505050" otherwise "#2a2a2a" $(domEl).css({ // apply the css "background-color": color }); }); See the documentation on .each
accepted answer of: http://stackoverflow.com/q/25380862
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/30491002
answers question: http://stackoverflow.com/q/25354288
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25354288
score: 1
type: AcceptedAnswer
downvote count: 0
has body: Google maps ads an inline style of transform: translateZ(0px); to your map container via javascript (which as far as I can tell does nothing whatsoever). Overriding it with transform: inherit !important; in my stylesheet fixed this for me.

http://stackoverflow.com/q/25239350
tagged with: click
score: 0
has answer: http://stackoverflow.com/a/25239460
answer count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/39318913
type: AnsweredQuestion
has title: Disable Links in this jquery code
type: Question
tagged with: function
accepted answer: http://stackoverflow.com/a/25239460
tagged with: javascript
tagged with: jquery
has body: I'm a total noob in Javascript and trying o disable a link in the following code. It's the .title_link_out. Whenever i click the div that has this class, the homepage loads (href="#"). I want to disable the link without renaming the class or having the function destroyed. I hope somebody can help without further information. This is just the code snippet that is responsible for the link. Any idea when seeing this code? jQuery(document).ready(function(e) { e(".squareDemo_production").unbind("hover"); e(".squareDemo_production").hover(function() { e(this).find('.squareLitDemo.shape').css('cursor', 'pointer'); e(this).find('.squareLitDemo.shape').on('click', function() { console.log('ff', e(this).find('.title_link_out').attr('target')) if (e(this).find('.title_link_out').attr('target') == 'blank') { var win = window.open(e(this).find('.title_link_out').attr('href'), '_blank'); win.focus(); } else{ window.location.href = e(this).find('.title_link_out').attr('href'); } }) I tried the following in CSS, but it didn't work. .title_link_out { pointer-events: none!important; cursor: default!important; }

http://stackoverflow.com/comment/39596560
comment on: http://stackoverflow.com/q/25388931
type: QuestionComment
type: Comment
score: 1
has text: Sure... I have never use jsfiddle but give me a couples of minutes I'll post back

http://stackoverflow.com/q/25282656
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39398931
upvote count: 1
tagged with: node.js
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39399962
has comment: http://stackoverflow.com/comment/39400112
downvote count: 0
tagged with: javascript
has body: I have an express.js intra-net app running on linux, serving windows-domain users inside the company. I need to get in server-code the name of the logged-in user on the machine where the browser-request has originated from. On ASP.NET I write: System.Security.Principal.WindowsIdentity.GetCurrent().Name Is there any such node.js equivalent?
tagged with: linux
has title: Getting WindowsIdentity in a linux-based node.js express-app
favorite count: 0

http://stackoverflow.com/q/25254357
has answer: http://stackoverflow.com/a/32788207
possible better answer: http://stackoverflow.com/a/25347120
tagged with: asynchronous
favorite count: 0
has body: I have an Express route defined as follows (where app is my Express app): module.exports = function(app) { var controller = require('../../app/controllers/experiment-schema'); app.route('/api/experiment-schemas/random').get(controller.random); }; In that 'controller' file, I have this method: exports.random = function (req, res, callback) { ExperimentSchema.count({}, function (err, count) { var rand = Math.floor(Math.random() * count); ExperimentSchema.find({}) .skip(rand) .limit(1) .populate('mediaPool', 'artist title label') .exec(function (err, schema) { res.json(200, schema); if (typeof callback === 'function') { callback(); } }); }); } Here, ExperimentSchema is a Mongoose model. Since the controller method hits the database, I'm passing in a callback in my test so that I can wait for those database calls to return and verify the return value. I'm doing this based on this question. When I go to test the route, I'm testing with supertest, actually making the HTTP call to the route. The problem is that when I do this, Express is injecting next as the third argument to my random method. Now, callback() aliases next(), and everything goes haywire. How can I test my route and my controller seperately?
accepted answer: http://stackoverflow.com/a/32788207
has title: How to test an ExpressJS route and 'controller' separately
tagged with: node.js
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/21352159
tagged with: unit-testing
type: Question
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/25347120
tagged with: express
upvote count: 4
answer count: 2
downvote count: 0

http://stackoverflow.com/q/25319862
accepted answer: http://stackoverflow.com/a/25320180
type: Question
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25320180
tagged with: plugins
has title: jQuery: Making a Plugin Wait Until Existing Calls Are Done To Execute?
has body: I should begin by saying that, while I'm pretty familiar with basic JavaScript/jQuery, I'm by no means an expert. So this could be a simple concept I'm not grasping. At any rate, I'll explain my situation as best I can. I have been piecing together a jQuery plugin that takes a string and displays it one character at a time until the end of the string has been reached. Each call starts and stops on an interval as needed until done: $.fn.writeText = function(content) { var elem = this; var contentArray = content.split(""); return this.each(function() { var current = 0; var length = contentArray.length; intervalText(); function intervalText(){ var interval = setInterval(function(){ if(current &lt; length){ //If end punctuation is detected [omitted for simplicity's sake] { elem.text(elem.text() + contentArray[current++],play('tes.wav')); clearInterval(interval); setTimeout(function(){intervalText();},500); } //Else if 'pause' punctuation is detected. { elem.text(elem.text() + contentArray[current++],play('tes.wav')); clearInterval(interval); setTimeout(function (){intervalText();},200); } else{ elem.text(elem.text() + contentArray[current++],play('tes.wav')); } } else if(current == length+1){ clearInterval(interval); } }, 50); } }); } One thing I've noticed is that using the plugin back to back causes problems: $("#promptText").writeText("This test."); $("#promptText").writeText("This is also a test."); //Results in "TThhiiss tiess ta.lso a test." I determined pretty quickly that the issue is just that characters are being added to the same element, and that the plugin isn't doing anything "wrong." But, as you can imagine I'd like to prevent this from happening. In order to do that, I'd need to cause any secondary calls to the plugin to wait until the previous ones were finished. Any suggestions as to how I'd go about this?
type: AnsweredQuestion

http://stackoverflow.com/comment/39401018
comment on: http://stackoverflow.com/a/25283785
type: Comment
score: 0
type: AnswerComment
has text: You're right, forgot about this. First of all we checking that this is Number and only then check other.

http://stackoverflow.com/a/25284504
answers question: http://stackoverflow.com/q/25283964
has body: $(".gradient_menuitem:gt(9)").css("display","none"); $(".gradient_menuitem:eq(9)").click ( function (e) { e.preventDefault(); $(".gradient_menuitem:gt(9)").css("display","block"); $(".gradient_menuitem:eq(9)").hide(); }); $(".gradient_menu").mouseleave(function(){ $(".gradient_menuitem:gt(9)").hide(); $(".gradient_menuitem:eq(9)").show(); }); Use this jQuery, it works fine for me. Here is a Fiddle DEMO
score: 0
type: Answer

http://stackoverflow.com/comment/39610518
score: 0
type: AnswerComment
has text: subramaniam v, can we keep in touch as I'm very glad to come across an Indian female programmer!
type: Comment
comment on: http://stackoverflow.com/a/25377837

http://stackoverflow.com/q/25304641
type: Question
accepted answer: http://stackoverflow.com/a/25304733
has title: django template: dynamic variable name in javascript
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25304733
tagged with: django
tagged with: python
type: AnsweredQuestion
has body: In my javascript i want something like this SomeFunction(attribute){ var prev_rating = {{ u_list.attribute }}; } The function can have three different inputs... beauty, wealth, age . So if I pass attribute = beauty to the function, var prev_rating should be set to var prev_rating = {{ u_list.beauty }}; How can I achieve this ?

http://stackoverflow.com/a/25362236
has body: Here I am going to give the partial solution. Look at the javascript validation and demo fiddle. function audience_details() { var temp = document.getElementById("audience_1_field").value; var temp1 = document.getElementById("audience_2_field").value; var temp2 = document.getElementById("reach_field").value; if(temp == "" || temp == null) { alert("please enter Audience 1 value"); } else if(temp1 == "" || temp1 == null) { alert("please enter Audience 2 value"); } else if(temp2 == "" || temp2 == null) { alert("please enter Total Reach value"); } else { var aud1, aud2, total; var aud1 = parseInt(document.getElementById("audience_1_field").value); var aud2 = parseInt(document.getElementById("audience_2_field").value); var reach = parseInt(document.getElementById("reach_field").value); var total = (((aud1 + aud2) - reach ) / aud1) * 100 ; total_field = parseFloat(total).toFixed(2) + '%'; estimate = parseFloat(total).toFixed(2) + '%'; document.getElementById("total_field").value = total_field; } } SAMPLE DEMO As I told above partial solution, Because I didn't add the numeric value validation in my solution. At present it will check whether they enter the value or not. If not it will through alert message. You try yourself for the numeric value validation.
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25361874
has comment: http://stackoverflow.com/comment/39548005
score: 1

file
type: Tag
tags question: http://stackoverflow.com/q/25325663
tags question: http://stackoverflow.com/q/25292327
tag name: file
tags question: http://stackoverflow.com/q/25317524
tags question: http://stackoverflow.com/q/25239269
tags question: http://stackoverflow.com/q/25352662
tags question: http://stackoverflow.com/q/25234269
tags question: http://stackoverflow.com/q/25244876

http://stackoverflow.com/comment/39387718
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25276357
has text: The point of promises / deferreds is to encapsulate work in a function. If you don't have any work to do, they're useless.
score: 3

http://stackoverflow.com/q/25286239
tagged with: javascript
has answer: http://stackoverflow.com/a/25286541
has body: I've tried other questions on SO but they don't seem to provide a solution to my problem: I have the following simplified Validate function function Validate() { var pattern = new RegExp("([^\d])\d{10}([^\d])"); if (pattern.test(document.getElementById('PersonIdentifier').value)) { return true; } else { return false; } } I've tested to see if the value is retrieved properly which it is. But it doesn't match exactly 10 digits. I don't want any more or less. only accept 10 digits otherwise return false. I can't get it to work. Have tried to tweak the pattern in several ways, but can't get it right. Maybe the problem is elsewhere? I've had success with the following in C#: Regex pattern = new Regex(@"(?&lt;!\d)\d{10}(?!\d)") Examples of what is acceptable: 0123456789 ,1478589654 ,1425366989 Not acceptable: a123456789 ,123456789a ,a12345678a
favorite count: 0
accepted answer: http://stackoverflow.com/a/25286330
has comment: http://stackoverflow.com/comment/39405595
tagged with: regex
linked to: http://stackoverflow.com/q/22937618
downvote count: 1
linked to: http://stackoverflow.com/q/6298566
type: Question
has title: Matching exactly 10 digits in Javascript
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25286342
has answer: http://stackoverflow.com/a/25286330
has answer: http://stackoverflow.com/a/25286342
has comment: http://stackoverflow.com/comment/39405773
duplicate of: http://stackoverflow.com/q/6298566
has comment: http://stackoverflow.com/comment/39405753
has comment: http://stackoverflow.com/comment/39405699
upvote count: 26
score: 25
answer count: 3

http://stackoverflow.com/comment/39593937
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25387022
has text: Currently my `.onHistoryStateUpdated()` method looks like this for injecting the content script: http://jsfiddle.net/uu4tbnrw/ I'm not a Javascript developer by any means, and after some googling I'm not sure what would be the best way to delay the injection. What is the best practice for doing that?

http://stackoverflow.com/comment/39356829
comment on: http://stackoverflow.com/a/25252361
type: AnswerComment
has text: OK I have fixed the code and updated my answer. Sorry it was late! It will now restart. When we clear the Interval we must set tmr to undefined.(see updated code and fiddle) Thus when they click again !tmr === undefined and the rollover restarts. I think this answers your question why it was 2.
score: 0
type: Comment

http://stackoverflow.com/q/25361032
answer count: 2
has comment: http://stackoverflow.com/comment/39543402
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39543477
favorite count: 0
accepted answer: http://stackoverflow.com/a/25361261
tagged with: angularjs
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25361677
upvote count: 2
has answer: http://stackoverflow.com/a/25361677
has title: Convert special chars to HTML
type: Question
has comment: http://stackoverflow.com/comment/39544621
has answer: http://stackoverflow.com/a/25361261
tagged with: javascript
has body: $scope.html = '&amp;lt;script&amp;gt;'; I know that PHP has the ability to convert &amp;lt;script&amp;gt; to &lt;script&gt; but can Javascript do the same?

http://stackoverflow.com/comment/39479677
type: Comment
has text: @GavinWood It doesn't count the characters within the name either. *It is rubbish as it is written* - no wonder why it is confusing.
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25325824

http://stackoverflow.com/comment/39306662
has text: You might also like to look at Bootstrap CSS http://getbootstrap.com/css/#grid-example-mixed
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25231533

laravel
tags question: http://stackoverflow.com/q/25243701
tags question: http://stackoverflow.com/q/25268202
tags question: http://stackoverflow.com/q/25279695
tags question: http://stackoverflow.com/q/25317572
tags question: http://stackoverflow.com/q/25320016
tags question: http://stackoverflow.com/q/25266557
tag name: laravel
tags question: http://stackoverflow.com/q/25316399
tags question: http://stackoverflow.com/q/25312766
type: Tag
tags question: http://stackoverflow.com/q/25285987

http://stackoverflow.com/a/25257177
downvote count: 0
answers question: http://stackoverflow.com/q/25256963
score: 1
upvote count: 1
has body: You can embed vanilla javascript in your coffeescript by using backticks. http://coffeescript.org/#embedded
type: Answer

http://stackoverflow.com/q/25278215
has answer: http://stackoverflow.com/a/45958157
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25278714
tagged with: jquery
has title: Possible way to load and Print PDF on button Click using javascript
type: UnansweredQuestion
has body: Could you please tell me the possible way to load and print pdf file that should work in all browers. Currently I am using iframe to show the file and then triggering print method but it's not working in IE.I searched a lot but none of the solution works.Please let me know any alternative approach to do this. Below is my sample code:- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="pdfpoc.aspx.cs" Inherits="Game.pdfpoc" %> Its not the part of Iframè IFRAME PDF:
has comment: http://stackoverflow.com/comment/39391252
tagged with: iframe
type: Question
tagged with: javascript

http://stackoverflow.com/q/25312492
type: Question
has answer: http://stackoverflow.com/a/25312726
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25312752
possible better answer: http://stackoverflow.com/a/25312726
answer count: 2
upvote count: 1
tagged with: forms
has body: Target functionality is to expand AND collapse the form field by clicking on the image as seen in the fiddle (http://jsfiddle.net/phamousphil/4jw42kza/). Currently I have expand working using .animate(), however after much fiddling I can't find a way to collapse. My question is twofold: 1. How can I implement the opposite animation to collapse the form when clicking on the image? 2. (bonus) How can I use .animate() to leverage CSS visibility to fully hide the form when collapsed? My attempt to implement this failed. Code below: HTML: &lt;input class='header-search-box' type='text' id='search-string' name='search-string'&gt; &lt;img src=' http://findicons.com/files/icons/974/glyphish/18/magnifying_glass.png' class='magnifying-glass' /&gt; CSS: .header-search-box { } .header-search-box { width: 0px; } .magnifying-glass { } JavaScript: $(function(){ var mglass = $('.magnifying-glass'); var form = $('.header-search-box'); mglass.click(function(){ form.animate({'width': '100px'}, 'slow'); }); });
tagged with: jquery-animate
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
score: 1
tagged with: jquery
has title: jQuery How to Expand AND Collapse Form Field
favorite count: 0
has answer: http://stackoverflow.com/a/25312752

http://stackoverflow.com/comment/39777535
type: QuestionComment
has text: What is working? Your question code? I think I found something interesting in the code of the plugin, but cannot test right now. In the C# code, it is checking `if (filePath.IndexOf("www") == 0)` and if not, return the error you got...
comment on: http://stackoverflow.com/q/25387644
score: 0
type: Comment

http://stackoverflow.com/comment/39579968
has text: shame on me! i thought that wouldn‘t work. maybe because i didn‘t heed the order. but i wonder if there is an even shorter way do do this.
type: Comment
comment on: http://stackoverflow.com/a/25380181
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39465095
score: 0
type: Comment
has text: you should make the screen a background image.
comment on: http://stackoverflow.com/a/25317773
type: AnswerComment

http://stackoverflow.com/comment/39410815
comment on: http://stackoverflow.com/q/25288663
score: 0
type: Comment
type: QuestionComment
has text: Good question. As far as I know, the Browser will always render the inline Styles first. Then Header Styles, then External. So basically header css overrides external css, and inline css overrides header css.

http://stackoverflow.com/a/25316986
score: 2
accepted answer of: http://stackoverflow.com/q/25316902
answers question: http://stackoverflow.com/q/25316902
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/44214699
type: Answer
has comment: http://stackoverflow.com/comment/39483393
upvote count: 2
has comment: http://stackoverflow.com/comment/39463343
has body: Assuming outlook is installed, perhaps the better way is to serve a .msg file as a 'template' on the server. Upon clicking the link, the users native system SHOULD, if outlook is the default mail client, open it as a new message. I guess that depends on how dynamic the email actually needs to be though. Otherwise, yes, activeX is a MS construct only. It's basically the reason why ie is so insecure, because you can do things like this. There is a plugin available, but that might be a bit much to ask your users to install something to send an email https://chrome.google.com/webstore/detail/activex-for-chrome/lgllffgicojgllpmdbemgglaponefajn

http://stackoverflow.com/a/25327769
has comment: http://stackoverflow.com/comment/39485496
has body: $(document).ready(function($) { Not returning function so you should remove })(jQuery) And replace to }); Also there is no need to pass $ to ready handler and you can simplify it from: $(document).ready(function($) { To $( function() {
score: 3
has comment: http://stackoverflow.com/comment/39484538
has comment: http://stackoverflow.com/comment/39486767
has comment: http://stackoverflow.com/comment/39484406
has comment: http://stackoverflow.com/comment/39486809
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39486156
has comment: http://stackoverflow.com/comment/39486070
has comment: http://stackoverflow.com/comment/39485438
answers question: http://stackoverflow.com/q/25327735
has comment: http://stackoverflow.com/comment/39484173
upvote count: 3
has comment: http://stackoverflow.com/comment/39485929
has comment: http://stackoverflow.com/comment/39486325

http://stackoverflow.com/q/25263076
has comment: http://stackoverflow.com/comment/39363079
type: UnansweredQuestion
has body: I was wondering if there is possible a JavaScript function which will return the previous page's URL in any browser. I have read previous questions and answers about: document.referrer; But I believe it does not work in Internet Explorer. Is there another function that I could use? I need it to be able to work in all browsers and I need to be able to access the URL to pass it to a function. Thanks
tagged with: referrer
type: Question
has title: How to get the previous pages URL in ALL browsers using JavaScript
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/39362983
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25264251
has answer: http://stackoverflow.com/a/25263239
tagged with: url
tagged with: javascript

http://stackoverflow.com/comment/39499321
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25335962
has text: Better hope one of the words isn't `" "`.

http://stackoverflow.com/comment/39494583
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25333130
has text: Definitely, didn't know about semicolons at the end of anonymous functions so I appreciate that! You're also right about row being a parameter that was causing the issue, I had a feeling it might have been that but tried to fix it in the wrong way.
type: AnswerComment

http://stackoverflow.com/a/25335962
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/39499340
answers question: http://stackoverflow.com/q/25335944
has body: wordarray.forEach(function(entry) { $("#mywords").append('&lt;span&gt;' + entry + '&lt;/span&gt;'); }); If you can't delete the spans for any reason: $('#mywords').find('span').each(function(i, el) { $(el).html(wordarray[i]); }); ID selector append
score: 3
has comment: http://stackoverflow.com/comment/39499321
downvote count: 0

http://stackoverflow.com/a/25278879
upvote count: 0
score: -1
has body: Use onFocus and onBlur property(Colar remain red after pressing). This is JavaScript function. Regards,
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/25278728

http://stackoverflow.com/comment/39450310
type: Comment
type: QuestionComment
has text: I would only care for IE. See this http://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx
comment on: http://stackoverflow.com/q/25310008
score: 0

http://stackoverflow.com/a/25297342
score: 1
has comment: http://stackoverflow.com/comment/39427372
answers question: http://stackoverflow.com/q/25297302
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25297302
downvote count: 0
has body: Just add a if (typeof obj[key] != "string") continue; test to your loop: … social: function(obj) { var output = " "; var myList = document.querySelectorAll('.socialSpot'); for (var key in obj) { if (typeof this[key] != "string") continue; output += ' '; } output += ' '; for (var i = myList.length - 1; i >= 0; i--) { myList[i].innerHTML = output; }; } Of course, simply using another object would be so much cleaner: var socialMedia = { data: { facebook: "http://facebook.com", twitter: "http://twitter.com", instagram: "http://instagram.com", dribbble: "http://dribbble.com" }, social: function(obj) { var data = obj || this.data; var output = " "; for (var key in data) { output += ' '; } output += ' '; var myList = document.querySelectorAll('.socialSpot'); for (var i = myList.length - 1; i >= 0; i--) { myList[i].innerHTML = output; }; } }; var theBtn = document.getElementById('btn'); theBtn.addEventListener('click', function() { socialMedia.social(); }, false);
type: Answer
upvote count: 1

http://stackoverflow.com/comment/39503463
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25322426
has text: http://jsfiddle.net/wYfs4/15/ <- jsfiddle - one more question, probably an easy answer: if you put console.log(w); in the function $scope.getOptionsFor, you'll notice each object gets logged 3 different times. It seems like doing a console log in any of the functions in this app will loop 3 times... why is this?

http://stackoverflow.com/comment/39434719
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25301627
has text: where have you specified that you want to call PostData method?

http://stackoverflow.com/comment/39595977
has text: A jsfiddle would help
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25388654

http://stackoverflow.com/comment/39484830
type: Comment
has text: Just saw it now that I wrote in SASS style, sorry for that, I was busy. Glad I could be of help. Cheers :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25286032

http://stackoverflow.com/comment/39329664
score: 0
type: AnswerComment
type: Comment
has text: Perfect! Works like a charm!
comment on: http://stackoverflow.com/a/25234438

http://stackoverflow.com/a/25263786
type: Answer
upvote count: 0
has body: Ctrl+F5 in your browser to refresh the page will force it to get your new JS file.
answers question: http://stackoverflow.com/q/25263682
score: -1
downvote count: 1

http://stackoverflow.com/comment/39302116
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25230752
score: 0
has text: I did so and this is the reaction: Error: [ng:areq] Argument 'menuController' is not a function, got undefined

typeahead.js
tags question: http://stackoverflow.com/q/25291822
tags question: http://stackoverflow.com/q/25336597
tags question: http://stackoverflow.com/q/25350155
tags question: http://stackoverflow.com/q/25257996
tags question: http://stackoverflow.com/q/25306141
tag name: typeahead.js
tags question: http://stackoverflow.com/q/25362421
tags question: http://stackoverflow.com/q/25255821
type: Tag

http://stackoverflow.com/comment/39307142
score: 0
has text: The point of asking is so that I can participate in the discussion because I do not have enough reputation to participate in other posts. The reputation system makes absolutely no sense especially if you're going to flag all my posts. You should consider removing the reputation requirement for commenting. @markE
type: Comment
comment on: http://stackoverflow.com/q/25232684
type: QuestionComment

http://stackoverflow.com/q/25285717
answer count: 5
has answer: http://stackoverflow.com/a/25285773
has comment: http://stackoverflow.com/comment/39404673
has comment: http://stackoverflow.com/comment/43231493
has answer: http://stackoverflow.com/a/25285776
possible better answer: http://stackoverflow.com/a/25285776
has answer: http://stackoverflow.com/a/25285930
linked to: http://stackoverflow.com/q/881515
linked to: http://stackoverflow.com/q/387707
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25285793
tagged with: oop
accepted answer: http://stackoverflow.com/a/25285773
has comment: http://stackoverflow.com/comment/39404616
upvote count: 4
has answer: http://stackoverflow.com/a/27391879
has body: Refer to https://stackoverflow.com/a/387733/418439, // Define a class like this function Person(name, gender){ // Add object properties like this this.name = name; this.gender = gender; } // Add methods like this. All Person objects will be able to invoke this Person.prototype.speak = function(){ alert("Howdy, my name is" + this.name); } // Instantiate new objects with 'new' var person = new Person("Bob", "M"); // Invoke methods like this person.speak(); // alerts "Howdy, my name is Bob" How to define namespace as well?
has title: Define a class with namespace in Javascript
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
tagged with: javascript-namespaces

http://stackoverflow.com/a/25295038
type: Answer
has comment: http://stackoverflow.com/comment/39422622
has body: Do those values need to be in the form? Could you include the data in a different way, perhaps by defining a custom submit function that sends along those generated values with the data the user inputs? Seems to me like an unnecessary workaround. What does the server expect? Is it a regular HTTP POST, or is it an API call that expects a JSON object? In the latter case, it would be trivial to add extra values after the form was submitted. It's also best practice to name your form, and then validate the data. That would look something like this: &lt;form name="myForm" ng-submit="myForm.$valid &amp;&amp; submit()"&gt; Please provide more information to make it easier for us to answer your question. As it stands, I think having those fields in hidden inputs is not necessary.
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25294877
downvote count: 0

http://stackoverflow.com/comment/39497134
comment on: http://stackoverflow.com/a/25333512
score: 0
type: AnswerComment
type: Comment
has text: Good point - a nice solution, although it does create a new array. Thanks Bradley!

http://stackoverflow.com/a/25281766
type: Answer
downvote count: 1
upvote count: 0
answers question: http://stackoverflow.com/q/25281519
score: -1
has body: You can use the jquery plugin and to ease your work on javascript end. Use the div class value to show or hide the div. $('.hide').hide(); //this will hide all the div with class name "hide" $('.hide').show(); //this will show all the div with class name "hide" $('.hide').toggel(); //this will toggel the div visibility for all the div with class name "hide" There is a good article on this which cover all these stuff http://www.randomsnippets.com/2011/04/10/how-to-hide-show-or-toggle-your-div-with-jquery/.

http://stackoverflow.com/q/25322613
favorite count: 0
has answer: http://stackoverflow.com/a/25322706
type: UnansweredQuestion
has title: jquery text() compare to string
score: 2
has body: How to compare strings to jquery text()? I've tried this one but it will not work. var str = 'hello'; var string = $(this).find("text").trim(); if(str == string) { string.css("visibility", "visible"); } What's wrong with my code? Any idea please? thank you
has answer: http://stackoverflow.com/a/25322677
type: Question
has answer: http://stackoverflow.com/a/25322722
has comment: http://stackoverflow.com/comment/39473562
tagged with: javascript
has comment: http://stackoverflow.com/comment/67345702
upvote count: 3
answer count: 3
downvote count: 1
has comment: http://stackoverflow.com/comment/39473586
tagged with: jquery

http://stackoverflow.com/q/25260674
downvote count: 0
tagged with: jenkins
type: UnansweredQuestion
score: 1
tagged with: java
has body: After upgrading sonar from 3.4 to 4.3.2 version, we are getting java script parsing error during jenkins nightly build. It was all working fine in last version.The sonar runner is still of version 2. COuld you please advice on resolving this error. The plugin used is sonar-javascript-plugin-1.6, sonar-squid-java-plugin-1.6. Error details: [INFO] [12:56:47.163] Sensor JavaScriptSquidSensor... [INFO] [12:56:47.275] 98 source files to be analyzed [INFO] [12:56:57.330] 10/98 files analyzed, current is /var/lib/jenkins/jobs/Nightly_Build_abc_CAD_src/workspace/abc_CAD_src/src/main/webapp/auth/js/lib/angular/jquery-ui-1.9.0.custom.js [ERROR] [12:57:01.429] Unable to parse file: /var/lib/jenkins/jobs/Nightly_Build_abc_CAD_src/workspace/abc_CAD_src/src/main/webapp/js/lib/csrfguard.js com.sonar.sslr.api.RecognitionException: Parse error at line 199 column 13 failed to match all of: spacing IDENTIFIER NULL TRUE FALSE NUMERIC_LITERAL stringLiteral REGULAR_EXPRESSION_LITERAL LBRACKET LCURLYBRACE LPARENTHESIS FUNCTION NEW THIS IDENTIFIER NULL TRUE FALSE NUMERIC_LITERAL stringLiteral REGULAR_EXPRESSION_LITERAL LBRACKET LCURLYBRACE LPARENTHESIS FUNCTION NEW NEW THIS IDENTIFIER NULL TRUE FALSE NUMERIC_LITERAL stringLiteral REGULAR_EXPRESSION_LITERAL LBRACKET LCURLYBRACE LPARENTHESIS FUNCTION NEW THIS IDENTIFIER NULL TRUE FALSE NUMERIC_LITERAL stringLiteral REGULAR_EXPRESSION_LITERAL LBRACKET LCURLYBRACE LPARENTHESIS FUNCTION NEW NEW DELETE VOID TYPEOF INC DEC PLUS MINUS TILDA BANG
type: Question
has comment: http://stackoverflow.com/comment/39364719
tagged with: javascript
has comment: http://stackoverflow.com/comment/39434945
tagged with: sonarqube
has title: java script parsing error during jenkins nightly build. after upgrading sonar to 4.3.2
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39366609
has comment: http://stackoverflow.com/comment/39398223
favorite count: 0
has answer: http://stackoverflow.com/a/25313303
tagged with: maven
has comment: http://stackoverflow.com/comment/39368401

http://stackoverflow.com/q/25388813
answer count: 1
downvote count: 0
favorite count: 0
upvote count: 2
score: 2
type: AnsweredQuestion
has title: jQuery Autocomplete for a JSON
has answer: http://stackoverflow.com/a/25389038
has body: My JSON is like this var data = [{"code":"1162","format":"Subscription","name":"Picture Manager ","action":"202"}, {"code" : "1094","format":"Store","name":"Listing Designer","action":"168"}, {"code" : "1407","format":"Subscription","name":"MOTOR_PACKAGE","action":"403"}, {"code" : "1024","format":"Fixed Price","Name":"Picture","action":"120"}, {"code" : "1051","format":"Auction","name":"Gallery Days","action":"49"}, {"code" : "5059","format":"Lead Generation","name":"Scheduled Listings","action":"160"}]; I am able to create a suggest function like jQuery $(document).ready(function(){ serverurl = "getJson"; $.getJSON( serverurl, function(data) { $("#feeCode").autocomplete({ source: function (request, response) { response($.map(data, function(v,i){ return { label: v.format+' / '+v.name+' ('+v.code+')' , value: v.format+' / '+v.name+' ('+v.code+')' }; })); } }); }); }); HTML &lt;input class="catinputbox" type="text" id="feeCode" &gt; It will show the suggestion like this Auction / Gallery Days (1051) Fixed Price / Picture (1024) But it is not searching the pattern the suggestions are static. I want to search and give the appropriate suggestion for the string he is providing. Like if he types "Fixed" the suggestion should be "Fixed Price / Picture (1024)" or if he types "Days" or "1051" then "Auction / Gallery Days (1051)". I have never used the autocomplete before so if any one can explain me autocomplete, request, response and search. That will be very helpful for me
type: Question
tagged with: jquery-ui-autocomplete
tagged with: jquery-ui
tagged with: autocomplete
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/35860753
accepted answer: http://stackoverflow.com/a/25389038

http://stackoverflow.com/q/25233969
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25233987
accepted answer: http://stackoverflow.com/a/25233987
has body: So, for parseInt('10152547376283911', 10) I'm expecting 10152547376283911, but I'm getting 10152547376283912. What I'm doing wrong?
duplicate of: http://stackoverflow.com/q/307179
type: AnsweredQuestion
score: 1
linked to: http://stackoverflow.com/q/3072307
upvote count: 1
type: Question
has title: JavaScript parseInt is giving me wrong number, what I'm doing wrong?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39308860
tagged with: parseint

http://stackoverflow.com/comment/39463388
comment on: http://stackoverflow.com/q/25317012
type: Comment
type: QuestionComment
score: 0
has text: @dave This doesn't explain why it doesn't happen during DST of 2014.

http://stackoverflow.com/a/25333691
answers question: http://stackoverflow.com/q/25330571
type: Answer
has body: Here is a great blog article that should answer your question: http://www.thebhwgroup.com/blog/2014/08/designing-html-forms-angularjs-part-1/ In particular, check out part 3 "Validation Messages and Styling". From the article, Max length 20 Where the ng-form is named contactForm and the element in question is named firstName. This puts the form on the scope and you can then traverse that to get the errors, and show an error message specifically for each error.
score: 0

http://stackoverflow.com/a/25328833
accepted answer of: http://stackoverflow.com/q/25328766
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39486176
has comment: http://stackoverflow.com/comment/39486261
has comment: http://stackoverflow.com/comment/39485849
has comment: http://stackoverflow.com/comment/39485794
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/25328766
score: 4
has body: Yes, there are good way to do this [app.js] var routes = require('./routes/routes')(app); [routes/routes.js] var user = require('./user'); // get user controllers module.exports = function(app) { app.get('/', function() { ... }); app.get('/another-path', function() { ... }); app.get('/user/:id', user.display); app.post('/user/:id', user.update); }; [routes/user.js] module.exports.display = function(req, res) { ... res.render('user', data); } module.exports.update = function(req, res) { ... res.render('user', data); }

http://stackoverflow.com/q/25321142
has title: jquery ajax have error
tagged with: javascript
has body: var send = {ff_ID:"",ff_k:""}; send.ff_ID = $(this).attr("id"); send.ff_k = $(this).find("span").text(); $.ajax({ type: "POST", url: "/funfact_ajax", cache:true, dataType:"json", data:send, success: function(data){ if(data.success == true){ $(this).text(eval(send.ff_k)+1); }else{ alert(data.msg); } } }); problem is this line "$(this).text(eval(send.ff_k)+1);" if i use it outside ajax , it's no problem at all .. $(this).text("damn"); have the same error .. here is error : [Error] TypeError: undefined is not an object (evaluating 'a.createDocumentFragment') db (jquery-1.11.1.min.js, line 3) buildFragment (jquery-1.11.1.min.js, line 3) domManip (jquery-1.11.1.min.js, line 3) append (jquery-1.11.1.min.js, line 3) (anonymous function) (jquery-1.11.1.min.js, line 3) access (jquery-1.11.1.min.js, line 3) text (jquery-1.11.1.min.js, line 3) success (funfact, line 192) j (jquery-1.11.1.min.js, line 2) fireWith (jquery-1.11.1.min.js, line 2) x (jquery-1.11.1.min.js, line 4) b (jquery-1.11.1.min.js, line 4) i have no clue what is the problem , need help , thx !
has comment: http://stackoverflow.com/comment/39471143
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39470921
favorite count: 0
tagged with: ajax
score: -4
has answer: http://stackoverflow.com/a/25321314
accepted answer: http://stackoverflow.com/a/25321314
downvote count: 4
type: AnsweredQuestion
upvote count: 0
type: Question

http://stackoverflow.com/q/25343771
upvote count: 2
type: UnansweredQuestion
has body: I'm trying to use Bloodhound and Typeahead in my Browserify project. I'm using browserify-shim. package.json { ... "browserify": { "transform": ["browserify-shim"] }, "browserify-shim": "./shim.js", } shim.js module.exports = { ... 'typeahead.js/dist/bloodhound': { exports: 'Bloodhound', depends: {jquery: 'jQuery'} } }; test.js ... var Bloodhound = require('typeahead.js/dist/bloodhound'); module.exports = function() { console.log(Bloodhound); } Which outputs an empty object ({}). I've followed everything in this relevant question, using vanilla Browserify from the command line, but still no dice. I was able to get it working by adding module.exports = Bloodhound; to the bloodhound.js file, but this is far from ideal. Shouldn't browserify-shim be adding the exports? I didn't see a module.exports for Bloodhound in the generated bundle.js.
tagged with: browserify-shim
type: Question
score: 2
tagged with: bloodhound
linked to: http://stackoverflow.com/q/23019194
has title: Including Typeahead.js Bloodhound with Browserify gives empty object {}
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/25468077
tagged with: javascript
tagged with: browserify
tagged with: typeahead
favorite count: 0

http://stackoverflow.com/comment/39327333
has text: @user3881476 no worries. glad you got it sorted!
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25242688

http://stackoverflow.com/q/25321346
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39763476
linked to: http://stackoverflow.com/q/10926572
has comment: http://stackoverflow.com/comment/39653790
tagged with: node.js
score: 1
has comment: http://stackoverflow.com/comment/39647508
upvote count: 1
type: Question
tagged with: javascript
tagged with: fabricjs
has comment: http://stackoverflow.com/comment/39684442
answer count: 2
tagged with: canvas
has body: I'm trying to use Fabric js to generate some images with text on it. But for some reason the positioning of the text in the generated image isn't consistent with the one in the canvas. Here's the image as it looks like in the canvas: But the generated image looks like this: The size I gave to the canvas is 881x640 and its the same with the output size I gave to the image. Here's what I'm currently doing in my code. I'm adding the background image into the canvas from the URL. But before I do, I first resize the image to be the same size as the canvas: fabric.Image.fromURL(image_source, function(oImg) { oImg.width = canvas.width; oImg.height = canvas.height; canvas.add(oImg); }); Then I'm sending the stringified result of the canvas.toJSON() call to the node js server to generate the image using AJAX: $.post('http://host:1212', {'canvas': JSON.stringify(canvas.toJSON())}); In the server side I then load the objects and create the image: var out = fs.createWriteStream(__dirname + '/uploads/' + file_name); var body = ''; request.on('data', function(data){ body += data; }); request.on('end', function(){ var request_params = qs.parse(body); //set to same size as the canvas on the client side var canvas = fabric.createCanvasForNode(881, 640); canvas.loadFromJSON(request_params.canvas, function(){ canvas.renderAll(); var stream = canvas.createPNGStream(); stream.on('data', function(chunk){ out.write(chunk); }); stream.on('end', function(){ //close filestream out.end(); }); }); Any ideas where could have I gone wrong?
has answer: http://stackoverflow.com/a/25448088
downvote count: 0
has title: fabric js - objects in generated image have different positioning than the one in the canvas
has comment: http://stackoverflow.com/comment/39659591
favorite count: 0
has answer: http://stackoverflow.com/a/27070035

http://stackoverflow.com/q/25350696
has answer: http://stackoverflow.com/a/25350946
has comment: http://stackoverflow.com/comment/39524642
score: 1
type: Question
has body: I have an image which is always changing position when viewed in chrome and mozilla. When I make it look perfect in chrome it changes position in mozilla while when i make it look perfect for mozilla it changes position for chrome. How can I make image not to change position in different browser. #economy123{ position:absolute; top:67%; left:53%; } &lt;div class="result-temp" &gt; &lt;img id="economy123" src="{{ asset('assets/images/economy123.png') }}" &gt; &lt;p class="t"&gt;&lt;/p&gt;
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39524704
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25350946
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 1
has answer: http://stackoverflow.com/a/25350823
accepted answer: http://stackoverflow.com/a/25350823
has title: Changing position of my image in mozilla and chrome
type: AnsweredQuestion

http://stackoverflow.com/comment/39537483
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25357836
score: 1
has text: so your error handler is getting called?

http://stackoverflow.com/comment/39307908
has text: @RiversO hmmm, that probably means that it fails to execute the code inside the `if` block. I mean maybe `response.hasClass('alert-success')` is false. The key here is to make it execute the `if` block. Can you please check what `response.hasClass('alert-success')` is evaluated to? Just log it in the console.
type: Comment
comment on: http://stackoverflow.com/a/25233392
score: 0
type: AnswerComment

http://stackoverflow.com/a/25344756
type: Answer
accepted answer of: http://stackoverflow.com/q/25336845
has body: something like this var lat = Math.atan2( Math.sqrt( target.x*target.x + target.z*target.z) , target.y) ; var lon = Math.atan2( target.x, target.y); Suggestion: Checkout wikipedia for these functions, i believe the diagram will make perfect sense.
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25336845

http://stackoverflow.com/comment/39504357
comment on: http://stackoverflow.com/q/25338794
has text: Thanks! Maybe you have any additional comments that I need to know?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25240799
type: Answer
upvote count: 1
has body: Most STOMP operations are done using specific headers that are placed in the Message that you send. In this case the 'reply-to' header indicates the address where the receiving client should send its response. So the pattern would be to send the message with the 'reply-to' header set, something like this depending on the library you are using: stomp.subscribe("/temp-queue/response-queue") stomp.publish("/queue/work-queue", "WORK", {"reply-to" =&gt; "/temp-queue/response-queue"}) Since you are using temp Topic you must ensure that there is subscriber prior to the response message being sent, otherwise it will not get all the replies.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25237309

http://stackoverflow.com/q/25374744
duplicate of: http://stackoverflow.com/q/5570017
score: -2
accepted answer: http://stackoverflow.com/a/25374765
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/5570017
has title: Replace "onClick" with "after x seconds"
has body: This will execute funct() only when the user will click. But I want to execute func() automatically after 10 seconds. Somethink like this:
has answer: http://stackoverflow.com/a/25374765
downvote count: 2
tagged with: php
type: Question
type: AnsweredQuestion

http://stackoverflow.com/a/25230677
has comment: http://stackoverflow.com/comment/39302645
accepted answer of: http://stackoverflow.com/q/25230507
has body: CSS &lt;style type="text/css"&gt; .title {visibility:hidden;} &lt;/style&gt; HTML add a class title to all needed DIV elements &lt;div class="title"&gt; some text &lt;/div&gt; Add this to your script $('#slideInner').mouseover(function() { $('#slideInner .title').css('visibility', 'visible'); }); $('#slideInner').mouseout(function() { $('#slideInner .title').css('visibility', 'hidden'); }); Working jsBin
answers question: http://stackoverflow.com/q/25230507
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39302513
score: 1
upvote count: 1

http://stackoverflow.com/comment/39435586
type: QuestionComment
has text: Okay, thats good, but then I dont have a clue I guess. Do you have a link that I can read up on this please.
type: Comment
comment on: http://stackoverflow.com/q/25302113
score: 0

http://stackoverflow.com/comment/39700292
type: AnswerComment
comment on: http://stackoverflow.com/a/25381746
type: Comment
has text: Hi @Captain, Thanks for the solution. Looks to be working. But its still selecting the entire line (example:SUB-TOTAL : $0.11), also it not stopping @ start of the 'SUB-TOTAL' or 'TAX', its including/selecting those words as well.
score: 0

http://stackoverflow.com/comment/39396684
comment on: http://stackoverflow.com/q/25280308
has text: try this link it might help: http://stackoverflow.com/questions/18734957/how-set-end-day-based-on-start-day-in-jquery-mobile-date-picker/18736133#18736133
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39385681
comment on: http://stackoverflow.com/a/25272467
has text: @PrinceSamuel Well, I thought you just needed someone to point you in the right direction. Replace the `console.log` with `alert` and run the fiddle and click on the checkbox, to see if the items are being alerted or not. After that, you have to use those values, and append it to the cart. Use jquery's `append` method to append the item names to the cart, and for the total, you have the value, just add it to the total price. Is it clear? I don't want to do the whole adding thing, you wouldn't learn that way. I'd be happy to guide you further if you don't understand. Thanks!
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/39336051
type: AnswerComment
score: 0
has text: Thanks for the showing me the way. It is working perfectly. However, I have ended in another trouble now. My code is not recognizing hiddenid = $(this).closest('tr').find('.id').val(); now. It gives an undefined value now, whereas it should (and was giving) give an integer value.
type: Comment
comment on: http://stackoverflow.com/a/25247596

http://stackoverflow.com/comment/39372082
type: QuestionComment
has text: Thanks for the comments, I searched and found nothing stating that create meta tags with javascript doesn't work or work, anyone have any article, doc, link, fiddle or anything that talk about it
score: 0
comment on: http://stackoverflow.com/q/25266638
type: Comment

http://stackoverflow.com/comment/39440242
comment on: http://stackoverflow.com/q/25303739
type: Comment
type: QuestionComment
has text: I don't see where `imgtag` is used, but you should use `+=` instead of `=` to keep the result of every iteration.
score: 0

http://stackoverflow.com/comment/39367220
has text: On the initial load of the page, if you have some data binding on the page then apply the knockout binding to only the element that is not partially loaded. Then when you partial load your tab content, call ko.applyBindings(...) on just the partially loaded content, I dont think these should need different names, as long as you have an ID to bind to.
comment on: http://stackoverflow.com/q/25262247
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/57809263
has text: @Jean-FrançoisBeauchef: Not necessarily, I think you need that only when there are instance methods to promisify. It'll promisify the prototype otherwise.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25253537

http://stackoverflow.com/comment/39504869
type: Comment
comment on: http://stackoverflow.com/q/25336970
score: 0
has text: The `angular.js` should be included automatically by a template engine of Express.
type: QuestionComment

http://stackoverflow.com/q/25252518
favorite count: 0
answer count: 4
has answer: http://stackoverflow.com/a/25252594
has answer: http://stackoverflow.com/a/25252610
accepted answer: http://stackoverflow.com/a/25252594
has body: I'm trying to make a simple bot that based on some conditions redirects me to a new URL on the same tab and clicks a button automatically. I have everything working dandy but when I get redirected to this new tab my code disappears and everything is reset. The redirect is all on the same domain. By the way I'm putting this code into the console in Chrome if that helps anything. var a = URL window.location.replace(a) //Redirects to a given URL and clears the console $("input[type='submit']").click() //Doesn't get executed due to console being cleared If there is no "clear cut" way to do this is there anyway I can work around this? If you need anymore information I'll be happy to provide it. Edit: I tried using iframe to solve this but just threw an error which based off some google searches can't be solved. Refused to display 'www.tacos.com' in a frame because it set 'X-Frame-Options' to 'DENY'. Thank you in advance.
score: 1
upvote count: 1
tagged with: google-chrome
has answer: http://stackoverflow.com/a/25253368
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25252622
tagged with: javascript
type: Question
possible better answer: http://stackoverflow.com/a/25252610
downvote count: 0
tagged with: url
has title: Running Javascript(in Chrome) after I redirect to a new URL on the same tab
tagged with: jquery

http://stackoverflow.com/a/25235727
has body: Use this code to make HTTP request (for the url pass in your url) HttpParams params = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(params, 500); Client = new DefaultHttpClient(params); httpget = new HttpGet(url); ResponseHandler&lt;String&gt; responseHandler = new BasicResponseHandler(); mContent = Client.execute(httpget, responseHandler); Then use this to get your data: JSONObject jsonObject = new JSONObject(mContent); String firstname = jsonObject.getString("firstName"); String id = jsonObject.getString("Name""); String headline = jsonObject.getString("City"); String lastName = jsonObject.getString("CountryName"); Then put it inside asynctask FINAL CODE:: public class AsyncTaskActivity extends Activity implements OnClickListener { Button btn; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); btn = (Button) findViewById(R.id.button1); // because we implement OnClickListener we only have to pass "this" // (much easier) btn.setOnClickListener(this); } public void onClick(View view) { // detect the view that was "clicked" switch (view.getId()) { case R.id.button1: new LongOperation().execute(""); break; } } private class LongOperation extends AsyncTask&lt;String, Void, String&gt; { @Override protected String doInBackground(String... params) { HttpParams params = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(params, 500); Client = new DefaultHttpClient(params); httpget = new HttpGet(url); ResponseHandler&lt;String&gt; responseHandler = new BasicResponseHandler(); mContent = Client.execute(httpget, responseHandler); JSONObject jsonObject = new JSONObject(mContent); String firstname = jsonObject.getString("firstName"); String id = jsonObject.getString("Name""); String headline = jsonObject.getString("City"); String lastName = jsonObject.getString("CountryName"); return "Executed"; } @Override protected void onPostExecute(String result) { TextView txt = (Tex…
type: Answer
answers question: http://stackoverflow.com/q/25231864
score: 0

http://stackoverflow.com/comment/39436727
score: 0
type: Comment
type: QuestionComment
has text: jsbin is blocked too. (complete pain this network is)
comment on: http://stackoverflow.com/q/25287905

http://stackoverflow.com/a/25264500
score: 1
downvote count: 0
type: Answer
has body: you can define a CSS class to your column like this : aoColumns : [ { "sClass": "my_class" }] And in your CSS : .my_class { overflow:hidden; width:200px; }
upvote count: 1
answers question: http://stackoverflow.com/q/25264209

http://stackoverflow.com/q/25303797
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39439708
accepted answer: http://stackoverflow.com/a/25306038
has body: I'm making a Google Maps application where a user can search for a location. This location must point into the direction of a predefined marker. Given the following pieces of code: The predefined marker: var station = new google.maps.LatLng(52.375401, 5.218824); var stationMarker = new google.maps.Marker({ position: station, map: map, }); The marker that will be placed on the location that the user searched: var direction = new google.maps.LatLng(52.376423, 4.887234); var directionMarker = new google.maps.Marker({ position: direction, map: map, draggable: false, title: "test" }); directionMarker.setIcon(({ path: google.maps.SymbolPath.BACKWARD_CLOSED_ARROW, scale: 6 })); How can I make sure that the direction marker (i.e the marker from the user search result) always points to the predefined marker? I'm making use of the Google Maps API v3. I've created a jsFiddle, which you can find here
type: AnsweredQuestion
has title: Let arrow marker point in the direction of another marker
has comment: http://stackoverflow.com/comment/39441104
type: Question
upvote count: 4
tagged with: google-maps
downvote count: 0
tagged with: javascript
score: 4
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/25306038

http://stackoverflow.com/comment/39399363
comment on: http://stackoverflow.com/q/25282457
has text: @SunilHari this is a custom plugin which doesn't use Jquery UI's autocomplete.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39480252
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25325995
has text: Last please see also one more issue of select field .The issue is whenever I change the value of select field I need to set valur in input field .In my example there is a drop drop "title" .if it value is "dr" I need to set value in "studentname" input field "teststudent" and when it value is"jr" i need to set value "karan" http://plnkr.co/edit/ZNJO3x3IqajjdMNStJMF?p=preview

http://stackoverflow.com/comment/39430069
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25298980
has text: sorry i just updated my jsfiddle codes...everytime i input the answer is okay my problem is when i erase my input the answer goes wrong
score: 0

http://stackoverflow.com/q/25278200
has answer: http://stackoverflow.com/a/25278238
has answer: http://stackoverflow.com/a/25278323
has body: I have two variables a (can be undefined or Object) and b (Object). If a.foo exists, I want to set b.foo value. For this I wanted to use a single line expression, using &amp;&amp; operators. Let's look at the example: &gt; a = {foo:'bar'} { foo: 'bar' } &gt; b = {} {} &gt; c = {} {} &gt; c.foo = a.foo // returns 'bar' 'bar' &gt; a &amp;&amp; a.foo 'bar' &gt; a &amp;&amp; a.foo &amp;&amp; b.foo = a.foo // why doesn't this work? ReferenceError: Invalid left-hand side in assignment at repl:1:1 at REPLServer.self.eval (repl.js:110:21) at Interface.&lt;anonymous&gt; (repl.js:239:12) at Interface.emit (events.js:95:17) at Interface._onLine (readline.js:202:10) at Interface._line (readline.js:531:8) at Interface._ttyWrite (readline.js:760:14) at ReadStream.onkeypress (readline.js:99:10) at ReadStream.emit (events.js:98:17) at emitKey (readline.js:1095:12) I don't understand why b.foo = a.foo in this expression throws the error. However, the following expressions work: &gt; a &amp;&amp; a.foo &amp;&amp; console.log("bar") bar undefined &gt; a &amp;&amp; a.foo &amp;&amp; (function () {return 'bar'})() 'bar' &gt; a &amp;&amp; a.foo &amp;&amp; (function () {b.foo = a.foo;})() undefined &gt; b { foo: 'bar' } Why? What's the explanation for this behavior?
answer count: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/25278244
tagged with: node.js
type: AnsweredQuestion
score: 0
accepted answer: http://stackoverflow.com/a/25278244
type: Question
tagged with: object
possible better answer: http://stackoverflow.com/a/25278238
has title: "Invalid left-hand side in assignment" appears in a strange situation

http://stackoverflow.com/comment/39559406
type: AnswerComment
type: Comment
has text: True that. I'm changing my answer.
comment on: http://stackoverflow.com/a/25368757
score: 0

http://stackoverflow.com/q/25286125
tagged with: yui2
favorite count: 0
tagged with: javascript-framework
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25286550
score: 1
has title: How to create a Modality Mask in YUI2?
upvote count: 1
type: Question
tagged with: yui
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25286550
answer count: 1
downvote count: 0
has body: I want to know how a modality mask can be created in YUI2 without using a configuration attribute. While rendering a YUI Panel, the mask normally renders before the panel is displayed. I want to do this in order to resolve a cross browser compatibility issue. Can anyone share a snippet for this?

http://stackoverflow.com/comment/39366649
type: AnswerComment
comment on: http://stackoverflow.com/a/25264903
has text: The chrome developer tools is not showing any error. I already tried it with `console.log`, which has the same effect for testing ;)
score: 0
type: Comment

http://stackoverflow.com/comment/39369432
has text: What's a "special character"? Notice that all characters are valid in an email address.
comment on: http://stackoverflow.com/q/25266372
score: 0
type: Comment
type: QuestionComment

yammer
type: Tag
tags question: http://stackoverflow.com/q/25353509
tags question: http://stackoverflow.com/q/25377104
tag name: yammer

http://stackoverflow.com/a/25368705
has comment: http://stackoverflow.com/comment/39574341
answers question: http://stackoverflow.com/q/25368483
has comment: http://stackoverflow.com/comment/39590290
has body: You might want to checkout the jQuery .serialize() method for getting the form values. http://api.jquery.com/serialize/
has comment: http://stackoverflow.com/comment/39589906
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39590378

http://stackoverflow.com/comment/39430554
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25299276
has text: For this very limited use case, you can use `var matches = babyCsv.match( / [AB]/g ); matches = ( matches ? matches.length ? 0 );`
score: 0

http://stackoverflow.com/a/25373891
score: 1
has comment: http://stackoverflow.com/comment/39574946
has body: Okay here is my solution DEMO JS Bin. It is working perfectly in Chrome but in Safari the planets rotate thru the pop-up still. More debugging and it may be fixable but it is not that bad of an anomaly. I just changed this one CSS ID accordingly: #galaxy { position: fixed; width: 100%; height: 100%; perspective: 4000; -webkit-perspective; 4000; }
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39598025
has comment: http://stackoverflow.com/comment/39596994
type: Answer
has comment: http://stackoverflow.com/comment/39597089
answers question: http://stackoverflow.com/q/25359224
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25359224

http://stackoverflow.com/a/25358233
type: Answer
has body: I've found a solution (no idea whether it's a nice one or not but it's working). I had to edit jqplot.canvasTextRenderer.js, function draw $.jqplot.CanvasFontRenderer.prototype.draw (approx. line 406): If the str parameter is an Array/Object second item must be used as tick label: if (str instanceof Array) { str = str[1]; }
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25322647
score: 0
answers question: http://stackoverflow.com/q/25322647

http://stackoverflow.com/a/25336081
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25336010
has body: What you want is pass the callback function to your Ajax call function, for instance: function ngXMLFile($http, filename, callback) { $http({method: "GET", url: "/xml/"+filename+".xml"}). success(function(data, status, headers, config) { callback($.xml2json(data)); } ). error(function(data, status, headers, config) { } ); } function sectionController($scope, $http) { ngXMLFile($http, "authors",function(data) { $scope.authors = data; }); }
answers question: http://stackoverflow.com/q/25336010
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/39342707
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25251732
has text: You could also float the slideshow as well.

http://stackoverflow.com/a/25343612
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
has body: You cannot modify html, because whole html content will be initialized again. Use something like: var fileInput = document.getElementById('fileInput'), p = document.createElement('P'); p.innerHTML = 'Something'; fileInput.parentNode.insertBefore(p, fileInput.nextSibling);
accepted answer of: http://stackoverflow.com/q/25343563
answers question: http://stackoverflow.com/q/25343563

http://stackoverflow.com/comment/39516784
comment on: http://stackoverflow.com/q/25346143
has text: @CBroe `type="submit"` is the default of a ` `. It just doesn't have a form to submit with "a)."
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39376092
score: 0
has text: there was a typo in my code, see answer for the right one...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25269406

http://stackoverflow.com/q/25280220
has body: I have an applet in a web application (JSP page) in one domain somedomain/myjsp.jsp embedded via object tag and i have another object tag in the same jsp which loads some other domain url anotherdomain/another.jsp .I am unable to call the applet function from the jsp page of another domain. function enableToUpdate() { window.parent.document.MyApplet.EnableButton(); }
type: AnsweredQuestion
score: 0
tagged with: java
type: Question
has title: Applet and Object Tag JSP interaction
tagged with: javascript
tagged with: japplet
has answer: http://stackoverflow.com/a/25280313
answer count: 1
tagged with: applet
accepted answer: http://stackoverflow.com/a/25280313

http://stackoverflow.com/comment/39513417
type: QuestionComment
comment on: http://stackoverflow.com/q/25344199
score: 0
has text: Please add the code you have tried.
type: Comment

http://stackoverflow.com/q/25388131
accepted answer: http://stackoverflow.com/a/25395257
upvote count: 3
downvote count: 1
tagged with: directions
type: Question
tagged with: google-maps
has body: I currently have a simple Google Map, using API v3, with a custom marker (PNG file) displayed on a web page: What I'd like to do is add a list of cities (not in a form tag) below the map: Leeds York Wakefield Harrogate When the user clicks on a city link, I'd like the Google Map to plot the driving route from my marker to the city and zoom out to fit the route. When the user clicks on a different city afterwards, a new driving route should be plotted from my marker to the city clicked on. I'm using jQuery on the page already, so perhaps it could be used for this? I have no idea where to start I'm afraid! Any help or advice would be very much appreciated. Thanks a lot.
tagged with: driving-directions
tagged with: javascript
has title: Google Maps API v3 - Plot route from marker on link click
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/25395257
answer count: 1
favorite count: 0
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/25341926
tagged with: javascript
has title: how to block form submit button
has answer: http://stackoverflow.com/a/25341964
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39509857
favorite count: 0
has answer: http://stackoverflow.com/a/25342542
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25341964
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25341984
upvote count: 1
has body: I'm working on my html source to get the user to input their email in the textbox and click on the submit button to enter the site. When a user did not put their email in the textbox, he can click on the submit button to enter to the site. I want to block it to stop them from entering the site. Here is the code I use: I want to add the tooltip under the email textbox to force the user to input their email address before they can click on the submit to enter the site. Can you please tell me how I can block the submit button from enter the site when the textbox is empty so I can add the tooltip under the textbox to force the user to input their email?
type: Question
possible better answer: http://stackoverflow.com/a/25341984
linked to: http://stackoverflow.com/q/5272433

http://stackoverflow.com/comment/39440619
has text: Have a look at this tutorial http://www.paulund.co.uk/javascript-full-screen-api
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25304853

http://stackoverflow.com/q/25304001
has title: Rails 4 will_paginate masonry
tagged with: ruby-on-rails
type: Question
tagged with: masonry
has answer: http://stackoverflow.com/a/25312651
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25312651
type: AnsweredQuestion
has body: I'm trying to get infinite scroll working with masonry but when I load more content, the boxes are appended to beginning of grid and overlap others. I have images in some of the boxes. show.js.erb var boxes = $('&lt;%= j render(:partial =&gt; "mypost", :locals =&gt; {mypost: mypost}, :collection =&gt; mypost) %&gt;') var $container = $('#containermason'); $container.append($boxes).imagesLoaded( function(){ $container.masonry('appended', $boxes); } ); &lt;% if mypost.next_page %&gt; $('.pagination').replaceWith('&lt;%= j will_paginate mypost %&gt;'); &lt;% else %&gt; $('.pagination').remove(); &lt;% end %&gt;

http://stackoverflow.com/q/25385525
has title: parentNode.remove() not working in IE
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25385799
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39590048
has comment: http://stackoverflow.com/comment/39590380
type: Question
has body: First of all, I'm very new with all that JavaScript stuff. I'm using parentNode.remove() to close a modal box on my site. Works perfectly in Firefox and Chrome, but nothing in IE (8-9-10-11...). The link that I use to close the box looks like this: X Is there a way that I can tweak my onclick to work in Internet Explorer? Thanks a lot!
accepted answer: http://stackoverflow.com/a/25385799
tagged with: internet-explorer
tagged with: javascript

http://stackoverflow.com/comment/39424419
score: 0
comment on: http://stackoverflow.com/a/25295848
has text: After two clicks on the same link You got id attribute added twice: `?id=0123456789?id=0123456789` -- it's ok?
type: AnswerComment
type: Comment

http://stackoverflow.com/a/42287027
has body: none of these answers which include count() worked for me; the typeof $$('.selector').count() is 'object' you have to use the promise to pull the count value out like this. const nameSelector = '[data-automation="name-input"]'; const nameInputIsDisplayed = () =&gt; { return $$(nameSelector).count() .then(count =&gt; count !== 0) } it('should not be displayed', () =&gt; { nameInputIsDisplayed().then(isDisplayed =&gt; { expect(isDisplayed).toBeFalsy() }) })
downvote count: 0
answers question: http://stackoverflow.com/q/25314019
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/q/25330951
has comment: http://stackoverflow.com/comment/39489650
score: 2
type: AnsweredQuestion
has body: For example: I have the following HTML on the DOM: Trollin t If this content was on the DOM, I could simply do: $("#hey h1").text("Hello!"); But what if the HTML was stored in a JavaScript string called "myString"? Is it possible to change the text when it is not on the DOM using jQuery or must I append it, edit it and then remove it? If it is not possible to edit the HTML using jQuery whilst the HTML is in the variable, what is my best option?
tagged with: dom
has title: Can jQuery manipulate HTML that is not on the DOM?
accepted answer: http://stackoverflow.com/a/25331026
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39489629
favorite count: 0
possible better answer: http://stackoverflow.com/a/25330990
has comment: http://stackoverflow.com/comment/39500013
has comment: http://stackoverflow.com/comment/39489658
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25330990
has comment: http://stackoverflow.com/comment/39489709
has answer: http://stackoverflow.com/a/25331026
upvote count: 2

wikipedia-api
tag name: wikipedia-api
tags question: http://stackoverflow.com/q/25344228
type: Tag

http://stackoverflow.com/q/25274724
type: AnsweredQuestion
has body: people of this awesome site. I've been reading and practicing some Javascript since two weeks ago or so. I discovered a website called codeWars after completing the JS course in CodeAcademy. I'm struggling with one of the practices. My code works using the console or JSfiddle and I would like to know why is not working. Also, I know this code is a wee bit dodgy, could you guys give me some advice? Thanks Statement: Create a function called encode() to replace all the lowercase vowels in a given string with numbers according to the following pattern: a -> 1, e -> 2, i -> 3, o -> 4, u -> 5 My fiddle function encode(word) { var repa = /a/gi; var repe = /e/gi; var repi = /i/gi; var repo = /o/gi; var repu = /u/gi; word = word.toLowerCase(); len = word.length; for (i = 0; i &lt; len; i++) { if (word[i] === 'a') { word = word.replace(repa, '1'); } else if (word[i] === 'e') { word = word.replace(repe, '2'); } else if (word[i] === 'i') { word = word.replace(repi, '3'); } else if (word[i] === 'o') { word = word.replace(repo, '4'); } else if (word[i] === 'u') { word = word.replace(repu, '5'); } } return word; } Thank you for your time, guys.
accepted answer: http://stackoverflow.com/a/25275279
type: Question
tagged with: replace
has title: Modifiying characters in a string practice
has answer: http://stackoverflow.com/a/25275279
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39385200
score: 0
tagged with: regex
has comment: http://stackoverflow.com/comment/39385054
has comment: http://stackoverflow.com/comment/39385719

http://stackoverflow.com/a/25234268
answers question: http://stackoverflow.com/q/25234255
type: Answer
has body: If you want letters only you should use this regex: ^[A-Za-z]+$ If you want to have letters and numbers then use: ^[A-Za-z0-9]+$ Btw, as guys pointed out you are using regx instead of regex
score: 0

http://stackoverflow.com/q/25265932
type: Question
has body: I am using multiple Blueimp File Upload plugins in ajax-loaded html : $('.edit').click(function(){ $( "#details" ).show(); $('#details div').html(ajax_spinner).load(script.php, "parameters"); }); So when you click something class="edit" a new div id="details" is shown (but it was in the DOM when document.ready) and script.php returns a form id="upload" (which is never visible in "view source", although it is there in the page..? What is the rule/good practice for dealing with html added after the document.ready? So now there is a new element in this "virtual DOM" : DROP HERE Image .png or .jpg Browse And when I try to act upon this "invisible" part of the DOM : $('#drop a').click(function(){ alert('Nope. Nothing'); }); Only when I $(document).on('click', '#drop a', function() { alert('Ah, this works'); }); But I need more than an alert. The whole $('#upload').fileupload({ ... }) callback suite is not executed, probably because of this DOM "existence" issue. BTW I use this very implementation in other pages, on plain existing DOM, and it works. How can I act upon those newly-spawned DOM elements?
accepted answer: http://stackoverflow.com/a/25266213
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25266213
tagged with: blueimp
type: AnsweredQuestion
has title: Multiple jQuery plugin instances in ajax-loaded html
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/39480341
type: Comment
comment on: http://stackoverflow.com/q/25326275
type: QuestionComment
has text: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent
score: 1

http://stackoverflow.com/comment/73085045
type: AnswerComment
has text: Can you explain why it's common practice to store the port value using `app.set`, or why anything would ever be stored here instead of in ordinary variables?
type: Comment
score: 2
comment on: http://stackoverflow.com/a/25337297

http://stackoverflow.com/q/25308716
has title: Multiple polymer elements in core-component-page
has answer: http://stackoverflow.com/a/25316311
tagged with: polymer
has body: i have two elements, in different html files, how can i show the resume of these elements in the core-component-core?, when i join both files in one html file, looks well, but in different files does not. Only show the "master" element (element-one). Component 1: ... Component 2: ...
score: 0
tagged with: web-component
answer count: 1
tagged with: javascript
type: UnansweredQuestion
type: Question

http://stackoverflow.com/q/25286050
type: Question
has title: Attaching an onsubit function to a form with arguments
has comment: http://stackoverflow.com/comment/39405441
linked to: http://stackoverflow.com/q/1451009
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25286175
answer count: 1
has body: I have a function I want to attach to all forms passing the form itself as an argument. When I submit the form, I see that the function gets called, but the argument is either null or some other element in the DOM. This method is already called within a class, so this is probably the wrong thing to pass, but forms[i] did not work either. What do I pass in place of the ?, or is there a better way? var forms=this.content.getElementsByTagName('form'); for(var i=0;i&lt;forms.length;++i){ // TODO: handle if there is already an onsubmit() function forms[i].onsubmit=function(){SubmitForm(?);} }
has comment: http://stackoverflow.com/comment/39405573
accepted answer: http://stackoverflow.com/a/25286175
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39405754
has comment: http://stackoverflow.com/comment/39405305
tagged with: forms

http://stackoverflow.com/comment/39322498
has text: First of all, you have some invalid HTML. tag needs to be closed, and you have one trailing . Don't use inline CSS, it's bad practise. Third, use proper indentation for all your code. When you fix that in your fiddle, we might be able to help you.
score: 0
comment on: http://stackoverflow.com/q/25237929
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25280727
has body: In Highchart I want to set the number of plot points that are to be shown in the dynamic graph. For example, if I set the number to 10, only 10 points in the dynamic series will be shown. I have implemented another graph and it shows only 6 points but I want to display at least 10 points. JsFiddle $(function () { var chart; $(document).ready(function () { chachart = new Highcharts.Chart({ chart: { renderTo: "container", type: "spline", zoomType: 'x' }, title: { text: 'Inverter ~ AC Currents' }, subtitle: { text: 'Click and drag in the plot area to zoom in' }, plotOptions: { spline: { turboThreshold: 2000, lineWidth: 2, states: { hover: { enabled: true, lineWidth: 3 } }, marker: { enabled: false, states: { hover: { enabled: true, radius: 5, lineWidth: 1 } } } } }, In the link above, I do not see any line that defines the limit for the number of points.
score: 0
has title: Display points with minimum number in HighChart
has answer: http://stackoverflow.com/a/25284136
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25284136
type: Question
answer count: 1
tagged with: highcharts
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39328879
type: Comment
has text: The css-function `expression()` might be of your interrest too.
comment on: http://stackoverflow.com/a/25242960
type: AnswerComment
score: 0

http://stackoverflow.com/q/25342799
has title: Jquery: Show/Hide Div broken
upvote count: 1
tagged with: event-listener
has comment: http://stackoverflow.com/comment/39512028
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25342918
has answer: http://stackoverflow.com/a/25343034
score: 0
has comment: http://stackoverflow.com/comment/39512111
has answer: http://stackoverflow.com/a/25342918
answer count: 2
has comment: http://stackoverflow.com/comment/39512697
linked to: http://stackoverflow.com/q/24522439
favorite count: 0
has comment: http://stackoverflow.com/comment/39512160
has comment: http://stackoverflow.com/comment/39528051
accepted answer: http://stackoverflow.com/a/25343034
type: AnsweredQuestion
has body: Scenario: I'm trying to create a script that allows a user to click a thumbnail image and display a larger image in preview box. I'm using a div and a img for this example just as a placeholder for now. Question In Jquery, is there a way to use a function with parameters as a callback for a onclick event listener? I've looked at addEventListener and Onclick and .on method in jquery, but nothing seems to fit what i'm searching for. My Attempts: http://jsfiddle.net/davideugenepeterson/9emhuzw0/3/ http://jsfiddle.net/EhtrR/931/ Javascript: var numberOfImages = 4; var imageArray = []; //since i'm going to hide all other divs each time a img is clicked, // I need to be calling from imageArray[] so I can difArray check later for (i = 0; i &lt;= numberOfImages; i++) { //counting starts from zero, but frontend already built their naming convention to start with 1 if (i === 0) { continue } imageArray.push(i); } for (i = 0; i &lt;= imageArray.length; i++) { if (i === 0) { continue } //on each img click show corresponding div and hide all others, not working $("#img-" + imageArray[i]).on('click', function () { $("#div-" + i).show(); }); }

http://stackoverflow.com/comment/39453606
score: 0
type: Comment
has text: @reporter I think you're going off on a tangent. He wants to show an element that he refers to as a popup. He doesn't want `window.open()` - I guarantee that.
type: QuestionComment
comment on: http://stackoverflow.com/q/25311747

http://stackoverflow.com/a/25374854
accepted answer of: http://stackoverflow.com/q/25374042
upvote count: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Current versions of Jade don't have a syntax for conditional comments, but they can be included as-is. &lt;!--[if !IE]&gt; --&gt; // ... &lt;!-- &lt;![endif]--&gt; To include inline JavaScript, you'll want it treated as plain text so Jade doesn't try to parse it. One option for this is to add a . suffix to the element. script. window.jQuery || document.write("&lt;script src='../assets/js/jquery.min.js'&gt;"+"&lt;"+"/script&gt;");
score: 2
answers question: http://stackoverflow.com/q/25374042

http://stackoverflow.com/q/25278097
accepted answer: http://stackoverflow.com/a/25293675
has body: When I apply this.player.tint = 0xcd0937; to tint my sprite red, the sprite behaves as expected on desktop. The sprite changes color and when the sprite moves left or right all of the sprite state changes are recognized and the tint is active. On mobile, the sprite changes to the desired tint color but stays stuck in the sprite state that was active when the tint was applied. Anyone know how to achieve the expected behavior on mobile?
type: AnsweredQuestion
type: Question
tagged with: phaser-framework
tagged with: javascript
has title: tint sprite on mobile disables sprite state change with phaser
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25293675

http://stackoverflow.com/comment/39431817
score: 0
type: QuestionComment
type: Comment
has text: possible duplicate of [Trigger events when the window is scrolled to certain positions](http://stackoverflow.com/questions/5672320/trigger-events-when-the-window-is-scrolled-to-certain-positions)
comment on: http://stackoverflow.com/q/25299777

http://stackoverflow.com/q/25386668
has body: I have two boxes visible on a web page, one floating on the left and the other floating on the right. I want these boxes to align along the bottom. The problem is, there is one box whose height will change for different screen widths because it contains text and when the text wraps the height increases. The other box doesn't have any text and can be any height, but it has text above it which will change the box's y position depending on how much text wraps. I would like to bottom align the two boxes by changing the height of the box that contains no text, or increase the padding/margin above it. I do not want to change the right box's height, and I want the top left text and the top of the right box to remain aligned at the top. If possible only using CSS, but a JavaScript solution would be acceptable, preferably no jQuery or other plugins. I have defined an outer div with width set to 100% and some padding so that the content on the page is inset from the edges. Inside this outer div is a div that is floating left, width set to 35%. Inside that div is a div that contains text, and a sibling to that div is another div that is the box that contains no text whose height is a fixed value that I can change. Then there is a box that's a child of the outer div, which is floating right with width set to 60%. This box will increase in height as the browser width decreases due to the wrapping text this box contains - I don't wish to modify its height. some text here... some text here...
has comment: http://stackoverflow.com/comment/39592908
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25387429
has answer: http://stackoverflow.com/a/25387356
has comment: http://stackoverflow.com/comment/39592436
type: Question
has comment: http://stackoverflow.com/comment/39592603
tagged with: javascript
has title: How would one bottom-align two divs when floated side-by-side?
has comment: http://stackoverflow.com/comment/39593175
score: 0
answer count: 2

http://stackoverflow.com/q/25380564
tagged with: canvas
answer count: 1
has title: Particle's code doesn't work. Error on drawing?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25383251
has body: Hi there :) just trying to finish this little test with particles, but i'm getting some "extrange" behavior. I will let you two "versions" of the code. It works like this: -I create a particle, passing a "particle settings", it means a particle configuration for liferate, color, spawntype, etc. For now, i only have one particle type "AcidQuads". They are intended to be rects (wich its working ok) but with random initial color if "rndiColor" value is set to true. If it is, the color is generated by passing the list contained on "iRed", "iGreen" and "iBlue" (same stands for iAlpha) to a function (rndbtw). It works fine (or that's what i see). The PARTICLES_SETTINGS properties that have a "list" as a value, means that the particle value will be generated by rndbtw(), which returns a value between propertie's 1 element and 0 (a iRed: [255, 0] will return a number between 0 and 255). I've put an alert to see the values generated for each particle, and they are ok. Color values are correct (between 0 and 255) and everything looks fine... but, the only way i can get particles drawed is by settings iRed/iGreen/iBlue to [0, 255] which generates white particles always, with different alpha. The "working" code is the next: &lt;/head&gt; &lt;body&gt; &lt;canvas ID="test" width="640" height="480"&gt;&lt;/canvas&gt; &lt;script&gt; var QUAD = 1, GRAVITY = 0.3; var mouse; mouse = {x: 0, y: 0}; document.addEventListener('mousemove', function(e){ mouse.x = e.clientX - 12; mouse.y = e.clientY - 23 //Fix poco decente! no hagan esto en casa. }, false); function rndbtw(range) { return (Math.random()*range[0])+range[1] } function getRGBA(R, G, B, A) { return 'rgba('+R+','+G+','+B+','+A+')' } var PARTICLES_SETTINGS = { 'AcidQuads': { //Shape and size related shape: QUAD, rndSize: true, size: {width: [10, 2], height: [10, 2] }, //Color related rndiColor: true, iRed: [0, 255], //Here are the color values iGreen: [0, 255], iBlue: [0, 255], // Alpha rndiAlpha: true, iAlpha: [1, 0.1], // Veloci…
tagged with: drawing
tagged with: particles
has answer: http://stackoverflow.com/a/25383251
type: AnsweredQuestion
tagged with: draw
type: Question
score: 0

http://stackoverflow.com/comment/39310026
has text: The second argument of `on` (_for event delegation_) should be string (_a selector_) not a jQuery object.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25234503
type: QuestionComment

http://stackoverflow.com/a/25324738
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25324715
has comment: http://stackoverflow.com/comment/39477412
downvote count: 0
has body: How about this: $('html').click(function(e) { if (! $(e.target).is('.special') ) { alert('test'); } }); This will prompt you an alert when clicking anywhere on the page.
upvote count: 2

http://stackoverflow.com/comment/39499375
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25335970
has text: If `map` and `forEach` count as loops, then `join` does too.
type: AnswerComment

http://stackoverflow.com/a/25353550
has comment: http://stackoverflow.com/comment/39755721
answers question: http://stackoverflow.com/q/25353217
upvote count: 1
type: AcceptedAnswer
has body: You will want to use a jQuery plugin like Masonry, which allows you to stack images like that or as it's probably more commonly known for being used on: Pinterest.
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25353217

session
tags question: http://stackoverflow.com/q/25236946
tags question: http://stackoverflow.com/q/25250981
type: Tag
tags question: http://stackoverflow.com/q/25358679
tags question: http://stackoverflow.com/q/25245049
tags question: http://stackoverflow.com/q/25247162
tags question: http://stackoverflow.com/q/25337976
tags question: http://stackoverflow.com/q/25262888
tags question: http://stackoverflow.com/q/25324418
tag name: session

http://stackoverflow.com/a/25315939
type: Answer
score: 0
has body: To do match the height of matching li (just like you asked) you can do the following, so if the first li has a larger height then only adjust the first on the second ul var biggerH = $("li[data-target=dynamic] ul li:first-child").height(); var nth = 0; $("li[data-target=dynamic] ul li").each(function(i){ $("li[data-target=dynamic] ul li").each(function(k){ if(biggerH &lt; $(this).height()){ biggerH = $(this).height(); nth = k; } }); }); $("li[data-target=dynamic] ul li:nth-child("+nth+")").height(biggerH); DEMO http://jsfiddle.net/6yL6fdt7/5/
answers question: http://stackoverflow.com/q/25315606

http://stackoverflow.com/comment/39390460
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25266275
has text: if you want to create website public then you should not call any file from your local pc..
type: AnswerComment

http://stackoverflow.com/comment/39576042
has text: there will unique parameters with different names such as token=dfd&refresh_token=dfdsf. So split does work on getting exact token= value.
comment on: http://stackoverflow.com/q/25378055
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39469751
score: 0
has text: I recently learned to be careful not to abuse attaching to document, as performance will degrade when you have many. It's better to attach to an element closer to the one you want to bind--the only requirement is that you need to attach to one that's already in the DOM and will not be removed. In this case `$('.gameboard').on(...)` will work. http://api.jquery.com/on/#event-performance.
comment on: http://stackoverflow.com/a/25320491
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25252712
score: 2
upvote count: 2
downvote count: 0
has body: You need to understand the structure of JSON and then navigate it. Try here or here. The array of job listings appears to be at data.response.jobListings, but each one is an object that you must decide how you want to convert into HTML. The simplest way is to turn it back to JSON with JSON.stringify, but that won't be very user-friendly. success : function(data){ var listingJSON = JSON.stringify(data.response.jobListings); document.getElementById("demo").innerHTML = listingJSON; }
answers question: http://stackoverflow.com/q/25252479
type: Answer

http://stackoverflow.com/a/25260905
has comment: http://stackoverflow.com/comment/39358886
upvote count: 2
answers question: http://stackoverflow.com/q/25260841
has comment: http://stackoverflow.com/comment/39359640
has comment: http://stackoverflow.com/comment/39359860
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39359408
downvote count: 0
type: Answer
has body: if i understand that correctly you can simply use this: var windows = $('#target1, #target2, #target3, #target4'); windows.on('click', function() { $(this).hide(); }); You should consider giving the button an class: HTML X JS var closeButtons = $('.close_window'); closeButtons.on('click', function() { $(this).parent().hide(); }); Then you can get actually the goal you want :-) Regards
score: 2
accepted answer of: http://stackoverflow.com/q/25260841

http://stackoverflow.com/comment/39328711
type: Comment
type: QuestionComment
has text: well thats what i originally done but i get NaN returned
comment on: http://stackoverflow.com/q/25244619
score: 0

http://stackoverflow.com/comment/39527827
type: QuestionComment
comment on: http://stackoverflow.com/q/25352536
score: 0
has text: Have you tried to do it by yourself? If so, post your code.
type: Comment

http://stackoverflow.com/comment/39514872
comment on: http://stackoverflow.com/a/25327944
has text: I tried that too but it didn't work either. I'll be able to test again on Monday. Any ideas?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39530841
score: 1
comment on: http://stackoverflow.com/a/25354146
type: AnswerComment
has text: Again, make a plunk out of it w/ mock data and I bet you figure it out yourself. If not then it'll be that much easier for anyone to help out.
type: Comment

http://stackoverflow.com/comment/39609374
has text: Okay, now let me ask, will this just go in a tag, or would it be in it's own file?
type: Comment
comment on: http://stackoverflow.com/a/25377426
score: 0
type: AnswerComment

http://stackoverflow.com/q/25293991
has body: To start off, here's my little section of code that I'm trying to use to declare the routes - &lt;script&gt; var Workspace = Backbone.Router.extend({ routes: { "test": "test", // #test }, test: hideone() { ... }, }); &lt;/script&gt; I'm trying to make it so that when someone reaches "www.website.com/index.html#test", it'll trigger the JavaScript function "hideone", which I have written out earlier in the document. If it helps, here's "hideone" - &lt;script&gt; function hideone() { var elem = document.getElementById("one"); elem.className = "hide"; } &lt;/script&gt; I've never used backbone.js before, and I couldn't find documentation for my specific problem here.
type: AnsweredQuestion
has title: How to use backbone.js routes to trigger JavaScript functions
accepted answer: http://stackoverflow.com/a/25294507
score: 1
upvote count: 1
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25294040
answer count: 2
has answer: http://stackoverflow.com/a/25294040
downvote count: 0
tagged with: url
has answer: http://stackoverflow.com/a/25294507
favorite count: 0
tagged with: backbone.js
tagged with: hash
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25318628
has answer: http://stackoverflow.com/a/38810622
type: Question
tagged with: google-apps-script
has answer: http://stackoverflow.com/a/25333322
tagged with: javascript
possible better answer: http://stackoverflow.com/a/38810622
has title: Access Google Apps Scripts from an external site
answer count: 2
tagged with: instagram
accepted answer: http://stackoverflow.com/a/25333322
has body: I currently have a website that automates Instagram actions: http://instapromobiz.com. It is almost all javascript based, with some php to post to databases. Users login and an entry is created in a mySQL database, containing their username and how many credits they have (1 credit = 1 action). Then users add tags and press start, then the javascript makes requests via Instagrams API, and ajax+php is used to update their database. The issue is that when the user leaves the page, or even refreshes it, the script will stop. Otherwise it will run forever. I have a javascript file that contains all the functions needed to run the script until the user stops it. My question is, can I use Google Apps Scripts to host this .js file so that when the user leaves the page the script continues to run. I've uploaded the code and published it, but I can't figure out how to access it from an external website. node.js is out of the question, and I'd rather not convert the whole site to php(I don't know php well) and a cron wont work because of all the javascript. Any help would be great, thanks!
tagged with: php
type: AnsweredQuestion
score: 0

http://stackoverflow.com/a/25359718
has comment: http://stackoverflow.com/comment/39543861
has comment: http://stackoverflow.com/comment/39542773
has comment: http://stackoverflow.com/comment/39541963
accepted answer of: http://stackoverflow.com/q/25267487
has comment: http://stackoverflow.com/comment/39541057
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39542971
type: Answer
has comment: http://stackoverflow.com/comment/39542825
has comment: http://stackoverflow.com/comment/39544090
has comment: http://stackoverflow.com/comment/39543145
score: 2
has comment: http://stackoverflow.com/comment/39543519
downvote count: 0
has body: You can catch the window.onbeforeunload() and use cookies to store the number of back button clicks on every backbutton fire, you can update the cookie. Try that. Use popstate and cookies you can achieve I used a plugin called cookie and also import them to your page. Here is the import. &lt;script src="/jqueries/jquery.cookie.js"&gt;&lt;/script&gt; This is the code I used. $(window).on('popstate', function () { var val = 1; if (typeof $.cookie('example') === 'undefined') { //no cookie } else { //have cookie val = parseInt($.cookie("example")) + 1; $.removeCookie("example"); } $.cookie("example", val, { expires: 7 }); //alert($.cookie("example")); }); Its juzz a rough code You can make it as what you want It will create pushstate Add this to the script.. There are just DEMO contents in HTML &lt;input type="text" id="t1" /&gt; &lt;input type="text" id="t2" /&gt; &lt;input type="text" id="t3" /&gt; &lt;input type="text" id="t4" /&gt; &lt;input type="text" id="t5" /&gt; These are the HTML5 pushstate scripts without AJAXify. Try these... $('#t1').click(function () { if (window.history.replaceState) { window.history.pushState('', 'Title', '/YourPagename/123/1234'); } }); $('#t2').click(function () { if (window.history.replaceState) { window.history.pushState('', 'Title', '/YourPagename/123/12345'); } }); $('#t3').click(function () { if (window.history.replaceState) { window.history.pushState('', 'Title', '/YourPagename/123/123456'); } }); And soon. Declare like these for others By this it is possible. This part is to get the url values passed, here t1, t2 will get the values associated with url var ourl = "", t1 = "", t2 = ""; if (window.history.replaceState) { ourl = document.URL.toString(); var url = document.URL.toString().replace('http://', ''); var cnt = 0; for (i = 0; i &lt; url.length; i++) { if (url[i] == '/') { cnt++; } else if (cnt == 2) { t1 += url[i]; } else if (cnt == 3) { t2 += url[i]; } } }
upvote count: 2
has comment: http://stackoverflow.com/comment/39544039
has comment: http://stackoverflow.com/comment/39543801
answers question: http://stackoverflow.com/q/25267487

http://stackoverflow.com/a/25343421
upvote count: 1
downvote count: 0
score: 1
type: Answer
answers question: http://stackoverflow.com/q/25303917
has body: You can also check my cy2neo project which solved this in javascript, i.e. it uses the results from the cypher query with the resultDataContents:graph and renders them as d3-graph using alchemy.js

http://stackoverflow.com/q/25302684
has answer: http://stackoverflow.com/a/25303252
accepted answer: http://stackoverflow.com/a/25303252
favorite count: 0
possible better answer: http://stackoverflow.com/a/25303061
type: AnsweredQuestion
score: 2
downvote count: 0
has body: I am trying to get all the values of the input fields. The issue is all of the are dynamic and can increase or decrease at any time. So I am starting with the main DI and going from there. The problem I have now is I am not getting the input radio buttons values. So here are the steps I am intending to accomplish: If any radio button is selected, pass its value to the checkbox value, If the radio button is selected and the checkbox is not selected, do not pass to the checkbox value I am looking for a solution in JavaScript only - do not use jQuery Here is my jsFiddle code HTML UPSShow Prices UPS Ground (Order by 9:30 PM EST) StandardShow Prices Standard Delivery - 2-3 Day Delivery at Ground Rate (Order by 9:30 PM EST) FedExShow Prices FedEx Ground (Order by 8:00 PM EST) Get Value JS Code This executes when the checkbox is clicked: function getpref(val) { var wr = document.getElementById(val); childElements = wr.childNodes; //alert(childElements); for(var i = childElements.length-1; i>=0; i--){ var elem = childElements[i]; console.log(elem.id); if(elem.id && elem.id.indexOf(val+'_')==0){ elem.style.display = 'block'; } } //alert(val); }
type: Question
has title: Getting all child input elements within a div
has answer: http://stackoverflow.com/a/25303061
tagged with: javascript
upvote count: 2
answer count: 2

http://stackoverflow.com/a/25434821
has comment: http://stackoverflow.com/comment/39682780
answers question: http://stackoverflow.com/q/25272020
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39682331
has body: I think I figured it out, it's tricky. In short: in the question I describe my current solution that flickers in iOS. At point 3 you need to add position: fixed to DIV2. That way it's gonna "stick" and you avoid the flickering at point 4. Then you need to delay point 4 a couple of milliseconds (setTimeout, 500ms worked for me but probably could be smaller) and set position: absolute again to DIV2 right after window.scrollTo. I'm not sure that's the reason you need the delay, but without it the screen still flickers. If there's interest I can post a PoC later. As a side note, I found it pretty disappointing that most if the people who answered did not read the question entirely or just completely ignored some criteria (framework-independence, keeping original scroll behavior). Most of them suggested solutions that I already specifically linked in the question as not acceptable. Some of them even reclaim when get downvoted. EDIT: dreamlab answered just a couple of minutes before I posted my solution. Both solutions use position: fixed. His solution is more detailed too. He deserves the bounty.

http://stackoverflow.com/comment/39571466
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25375553
has text: try read like `req.query.data`.
type: QuestionComment

http://stackoverflow.com/q/25270452
accepted answer: http://stackoverflow.com/a/25271756
answer count: 2
possible better answer: http://stackoverflow.com/a/25270556
type: AnsweredQuestion
tagged with: jquery-selectors
tagged with: function
has answer: http://stackoverflow.com/a/25270556
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/39376887
has answer: http://stackoverflow.com/a/25271756
tagged with: keydown
upvote count: 1
has title: Stop unwanted scrolling when moving caret with arrow keys in contenteditable div
linked to: http://stackoverflow.com/q/7451468
tagged with: javascript
has body: Keydown works perfectly when I select document, *, body or any particular element. But when I add .not('.some-class'), keydown works like this .not() doesn't even exist. Maybe because of the way keydown affects children elements, but I'm not sure: $('*').not('.some-class').on('keydown',function(e){ var key = e.charCode || e.keyCode; if(key == 33 || key == 34 || key == 35 || key == 36 || key == 37 || key == 38 || key == 39 || key == 40 ) { e.preventDefault(); } else {} }); How to disable these keys for the whole document except for 1 child class? edit: http://jsfiddle.net/umL139xw/2/ How to stop this unwanted scrolling while keeping ability to move caret with arrows? edit2: complete solution thanks to Jason P and Kaiido http://jsfiddle.net/umL139xw/5/

http://stackoverflow.com/a/25419963
has body: If you want to check for the last element from ng-repeat you can do it like this: app.directive('tooltipPluginAsExample', function() { return { restrict: 'A', link: function(scope, element, attrs) { var isLast = attrs.tooltipPluginAsExample; if (isLast == 'true') { console.log('last element!'); } } }; }); Inside html you need to use $last variable provided by ng-repeat directive (doc: https://docs.angularjs.org/api/ng/directive/ngRepeat): &lt;div ng-controller="ItemCtrl"&gt; &lt;ul&gt; &lt;li tooltip-plugin-as-example="{{$last}}" ng-repeat="item in iCtrl"&gt;{{item.name}}&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; jsFiddle example: http://jsfiddle.net/nzuru5a9/4/
type: Answer
answers question: http://stackoverflow.com/q/25271952
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/39332107
has text: I'm just learning a lot of this stuff so I'm changing stuff as I learn more and find the replacements for the native code. Thanks for the code, I'm sure it'll help me out.
comment on: http://stackoverflow.com/a/25246325
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39485782
has text: thanks everyone for your contributions. To give you a better visual, I created a not so perfect JSFiddle example: http://jsfiddle.net/b23aoe52/1/
score: 0
comment on: http://stackoverflow.com/q/25320363
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39482476
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/59412/discussion-between-henrik-peinar-and-roxci-william).
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25327062

http://stackoverflow.com/comment/53661861
type: Comment
comment on: http://stackoverflow.com/a/25269804
has text: very useful finding! I've been breaking my head for several hours.
type: AnswerComment
score: 0

http://stackoverflow.com/q/25250103
favorite count: 0
score: -1
has answer: http://stackoverflow.com/a/25250255
answer count: 1
tagged with: css
has body: Is it possible to find the leftover area on a web page? For example, I created a box which is YxZ dimension. And I'm trying to figure out if I could make any squares out of the rest of the area. Is this feasible to do or it will take a bit of hackaround ?
downvote count: 1
has comment: http://stackoverflow.com/comment/39339232
upvote count: 0
tagged with: javascript
type: UnansweredQuestion
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: find leftover area on a page html

http://stackoverflow.com/comment/39485478
score: 2
has text: Seems to work fine http://jsfiddle.net/4q4ym4xf/
type: Comment
comment on: http://stackoverflow.com/q/25328844
type: QuestionComment

http://stackoverflow.com/comment/39504031
type: Comment
has text: you are right. than what kind of keyword need to replace document?
comment on: http://stackoverflow.com/a/25338548
type: AnswerComment
score: 0

http://stackoverflow.com/q/25273012
has comment: http://stackoverflow.com/comment/39383425
has comment: http://stackoverflow.com/comment/39384184
upvote count: 1
has comment: http://stackoverflow.com/comment/39452239
has title: Truly Refresh/Reload a jQuery mobile page div
tagged with: mobile
has comment: http://stackoverflow.com/comment/39408261
tagged with: jquery-mobile
tagged with: javascript
type: UnansweredQuestion
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/39412635
score: 1
tagged with: jquery
favorite count: 0
type: Question
has body: I'm currently working with a file that contains several jQM page divs (single page approach). I have a refresh button in the header of these pages that I'm trying to get to refresh individual page divs based on "getActivePage". The reason for this interactivity is there is a running list of items that users will be needing to refresh to see new content coming in to listview(s). I've had various visual refreshes altering the following function, but none seem to totally refresh the DOM or the contents of a desired pagecontainer or jQM page div. With the following code, I'm able to see a visual transition and I arrive at the desired/same jQM page div that I'm trying to refresh. The problem is, the contents aren't really being reloaded it seems. (I have a way in the test environment of changing the listviews to test the refreshes and I'm not seeing those changes take effect) I'm wondering if I'm not passing in "id_urlNav" properly or if this is even possible with .pagecontainer("change"...). When all was lost, I ended up inserting window.location.reload();, but this seems to be bad form for pagecontainer manipulation. If anyone has any idea why this isn't working, please let me know. Thanks in advance for reviewing! // script to reload/refresh jQM pages // scoped to internal page hashes vs. overall window // "change" is used vs. "load" for internal reloads vs. AJAX content function refreshPages() { // the camel casing on the first part of the pageContainer object below // is important var id_url = $.mobile.pageContainer.pagecontainer("getActivePage")[0].id; var id_urlNav = "#" + id_url; console.log("id_urlNav" + " =" + " " + id_urlNav ); // window.location.reload(); // keeping the below in case 1.5 finally arives with proven solution $.mobile.pageContainer.pagecontainer( "change", id_urlNav, { allowSamePageTransition : true, showLoadMsg : true, // reloadPage reloads entire jQM set of pages, forgetting the getActivePage // reloadPage is deprecated // reload "reloads" the…

http://stackoverflow.com/comment/39586855
type: Comment
comment on: http://stackoverflow.com/q/25378838
score: 0
type: QuestionComment
has text: _"My problem is that when I call the `new google.visualization.DataTable` the visualization is not yet loaded and the javascript fails."_ I don't know "google visualization" but AFAICS from your code, the library is loaded in the constructor. And the table created in a method. So it _should_ have been loaded before you use it. Do you have some means to log is the load was successful?

http://stackoverflow.com/a/48359737
answers question: http://stackoverflow.com/q/25386431
downvote count: 0
type: Answer
has body: In the accepted answer You must add the extended_type option for Symfony >= 3.1 So the correct service registration is : # Bundle config mynamespace.form.type_extension.media: class: MyNamespace\AppBundle\Form\Extension\MediaTypeExtension tags: - name: form.type_extension extended_type: 'Sonata\MediaBundle\Form\Type\MediaType' alias: sonata_media_type
score: 1
upvote count: 1

http://stackoverflow.com/q/25368226
has title: JQuery.contents not working using jsdom
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39557568
tagged with: node.js
tagged with: jsdom
score: -1
tagged with: web-crawler
type: Question
has answer: http://stackoverflow.com/a/25369246
has body: This code does work in the browser, but in Node.js (using JSDom + Crawler), i returns undefined $('div').find('.class').contents()[0].wholeText Any idea on how to solve this? BTW, when I try to stringify this in nodejs, it returns the error Circular defintion The full code: var Crawler = require("crawler").Crawler; var data = {} var c = new Crawler({ maxConnections: 10, skipDuplicates: true, // This will be called for each crawled page callback: function(error, result, $) { // $ is a jQuery instance scoped to the server-side DOM of the page $("#link &gt; ul &gt; li &gt; a").each(function(index, a) { c.queue(a.href); }); $("[id^=enfr]").each(function(index, a){ var fr = $(this).find('.FrWrd strong').html().replace(/&lt;(?:.|\n)*?&gt;/gm, '') var to = $(this).find('.ToWrd').contents()[0] console.log(fr + '\t\t\t\t\t' + to) }) } }); // Queue just one URL, with default callback c.queue("http://www.wordreference.com/enfr/0");
answer count: 1
downvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39558784
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39557676
upvote count: 0

http://stackoverflow.com/a/25280328
answers question: http://stackoverflow.com/q/25280206
has comment: http://stackoverflow.com/comment/39394582
has comment: http://stackoverflow.com/comment/39394649
score: 0
has comment: http://stackoverflow.com/comment/39395442
type: Answer
has body: You can use ng-style in body tag ... Setting different background for different view: set variable named image_path with different values of different views ...

http://stackoverflow.com/comment/39370372
type: QuestionComment
comment on: http://stackoverflow.com/q/25266681
has text: Please, in what page is the HTML? What is the name of the file?
score: 0
type: Comment

http://stackoverflow.com/a/25269778
downvote count: 0
answers question: http://stackoverflow.com/q/25269670
has comment: http://stackoverflow.com/comment/39376316
upvote count: 2
has comment: http://stackoverflow.com/comment/39377710
type: Answer
score: 2
has body: Assuming the that different versions are needed, and the plugins are written following the correct pattern, don't use noConflict, but simply position the scripts such that plugins have access to the correct window.jQuery when they are executed. &lt;script src="js/jquery-1.7.2.min.js"&gt;&lt;/script&gt; &lt;!-- plugins that "only work with" 1.7.2: $/jQuery refer to 1.7.2 --&gt; &lt;script src="js/jquery.slicknav.js"&gt;&lt;/script&gt; &lt;script src="js/jquery-1.9.1.min.js"&gt;&lt;/script&gt; &lt;!-- everything else: $/jQuery refer to 1.9.1 (but consider 1.11+) --&gt; &lt;script src="js/owl.carousel.js"&gt;&lt;/script&gt; The use of giving a different name with noConflict is that so code that knows about the different name can use it - which is not the case for a standard plugin. However, consider simply using the latest 1.x (currently 1.11.1) for all the plugins, as jQuery is very backwards-compatible with few surprising changes (the deprecation roadmap is long). In cases where legacy features are used, there is jquery-migrate.js to shim changes for older code which can eliminate many such migration issues. [jQuery-migrate] can be used to detect and restore APIs or features that have been deprecated in jQuery and removed as of version 1.9.
has comment: http://stackoverflow.com/comment/39376091
has comment: http://stackoverflow.com/comment/39378160
has comment: http://stackoverflow.com/comment/68083976
has comment: http://stackoverflow.com/comment/39397739
has comment: http://stackoverflow.com/comment/39376508

http://stackoverflow.com/a/25278951
upvote count: 1
has body: For this you can use localStorage, When the use clicks on button then save the data and check if data found in localStorage then show it. For egs, $(function(){ $('.radioButton').on('click',function(){ // your code // now set the radio value in localstorage localStorage.setItem('defaultRadio',this.value); }); if(localStorage.getItem('defaultRadio')){ // check that defaultRadio is set or not // if it is set then trigger a click on that radio by its value $('input[value="'+localStorage.getItem('defaultRadio')+'"]').click(); } }); Demo
has comment: http://stackoverflow.com/comment/39392593
has comment: http://stackoverflow.com/comment/39433758
has comment: http://stackoverflow.com/comment/39433632
score: 1
has comment: http://stackoverflow.com/comment/39442413
has comment: http://stackoverflow.com/comment/39395521
has comment: http://stackoverflow.com/comment/39395361
has comment: http://stackoverflow.com/comment/39434467
has comment: http://stackoverflow.com/comment/39434391
downvote count: 0
has comment: http://stackoverflow.com/comment/39393117
has comment: http://stackoverflow.com/comment/39395482
type: Answer
has comment: http://stackoverflow.com/comment/39436938
has comment: http://stackoverflow.com/comment/39392549
answers question: http://stackoverflow.com/q/25278853
has comment: http://stackoverflow.com/comment/39395775

http://stackoverflow.com/comment/39357512
type: QuestionComment
has text: Maybe gzipping is enough for a server supporting SPDY?
score: 0
comment on: http://stackoverflow.com/q/25259098
type: Comment

variables
tag name: variables
tags question: http://stackoverflow.com/q/25348684
tags question: http://stackoverflow.com/q/25340437
tags question: http://stackoverflow.com/q/25355578
tags question: http://stackoverflow.com/q/25332919
tags question: http://stackoverflow.com/q/25357554
tags question: http://stackoverflow.com/q/25278883
tags question: http://stackoverflow.com/q/25234676
tags question: http://stackoverflow.com/q/25342760
tags question: http://stackoverflow.com/q/25374034
tags question: http://stackoverflow.com/q/25350542
tags question: http://stackoverflow.com/q/25325082
type: Tag
tags question: http://stackoverflow.com/q/25354652
tags question: http://stackoverflow.com/q/25320624
tags question: http://stackoverflow.com/q/25343292
tags question: http://stackoverflow.com/q/25365730
tags question: http://stackoverflow.com/q/25387474
tags question: http://stackoverflow.com/q/25384040
tags question: http://stackoverflow.com/q/25242657
tags question: http://stackoverflow.com/q/25318824
tags question: http://stackoverflow.com/q/25341776
tags question: http://stackoverflow.com/q/25259016

http://stackoverflow.com/q/25295236
has comment: http://stackoverflow.com/comment/39423346
has title: How to make a button as default on its keydown?
has answer: http://stackoverflow.com/a/25295292
type: Question
answer count: 2
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39422792
tagged with: http://stackoverflow.com/tag/html
tagged with: asp.net
favorite count: 0
has body: &lt;div class="input-group"&gt; &lt;input type="text" id="srcSchtext" class="form-control" runat="server" placeholder="Search here..." /&gt; &lt;span class="input-group-btn"&gt; &lt;asp:Button runat="server" ID="btnSearchEmployee" Text="Search" class="btn btn-info" /&gt; &lt;/span&gt; &lt;/div&gt; ... function OnEnter_press(e) { e = e || window.event; key = e.keyCode || e.which; if (key == 13) { $('[id$=btnSearchEmployee]').click(); return true; } } whenever I enter text in the textbox and click enter the page is just post backing, every time I have to take my mouse cursor to the button and click it for results. On enter press inside the text box I've to get the search results rather than just postbacking. I tried calling OnEnter_press on keydown of text box, which is still making just the postback.
type: UnansweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/39425233
score: -2
has answer: http://stackoverflow.com/a/25296546

http://stackoverflow.com/comment/39571563
has text: in `$http` data field should be an object try `data:{data:'LOG CHECK'}`, then you should be able to access through `req.query.data`.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25375553

http://stackoverflow.com/a/25360742
has comment: http://stackoverflow.com/comment/39544059
has comment: http://stackoverflow.com/comment/39543590
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39553665
downvote count: 0
has comment: http://stackoverflow.com/comment/39543057
has body: Your input is not clear, so i am assuming you got data something like var result = {"ServiceLevel":[[1390608000000,50],[1392595200000,0]], "NumberOfCalls":[[12,10],[100,0]]}; var arr = $.map(result, function (arr, key) { return { label: key, data: arr }; }); Converting to Array: var arr = $.map(result, function (arr, key) { return { label: key, data: arr }; }); Reading Elements: element at position 1: arr[0].data[0][1] is 1 element at position 3: arr[0].data[2][2] is 3 to get key use: arr[0].label , it will give you "ServiceLevel" arr[1].label , it will give you "NumberOfCalls"
type: Answer
accepted answer of: http://stackoverflow.com/q/25360395
score: 1
has comment: http://stackoverflow.com/comment/39542888
answers question: http://stackoverflow.com/q/25360395
has comment: http://stackoverflow.com/comment/39546239
has comment: http://stackoverflow.com/comment/39542949
has comment: http://stackoverflow.com/comment/39543214
has comment: http://stackoverflow.com/comment/39542976
has comment: http://stackoverflow.com/comment/39546331
has comment: http://stackoverflow.com/comment/39543255
has comment: http://stackoverflow.com/comment/39542774

http://stackoverflow.com/a/25320465
type: Answer
has comment: http://stackoverflow.com/comment/39470270
has comment: http://stackoverflow.com/comment/39471259
has comment: http://stackoverflow.com/comment/39470247
has comment: http://stackoverflow.com/comment/39470505
score: 2
has comment: http://stackoverflow.com/comment/39469623
upvote count: 2
has comment: http://stackoverflow.com/comment/39470725
answers question: http://stackoverflow.com/q/25320346
accepted answer of: http://stackoverflow.com/q/25320346
has comment: http://stackoverflow.com/comment/39469676
has comment: http://stackoverflow.com/comment/39470488
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39470749
has comment: http://stackoverflow.com/comment/39470226
has comment: http://stackoverflow.com/comment/39470168
has body: You need to update your css into this input.ng-invalid { border :1px solid red !important; } the class ng-invalid applies to the form as well since it AngularJS detects that the form is invalid so it applies the class to the form. Edit It seem that you are using a third party module for your forms. It has it's own validation styles so we have to use it. Here are some notes: I added the novalidate directive to your formly directive. This will prevent the browser to trigger its default validation, the browser's default validation will not trigger the ng-submit function if it finds an error. I added an ng-class="{'form-submitted':submitted}" to the form directive itself. (This is similar to the approach of PatrickEvans' answer In relation to Item 2, I modified the CSS to this. The red border will be applied if the form-submitted class is applied to the parent form. .form-submitted input.ng-invalid { border :1px solid red !important; } See Plunkr

http://stackoverflow.com/comment/39368056
has text: It is working for me on desktop Safari 7.05
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25250522

http://stackoverflow.com/a/25381095
type: Answer
answers question: http://stackoverflow.com/q/25380976
has body: There is two way to implement it. Either using javascript or php. The problem with javascript is all browsers does not support this feature and required client permission to trace location. If user does not want to share his location then javascript will prevent it. So best way to use php and you can check out http://www.ipinfodb.com/ this url. This is free ip db list and you can also find php api to implement it. You have to create free account on this site and get a api key and you can use php code like below $location_str = file_get_contents("http://api.ipinfodb.com/v3/ip-country/?key=&lt;your_api_key&gt;ip=".$_SERVER['REMOTE_ADDR'] ); echo $location_Str; you can replace 'ip-country' with 'ip-city' in url if you want city info.
score: 0

http://stackoverflow.com/comment/39387822
comment on: http://stackoverflow.com/a/25276324
score: 1
type: AnswerComment
has text: OH! I just noticed, you're getting `car_value` from the *template*, not from the AJAX call!
type: Comment

http://stackoverflow.com/comment/39503249
has text: @Rabi TogglePane() isn't defined yet as it isn't what I'm trying to work out. When the page loads the ng-init calls Initialize on the MasterController, which (in this instance) tries to find all the divs of class mPanel and figure out the scope of that element. It should return, at least I think it should, PanelController, but always says the scope is the MasterController.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25337528

http://stackoverflow.com/comment/39400073
type: AnswerComment
has text: Thank You for all the effort guys.i have decided to implement this structure in a slightly different way.
comment on: http://stackoverflow.com/a/25281434
score: 0
type: Comment

http://stackoverflow.com/comment/39430058
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25289675
has text: Maybe the following can help you in figuring out how prototype is used. http://stackoverflow.com/questions/16063394/prototypical-inheritance-writing-up/16063711#16063711
score: 0

http://stackoverflow.com/comment/39412569
type: AnswerComment
score: 2
type: Comment
has text: Not only the reason. Also there is new line so should be 'br\n' http://jsfiddle.net/p0rcv62u/2/
comment on: http://stackoverflow.com/a/25289902

http://stackoverflow.com/comment/39521359
score: 2
comment on: http://stackoverflow.com/q/25348900
has text: first you must check if your browser supports localstorage `if (typeof(Storage) != "undefined") { // Store localStorage.setItem("varname","data" ); } else { alert ("Sorry, your browser does not support Web Storage..."); }`
type: Comment
type: QuestionComment

angularjs-routing
tags question: http://stackoverflow.com/q/25319657
tags question: http://stackoverflow.com/q/25333092
tags question: http://stackoverflow.com/q/25279385
type: Tag
tag name: angularjs-routing
tags question: http://stackoverflow.com/q/25330405

http://stackoverflow.com/comment/39535416
has text: What's this `html:form` syntax for? Just curious.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25356642
score: 0

http://stackoverflow.com/q/25386216
has comment: http://stackoverflow.com/comment/39605685
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25394642
upvote count: 1
linked to: http://stackoverflow.com/q/9058774
type: Question
has comment: http://stackoverflow.com/comment/39605845
has title: How to use a global variable in an array index using Handlebars
tagged with: javascript
has body: I am trying to access an object in an array using a global variable. However, it seems that Handlebars does not allow you to do that. Is there a way around this problem? This is my code: Handlebars.js example This will get replaced by handlebars.js I know in this example that I don't need to use a global variable, but with the code that I am using I need to. Please no JQuery, as I can't use it. EDIT:This is what I am trying to do in the each helper. I am going through each of the attributes of one object. In order to do so, I must select an object at a particular index like names.[0] for example.
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/25394642
favorite count: 0
tagged with: handlebars.js
tagged with: ember.js

http://stackoverflow.com/a/25303047
type: Answer
has body: Correct anchor tag as :- &lt;a id="actionId" onclick="Clickfn(@sd.Id)" &gt; and change Clickfn as : &lt;script&gt; function Clickfn(Id) { window.location.href ="/CampDashboard/UpdateCamp?id" + Id; } &lt;/script&gt;
answers question: http://stackoverflow.com/q/25303000
upvote count: 3
has comment: http://stackoverflow.com/comment/39439723
downvote count: 1
score: 2
has comment: http://stackoverflow.com/comment/39437605
has comment: http://stackoverflow.com/comment/39437263
has comment: http://stackoverflow.com/comment/39437226

http://stackoverflow.com/comment/39513087
comment on: http://stackoverflow.com/q/25308135
score: 0
has text: Have you included the Javascript file in which `getNodeClickWithExpand()` is defined?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39432721
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25300619
has text: Except `love` and `ex` I didn't understand a thing in this question and those two automatically split mostly ;)

http://stackoverflow.com/comment/40009527
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25422716
has text: for anyone reading this in the future: I now understand D3 a bit (!) better than before. although you can allocate the data directly via .x() and .y() without using the .data() method it is not the way D3 is meant to be used. i found this [link](http://www.delimited.io/blog/2014/3/3/creating-multi-series-charts-in-d3-lines-bars-area-and-streamgraphs) to be very useful if you're starting out with D3.js and want to build a multi-series chart.

http://stackoverflow.com/comment/39522204
type: QuestionComment
comment on: http://stackoverflow.com/q/25348900
has text: Works ok in this jsfiddle - http://jsfiddle.net/tqum3coo/1/
type: Comment
score: 0

http://stackoverflow.com/comment/39527612
comment on: http://stackoverflow.com/a/25352317
type: AnswerComment
score: 0
type: Comment
has text: @jackweirdy How would it look to define these methods on the prototype if they are private though?

http://stackoverflow.com/comment/39464329
score: 1
has text: In the outermost div add position:relative in css and put image and then iframe. For div.iframe the css will be position:absolute
comment on: http://stackoverflow.com/q/25317582
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39586688
comment on: http://stackoverflow.com/a/25383782
has text: thanks but if i don't have any kind of control on domain2 how can i enable CORS and save ajax call parameters on my db?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39495478
type: QuestionComment
has text: @IngoBürk Ah, yes. I guess it is a bit vague when viewed that way - and why the argument for cron programs being asynchronous is tenuous. An asynchronous programming model relies on the ability to queue "work to be done later in response to an input/event", such that queuing the tasks does not stop the current execution. (Such a queue need not be dynamic, although it most certainly is in JavaScript.)
score: 0
comment on: http://stackoverflow.com/q/25333050
type: Comment

http://stackoverflow.com/q/25324643
has title: Chrome extension: getBackgroundPage() fails only occasionally
tagged with: google-chrome-extension
answer count: 1
accepted answer: http://stackoverflow.com/a/25324775
favorite count: 0
upvote count: 4
has answer: http://stackoverflow.com/a/25324775
type: AnsweredQuestion
downvote count: 0
tagged with: google-chrome
has body: I am developing a Chrome extension and the following code causes an error only sometimes, not always. Most of the times, this extension does work properly, but sometimes it fails to getBackgroundPage() and falls into the "else" section. In popup.js var bg = chrome.extension.getBackgroundPage(); if (bg) { bg.some_function(); } else { this.updateStatus("Browser error. But you don't have to reload the page to fix it. Just switch to any other browser tab and return to fix."); } The background page is handled by eventPage.js manifest.json "background": { "scripts": ["eventPage.js","jquery-2.1.1.min.js"], "persistent": false }, This extension works as a helper tool of CMS, and provide advanced "search &amp; replace" features. It tends to fail when a user edit a lot of texts in the form on the page. And it can be solved either by reloading the page or switching to any other tab then returning to the tab. What is the occasion when popup.js fails to getBackgroundPage() ? and is there any workaround to avoid the issue? Thanks a lot for your insight!
type: Question
tagged with: javascript
score: 4

http://stackoverflow.com/comment/39398931
type: QuestionComment
has text: No, browsers don't send the username to the server. I would be surprised if it is possible in ASP.NET, maybe a IE-specific feature?
score: 0
comment on: http://stackoverflow.com/q/25282656
type: Comment

http://stackoverflow.com/q/25261254
tagged with: twitter-bootstrap-3
has answer: http://stackoverflow.com/a/34318857
type: Question
has comment: http://stackoverflow.com/comment/39360167
has body: I'm trying to make my dropdown menu open by default when my collapsed navbar is opened. Here is a fiddle to show my code so far. Currently, if you click on the navbar when it's in a collapsed state, two links and a dropdown menu are revealed. You have to click again to open the dropdown menu. My aim is to make the dropdown menu open by default and hide the a.dropdown-toggle element when the collapsed navbar is opened. A visual of how I'd like it to look when the collapsed navbar is opened: Link Link Dropdown Action Another action Something else here Separated link One more separated link My first thought was to use display: none on a.dropdown-toggle but that just hides the whole dropdown menu. Hoping someone can suggest something. I'm open to both jQuery and CSS solutions. My markup: Toggle navigation Brand Link Link Dropdown Action Another action Something else here Separated link One more separated link
accepted answer: http://stackoverflow.com/a/25261868
score: 18
possible better answer: http://stackoverflow.com/a/34593181
tagged with: javascript
upvote count: 18
has answer: http://stackoverflow.com/a/34593181
has answer: http://stackoverflow.com/a/36988890
has comment: http://stackoverflow.com/comment/39360731
has title: How to make a Bootstrap 3 dropdown menu open by default when it is inside a collapsed navbar
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39359733
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25261868
tagged with: css
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/comment/39448047
comment on: http://stackoverflow.com/a/25285360
type: AnswerComment
score: 0
type: Comment
has text: @suraj...html5.. will not solve your problem because today also many versions of browser doesn't support html 5...just provide some detail what you want exactly because above code is working perfectly....

http://stackoverflow.com/comment/39326361
comment on: http://stackoverflow.com/a/25243220
type: Comment
has text: Really nice, its true with dynamic more easy. Thanks!
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39459029
has text: @Omar - I think you got it! I tried using `pagecreate` and `pageinit` before posting my question but I obviously had something wrong. Your example seems to be working for me. Thanks so much! If you post an answer I can accept it.
comment on: http://stackoverflow.com/q/25311856
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/comment/39439757
score: 0
type: AnswerComment
has text: I have joined the chat
type: Comment
comment on: http://stackoverflow.com/a/25287892

http://stackoverflow.com/comment/39354136
comment on: http://stackoverflow.com/a/25243607
type: AnswerComment
type: Comment
has text: Just keep in mind that this will break if there is an internal comma in one of your JS array (String) values.
score: 1

http://stackoverflow.com/comment/39359480
comment on: http://stackoverflow.com/q/25260691
type: QuestionComment
has text: Thanks Simon, I am behind you 110%, I have shared this view which is met with hostility as so many peoples jobs depend on their knowledge of these apps. As a market leader Sage are awful in so many areas but our business along with many others are heavily intertwined with Sage with half of our staff dedicated to their systems (Mostly ERP, BI and Accounting). Thank god I'm not on that team and only have to deal with Microsoft and Oracle products.
score: 0
type: Comment

http://stackoverflow.com/comment/39377509
score: 1
type: Comment
has text: this comment actually just answered my next dilemma, thank you this was helpful
type: QuestionComment
comment on: http://stackoverflow.com/q/25269944

http://stackoverflow.com/comment/39355827
type: Comment
has text: I got it working using `$scope.posts = $scope.posts.concat(result)` Thanks for your help
comment on: http://stackoverflow.com/a/25247004
type: AnswerComment
score: 0

http://stackoverflow.com/a/25245136
has body: If you don't have a blue or orange chip, you're effectively trying to get .chipValue from 0 which is undefined and adding it to another number gives you NaN. You can simply iterate over all .chipValue elements within the placement element like so: function chipsBet() { var total = 0; $('.chipPlacement .chipValue').each(function() { total += $(this).data('chipValue'); }); return total; }
score: 2
has comment: http://stackoverflow.com/comment/39329807
has comment: http://stackoverflow.com/comment/39329682
has comment: http://stackoverflow.com/comment/39329841
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39329850
answers question: http://stackoverflow.com/q/25244619
type: Answer
accepted answer of: http://stackoverflow.com/q/25244619
upvote count: 2

ember-data
tags question: http://stackoverflow.com/q/25248010
type: Tag
tags question: http://stackoverflow.com/q/25337564
tags question: http://stackoverflow.com/q/25311708
tags question: http://stackoverflow.com/q/25311778
tags question: http://stackoverflow.com/q/25320985
tags question: http://stackoverflow.com/q/25233259
tags question: http://stackoverflow.com/q/25389620
tag name: ember-data
tags question: http://stackoverflow.com/q/25387634
tags question: http://stackoverflow.com/q/25302363

http://stackoverflow.com/a/25310906
has comment: http://stackoverflow.com/comment/39549709
accepted answer of: http://stackoverflow.com/q/25306449
has comment: http://stackoverflow.com/comment/39540053
has comment: http://stackoverflow.com/comment/39537609
score: 6
has comment: http://stackoverflow.com/comment/39536655
has comment: http://stackoverflow.com/comment/39550656
has comment: http://stackoverflow.com/comment/39540007
has body: You can make use of KO.postbox by the great @RyanNiemeyer I introduced one variable in both the viewmodels each In viewmodel 1 which will publish (shout) the changes once made : self.isVisible = ko.observable(false).publishOn("showDiv"); in viewmodel 2 which will be listning to changes from viewmodel 1 self.isVisible = ko.observable(false).subscribeTo("showDiv"); Then I created one click method in first viewModel to toggle Show Div action (visible : true / false) self.showDiv = function(){ if(self.isVisible()) self.isVisible(false); else self.isVisible(true); } Changed visible binding from your existing markup to this : &lt;div id="container2" data-bind="visible:isVisible"&gt; It now publish changes made in first viewmodel to second viewmodel. This is called pub-sub mechanism. Read more on : https://github.com/rniemeyer/knockout-postbox Fiddle here : http://jsfiddle.net/rahulrulez/0454h205/1/
has comment: http://stackoverflow.com/comment/39537899
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39573412
has comment: http://stackoverflow.com/comment/39536914
has comment: http://stackoverflow.com/comment/39550087
type: Answer
answers question: http://stackoverflow.com/q/25306449
upvote count: 6

http://stackoverflow.com/a/25315076
has comment: http://stackoverflow.com/comment/39460155
has comment: http://stackoverflow.com/comment/39459757
downvote count: 0
has comment: http://stackoverflow.com/comment/39491327
has body: The solution was to add toString() to the fName variable. fName=ret[i].toString(); apparently a value taken from array of string values is not a string? added later: for(var i=0;i&lt;=ret.length-1;i++){ console.log(i, ret[i]); console.log(i, ret[i], ret[i].split('.'), ret[i].split('.').pop()); fName=ret[i].toString(); on the first iteration console says: 0 ["2020.pdf"] index.js:115 Uncaught TypeError: undefined is not a function
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39598652
answers question: http://stackoverflow.com/q/25314564
has comment: http://stackoverflow.com/comment/39459846

http://stackoverflow.com/comment/39486692
comment on: http://stackoverflow.com/q/25329455
score: 0
has text: what error do you get?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25322375
tagged with: css
has answer: http://stackoverflow.com/a/25322739
score: -1
has comment: http://stackoverflow.com/comment/39473744
has body: Hello i am looking for a simple full page image carousel that just pulls images and slides them across the screen without stoping unless hovered i have one that currently works but once it has ran through the sequence its almost as if it is throwing an image on top of each other. i will show you what i have so far this is my sizing script: The actual script: var DYN_WEB = DYN_WEB || {}; DYN_WEB.Event=(function(Ev){Ev.add=document.addEventListener?function(obj,etype,fp,cap){cap=cap||false;obj.addEventListener(etype,fp,cap);}:function(obj,etype,fp){obj.attachEvent('on'+etype,fp);};Ev.remove=document.removeEventListener?function(obj,etype,fp,cap){cap=cap||false;obj.removeEventListener(etype,fp,cap);}:function(obj,etype,fp){obj.detachEvent('on'+etype,fp);};Ev.DOMit=function(e){e=e?e:window.event;if(!e.target){e.target=e.srcElement;}if(!e.preventDefault){e.preventDefault=function(){e.returnValue=false;return false;};}if(!e.stopPropagation){e.stopPropagation=function(){e.cancelBubble=true;};}return e;};Ev.getTarget=function(e){e=Ev.DOMit(e);var tgt=e.target;if(tgt.nodeType!==1){tgt=tgt.parentNode;}return tgt;};Ev.domReady=(function(){var funcs=[];var ready=false;function handler(e){if(ready){return;}if(e.type==="readystatechange"&&document.readyState!=="complete"){return;}for(var i=0,len=funcs.length;i<len;i++){funcs[i].call(document);}ready=true;funcs=[];}if(document.addEventListener){document.addEventListener("DOMContentLoaded",handler,false);document.addEventListener("readystatechange",handler,false);window.addEventListener("load",handler,false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",handler);window.attachEvent("onload",handler);}return function whenReady(f){if(ready){f.call(document);}else{funcs.push(f);}};})();return Ev;})(DYN_WEB.Event||{}); DYN_WEB.Util=(function(Ut){var Ev=DYN_WEB.Event;Ut.$=function(id){return document.getElementById(id);};Ut.augment=function(Obj1,Obj2){var prop;for(prop in Obj2){if(Obj2.hasOwnProperty(prop)&&!Ob…
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25322739
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: JQuery Image Carousel
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39503226
score: 1
comment on: http://stackoverflow.com/a/25338072
has text: you can try this one but hard to set dots at the end of the string with old browser support.http://jsfiddle.net/xuma/nvxd20eL/
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25236138
has body: This is not possible with a javascript alert(). To get similar functionality, you could instead show a hidden &lt;div&gt; which you can hide after a delay. To do this, use something like document.getElementById("myDIV").style.display="block"; setTimeout(function(){ document.getElementById("myDIV").style.display="none"; }, 10000); which would show the div 'myDIV', wait 10 seconds (10000ms), then hide the div. You would also need to set 'myDIV' to display none in your css.
score: 0
answers question: http://stackoverflow.com/q/25236062
type: Answer

http://stackoverflow.com/comment/39455430
comment on: http://stackoverflow.com/q/25312779
score: 0
type: Comment
type: QuestionComment
has text: 1.: You have a typo (?): you never close the `new Can(...)`. 2: Why are you even passing `document.getElementById`? `canvasId` is an HTML element, not an actual ID, and even if it was you would a duplicate ID which is invalid.

http://stackoverflow.com/q/25375101
answer count: 1
has comment: http://stackoverflow.com/comment/39570650
has answer: http://stackoverflow.com/a/25375255
has body: Anyone ever need to hash by object reference in javascript? Maybe you want to group the children of uls by a hash of their DOM nodes, or attributes by instances of constructed objects, or many other things. I have read this and don't want to use Weakmaps until they're stable. The only way I can think to do it is storing parents in an array and enforcing reference uniqueness there, then hashing by the index of the reference in the array. (example is finding all the common UL parents of LIs): var lis = document.getElementsByTagName('li'); // Get all objects var parent, key, li; for (var i=0; i&lt;lis.length; i++ ) { // For every LI storeItemByParent(lis[i], lis[i].parentNode); } var parents = []; var itemsByParent = {}; function storeItemByParent (item, parent){ var key; // Does this parent already exist? if so, use that index as the hash key for (var j=0; j&lt;parents.length; j++) { if(parents[j] === parent) { key = j; break; } } // This is a new parent? If so, track it and use that index as the hash key if (key == undefined) { parents.push(parent); key = parents.length; } // Finally! The lis in a hash by parent "id". itemsByParent[key] = itemsByParent[key] || []; itemsByParent[key].push(item); } Is there a better way to store attributes or children or other things attached to an object instance without adding them as properties of the object itself?
linked to: http://stackoverflow.com/q/6860853
has comment: http://stackoverflow.com/comment/39570706
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25375255
linked to: http://stackoverflow.com/q/21342738
score: 2
type: AnsweredQuestion
downvote count: 0
favorite count: 0
has title: Hash by object reference in javascript
tagged with: hash
has comment: http://stackoverflow.com/comment/39570659
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/39570697
tagged with: dictionary

http://stackoverflow.com/q/25286178
tagged with: javascript
has comment: http://stackoverflow.com/comment/39406066
tagged with: jquery
has comment: http://stackoverflow.com/comment/39405866
linked to: http://stackoverflow.com/q/779379
has title: browser does not show message before a javascript function completes its execution
has answer: http://stackoverflow.com/a/25286416
favorite count: 0
upvote count: 1
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25286416
type: Question
has body: I created a plugin to display a busy indicator in DOM elements like body or divs, but im having a problem with the situation bellow $("body").BusyIndicator(true,"Please wait") validateAndSubmitForm(); $("body").BusyIndicator(true,"Saving") The problem is the first message "Please wait" isn't shown, the function validateAndSubmitForm seems to block the browser, and when it is unlocked, show directly the message "Saving" Someone knows how can i ensure that the first message really are displayed before to execute the function validateAndSubmitForm ?
has comment: http://stackoverflow.com/comment/39407999
has comment: http://stackoverflow.com/comment/39407927
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/39583139
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25377170
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/59580/discussion-between-shin-and-secelite).
type: Comment

http://stackoverflow.com/a/25378181
type: Answer
has comment: http://stackoverflow.com/comment/39576253
has body: Try reading the log after you've submitted it to the list like this: function addToList (GuildId){ $.getJSON('http://visitbrabant.nl.domainpreview.nl/dev/vb/inc/api/set.useritem.ajax/?gId='+GuildId+'&amp;pId=0&amp;eId='+eId, function( data ) { if(data.status == 'error' &amp;&amp; data.error =='user is not logged in'){ alert('TODO:gebruiker is niet ingelogd, opslaan in de cookie'); }else{ console.log(data.planned); if(data.planned == 1){ $('.filteredItem[guildid='+GuildId+'] .addToList').addClass('inlist'); }else{ $('.filteredItem[guildid='+GuildId+'] .addToList').removeClass('inlist'); } console.log($('.filteredItem[guildid='+2+'] .addToList')); } });
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25378103
accepted answer of: http://stackoverflow.com/q/25378103

http://stackoverflow.com/a/25330178
type: AcceptedAnswer
has body: Figured it out! :) It was scope var issue. pickUpServ - factory angular.module('app.pickUpServ', []).factory('pickUpServ', ['$rootScope', '$http', function ($rootScope, $http) { var params = "{'barcodeVal':'" + '12345678' + "','courierType':'" + 'PICKUP' + "','userName':'" + 'aspuser' + "'}"; return { items: [params], getPickUpList: function (data) { $http({ method: 'POST', url: 'app/Service/CourierService.asmx/BarcodeList', data: params, contentType: 'application/json; charset=utf-8', dataType: 'json', }).success(data).error(function (error) { console.log('Error - getPickUpList'); }); }, savePickUpList: function (item) { this.items.push(item); console.log(item); console.log('item --- ' + JSON.stringify(item)); console.log('params --- ' + params); $http({ method: 'POST', url: 'app/Service/CourierService.asmx/BarcodeSave', data: JSON.stringify(item), contentType: 'application/json; charset=utf-8', dataType: 'json', }).success(function(data, status, headers, config){ console.log('Success! - updatePickUpList'); }).error(function (error) { console.log('Error - updatePickUpList'); }); } }; } ]); ScanListCtrl - Controller angular.module('app.scanListCtrl', []).controller('ScanListCtrl', ['$scope', 'pickUpServ', function ($scope, pickUpServ) { //Get Pick Up Data if ($scope.title == 'Pick Up') { $scope.items = pickUpServ.items; pickUpServ.getPickUpList(function (data) { $scope.items = data.d }); $scope.autoAddItem = function () { if (($scope.BarcodeValue + '').length == 8) { pickUpServ.savePickUpList({ "barcodeVal": $scope.BarcodeValue, //CSN: $scope.BarcodeValue, "courierType": "PICKUP", "userName": "aspuser" }); } }; } } ]);
score: 0
accepted answer of: http://stackoverflow.com/q/25289091
type: Answer
answers question: http://stackoverflow.com/q/25289091

wordpress
tags question: http://stackoverflow.com/q/25367445
tags question: http://stackoverflow.com/q/25377214
tags question: http://stackoverflow.com/q/25308285
tags question: http://stackoverflow.com/q/25270848
tags question: http://stackoverflow.com/q/25359053
tags question: http://stackoverflow.com/q/25349738
tags question: http://stackoverflow.com/q/25344982
tags question: http://stackoverflow.com/q/25350989
tags question: http://stackoverflow.com/q/25331343
tags question: http://stackoverflow.com/q/25288964
tags question: http://stackoverflow.com/q/25383758
tags question: http://stackoverflow.com/q/25327974
tags question: http://stackoverflow.com/q/25351030
tags question: http://stackoverflow.com/q/25303911
tags question: http://stackoverflow.com/q/25239045
tags question: http://stackoverflow.com/q/25359704
tags question: http://stackoverflow.com/q/25327581
tags question: http://stackoverflow.com/q/25293429
tags question: http://stackoverflow.com/q/25308776
tags question: http://stackoverflow.com/q/25271328
tags question: http://stackoverflow.com/q/25354726
tags question: http://stackoverflow.com/q/25232512
tags question: http://stackoverflow.com/q/25346226
tags question: http://stackoverflow.com/q/25351471
tags question: http://stackoverflow.com/q/25348333
tags question: http://stackoverflow.com/q/25320796
tags question: http://stackoverflow.com/q/25326911
tags question: http://stackoverflow.com/q/25267158
tags question: http://stackoverflow.com/q/25383000
tags question: http://stackoverflow.com/q/25273501
tags question: http://stackoverflow.com/q/25293882
tag name: wordpress
tags question: http://stackoverflow.com/q/25278600
tags question: http://stackoverflow.com/q/25252145
tags question: http://stackoverflow.com/q/25301269
tags question: http://stackoverflow.com/q/25297768
tags question: http://stackoverflow.com/q/25268057
tags question: http://stackoverflow.com/q/25331754
tags question: http://stackoverflow.com/q/25272679
tags question: http://stackoverflow.com/q/25359214
tags question: http://stackoverflow.com/q/25292339
tags question: http://stackoverflow.com/q/25288393
tags question: http://stackoverflow.com/q/25272136
tags question: http://stackoverflow.com/q/25320279
tags question: http://stackoverflow.com/q/25320795
tags question: http://stackoverflow.com/q/25354988
tags question: http://stackoverflow.com/q/25279916
tags question: http://stackoverflow.com/q/25265485
tags question: http://stackoverflow.com/q/25372439
type: Tag
tags question: http://stackoverflow.com/q/25344199

http://stackoverflow.com/a/25242596
answers question: http://stackoverflow.com/q/25235426
score: 0
type: Answer
has body: $('.filter1 ul li a').on('click',function(e) { window.location.href = "domain.com/site/filter?param" + $(this).data('param') + "=" + $(this).data('param'); }); HTML: Some link1 Some link2 Some link3

http://stackoverflow.com/a/25235635
accepted answer of: http://stackoverflow.com/q/25235457
score: 1
has comment: http://stackoverflow.com/comment/39336376
answers question: http://stackoverflow.com/q/25235457
upvote count: 1
has comment: http://stackoverflow.com/comment/39313379
has body: It's not working because the arrayToDataTable() member function expects an Array as an argument and you're passing a String. One option that could work is first parsing the data that's being passed to you as JSON. The only concern is the single-quotes wrapping Date and Variable. Single-quotes are not valid JSON. If you're in a position to change the response, you could just do this: google.visualization.arrayToDataTable(JSON.parse(loadGraphData)); Otherwise, if you need to deal with the single-quotes, you could replace them with double-quotes, then parse as JSON: google.visualization.arrayToDataTable(JSON.parse(loadGraphData.replace(/'/g, '"'));
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39312435
has comment: http://stackoverflow.com/comment/39339165
has comment: http://stackoverflow.com/comment/39350399
type: Answer
has comment: http://stackoverflow.com/comment/39338352

http://stackoverflow.com/a/25379429
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25373131
type: Answer
answers question: http://stackoverflow.com/q/25373131
downvote count: 0
has body: Solved. The slowness happens when a lot of responses are left open (unconsumed). The solution was to response.resume() them, letting them "spew in nothingness" when a retry is necessary. So in pseudo code: http.get(url, function (response) { if (response.statusCode !== 200) { response.resume() retry() } else { response.pipe(file) } }) My original problem was that I was checking wheter to retry or not too late, forcing me to "spew into nothingness" before having decided, making it impossible to decide not to retry because the data from the response "stream" was already consumed.
score: 1
upvote count: 1

http://stackoverflow.com/q/25286553
has comment: http://stackoverflow.com/comment/39406141
upvote count: 1
has body: I'm working on a simple landing page. I have a jquery file but i dont really know how to hide the fade. I mean i just want to animate the 5 image without fade. What do u think where is the probelm ? http://yourjavascript.com/13873144111/jquery.js - jquery $(document).ready(function() { $(".start").click(function() { $.when($('.start2').fadeIn(2000)).done(function() { $.when($('.start3').fadeIn(2000)).done(function() { $.when($('.start4').fadeIn(2000)).done(function() { $.when($('.start5').fadeIn(3000)).done(function() { $(".start").hide(); setTimeout(function() { $(".start").fadeIn(2000); $(".start2, .start3, .start4, .start5").hide(); }, 3000); }); }); }); }); }); });
has answer: http://stackoverflow.com/a/25286770
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39415186
score: 1
accepted answer: http://stackoverflow.com/a/25286770
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39406199
has title: How do I remove fadeIn?
has comment: http://stackoverflow.com/comment/39406285
tagged with: fadein

http://stackoverflow.com/comment/39418553
type: QuestionComment
comment on: http://stackoverflow.com/q/25292835
has text: I'm trying to replacing `.schedule` in the current document with `.schedule` retrieved from the request. `.schedule` is the only piece of the DOM that needs to be overridden. Hopefully that makes sense :x
score: 0
type: Comment

http://stackoverflow.com/comment/39507623
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25339018
has text: I don't know what that's supposed to do, because your `init()` function doesn't use the argument.
type: AnswerComment

http://stackoverflow.com/q/25306772
has comment: http://stackoverflow.com/comment/39444047
score: 0
has answer: http://stackoverflow.com/a/25307063
has comment: http://stackoverflow.com/comment/39444214
type: AnsweredQuestion
has body: I don't know if I'm asking it the right way, so please excuse me. So here it goes. I have a text input field. I already have some placeholder text in it. But, when the user clicks on that field, I want the placeholder text to disappear and some default text to appear there, which the user cannot delete. So, when the user submits the form, the data recieved should be in this format - "default text that I had kept" + "text the user provided". How do I do that. Here is an exmaple of the input field I have. &lt;input type="text" placeholder="defaultText" class="input"&gt;
possible better answer: http://stackoverflow.com/a/25307063
accepted answer: http://stackoverflow.com/a/25307106
type: Question
has title: How to keep some default text in the input field?
answer count: 2
has comment: http://stackoverflow.com/comment/39444568
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25307106

http://stackoverflow.com/q/25246281
type: Question
answer count: 2
score: 5
downvote count: 0
tagged with: javascript
has body: Is it possible to open a local file on the filesystem/network drive (c:\abc.xlsx or p:\abc.xlsx)? If so, is it possible to do it through a custom extension that I create for Google Chrome?
favorite count: 0
has title: Opening local files from chrome
upvote count: 5
type: UnansweredQuestion
tagged with: google-chrome
has answer: http://stackoverflow.com/a/25246446
has answer: http://stackoverflow.com/a/25246367

http://stackoverflow.com/comment/39581901
has text: Related: http://stackoverflow.com/questions/19509028/at-symbol-inside-urls
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25381446
score: 1

http://stackoverflow.com/comment/39500603
score: 2
has text: AFAIK `name != id` (necessarily) , I never found any documentation explicitly stating that you cannot have 1 element with name="foo" and another with id="foo" (could have missed it), so 1 more level of ambiguity. I didn't see the point in both name and id - until separating them broke a bunch of stuff in GTK3's API (specifically gtkbuilder xml UIs).
type: Comment
comment on: http://stackoverflow.com/a/25325330
type: AnswerComment

http://stackoverflow.com/comment/39614351
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25362609
has text: Escape your data instead putting directly into your query! And separate the php variable from your string. So it should be: $query = "DELETE FROM test WHERE id=" . (int)$id . ";";
type: AnswerComment

http://stackoverflow.com/comment/39601733
score: 0
comment on: http://stackoverflow.com/q/25386613
type: Comment
type: QuestionComment
has text: It's not been thought out too well by the client. I did start to realise it was nonsense but I was trying not to be beaten and was searching for the answer out of interest as much as anything. I appreciate your help Sparky. I have already re-written how I think it should work. Just got to convince the client tomorrow now..!

http://stackoverflow.com/a/25283530
answers question: http://stackoverflow.com/q/25283312
type: Answer
has body: I suggest a workaround.. see if it helps you. Add a hidden element inside the corresponding divs and add the variable names as text to it. I slightly modified your method get_id() to get the variable name from your divs hidden element. function get_id() { console.log($(this)) var selVar= $(this).parent().find('input:hidden:first').text(); alert('selector variable' + selVar); } this will work for you.
has comment: http://stackoverflow.com/comment/39404689
score: 0
has comment: http://stackoverflow.com/comment/39401790

http://stackoverflow.com/a/25355422
accepted answer of: http://stackoverflow.com/q/25355337
type: AcceptedAnswer
downvote count: 0
has body: You're really close to getting what you need. The problem is the $.each loop is looping over several JSON keys/values before getting what you want. A JSON object is accessed through dot notation and you can navigate down each level as shown below. Hope this helps. $.getJSON("http://ddragon.leagueoflegends.com/cdn/4.14.2/data/en_US/rune.json", function(response){ console.log(response); // Has keys for type, version, data, basic // Data is an array of elements console.log(response.data[5001]); // Each entry has properties you access like this. console.log(response.data[5001].name); console.log(response.data[5001].description); console.log(response.data[5001].image.x); console.log(response.data[5001].stats); }); EDIT To iterate over the data array you would do $.each over response.data $.each(response.data, function (index, entry) { console.log(entry.name); console.log(entry.description); });
answers question: http://stackoverflow.com/q/25355337
has comment: http://stackoverflow.com/comment/39533092
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/a/31064694
upvote count: 5
type: Answer
downvote count: 0
score: 5
answers question: http://stackoverflow.com/q/25334276
has body: It is most probably because rails auto-generated an empty coffescript file for you as part of you generating a controller in you project. You also probably renamed the coffescript to a .js In the empty js file you'll find auto-generated comments for coffescript which starts with # instead of // used by javascript. Just remove all comments and you're good to go. EDIT Since the unexpected '#' character was found on line 13079 of your example then you'll find your comments on that same line.

http://stackoverflow.com/comment/39372353
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25268118
has text: Do you have any JS code to show?
type: Comment

http://stackoverflow.com/comment/39429776
type: Comment
score: 0
has text: Maybe try not including php tags in the `src` and see what happens.
comment on: http://stackoverflow.com/q/25298894
type: QuestionComment

http://stackoverflow.com/comment/39455942
has text: [This plugin might help](http://simeydotme.github.io/jQuery-ui-Slider-Pips/). Seems to have responsive behaviour to me.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25311714

http://stackoverflow.com/a/25355976
answers question: http://stackoverflow.com/q/25355882
has comment: http://stackoverflow.com/comment/39534633
type: AcceptedAnswer
has body: If you want to avoid rendering from the assets, you can try doing it this way. I am assuming you know where you need to put the listener in order to catch the AJAX call, and also you can figure out, where you want to place the results when the AJAX comes back with a success status. Then, you want to do something like this: $('whatever_container_they_can_click').on('ajax:success', function(evt, data) { var target = $('#selected_trip'); // Find where is the destination $(target).html(data); }); Change your controller action to: def selected_trip @trip = Trip.find(params[:id]) render :partial =&gt; 'selected_trip', :content_type =&gt; 'text/html' end
has comment: http://stackoverflow.com/comment/39534373
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25355882
has comment: http://stackoverflow.com/comment/39534351
downvote count: 0

http://stackoverflow.com/comment/39660444
type: AnswerComment
type: Comment
has text: Actually when I look at it more closely, it seems like it does the same thing as my old configuration - meaning it refreshes on the first file changed. The thing is that I've got about 10 jade files and when I save one of them, it compiles them all. Therefore, the 'changed' event fires on the first file copied to the destination folder and refreshes before the file I am looking at in the browser is compiled. I will try to make a graph and post it so the problem is clear.
comment on: http://stackoverflow.com/a/25385160
score: 0

http://stackoverflow.com/q/25354288
has title: google maps api conflicting with a div with background-attachment:fixed which overlaps it
favorite count: 0
has comment: http://stackoverflow.com/comment/46679753
upvote count: 2
has comment: http://stackoverflow.com/comment/39531279
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/46679231
has comment: http://stackoverflow.com/comment/39531236
tagged with: css
has body: I have a DIV with a background-attachment: fixed and another DIV further down the page with position:fixed. This is working fine in IE11 and Firefox 31.0 but in in Chrome the div with background-attachment: fixed is scrolling the image with the DIV and has large black blocks across the image's full width, sometimes covering half the image, sometimes in thick bars (like a zebra if you will) If I don't run the google map JS, or have background-attachment: scroll, or have position: static, then all works as you would expect. Am I doing something wrong, is this a bug in Chrome? either way I need to find a way to make it behave as intended (fixed background image and fixed google maps div to window) - so either a correction of my code, or a workaround for a 'bug' would be really helpful. (aside: I also have a fixed DIV at the top for a nav bar but it isn't affecting the issue. I believe this is because it does not stack with the google map) code in full: http://jsfiddle.net/chowie/rodx0v02/3/ HTML: Hobbies text content here CSS: section { position: relative; z-index: 2; overflow:auto; padding: 0px; } JS: function initialize() { var mapOptions = { center: new google.maps.LatLng(51.5028397, -0.2521218), zoom: 15 }; var map = new google.maps.Map(document.getElementById("map"), mapOptions); var marker = new google.maps.Marker({ position: new google.maps.LatLng(51.5028397, -0.2521218), map: map, icon: image, }); }
accepted answer: http://stackoverflow.com/a/30491002
type: AnsweredQuestion
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/43311301
has comment: http://stackoverflow.com/comment/39537068
type: Question
has comment: http://stackoverflow.com/comment/39531121
tagged with: javascript
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/30491002
score: 2
answer count: 1
downvote count: 0

http://stackoverflow.com/a/25263941
has comment: http://stackoverflow.com/comment/39364763
type: AcceptedAnswer
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/39366670
downvote count: 0
has comment: http://stackoverflow.com/comment/39365087
has comment: http://stackoverflow.com/comment/39364600
score: 5
accepted answer of: http://stackoverflow.com/q/25263774
has comment: http://stackoverflow.com/comment/39364976
has comment: http://stackoverflow.com/comment/39364673
answers question: http://stackoverflow.com/q/25263774
has body: You want a textarea to display the contents of logs.php, and update every 2 seconds. I think this should do it: &lt;script&gt; $(document).ready(function(e) { $.ajaxSetup({cache:false}); setInterval(function() { $.get('logs.php', function(data) { $('#chatlogs').text(data); }); }, 2000); }); &lt;/script&gt; &lt;textarea name="" id="chatlogs" style="width:100px; height:100px"&gt;&lt;/textarea&gt; Note you also need to add id="chatlogs" to your textarea for this to work. Let me know in the comments if you need more help.

http://stackoverflow.com/comment/39491392
type: Comment
comment on: http://stackoverflow.com/a/25330801
has text: yeah it is working. Thanks man :) can you resolve this time format issue too ?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39421746
type: Comment
comment on: http://stackoverflow.com/a/25294719
has text: if you look at my second example, it is properly delegated, but like Pointy said that dose not fix the problem.
score: 0
type: AnswerComment

http://stackoverflow.com/a/41721616
type: Answer
has body: If you are tired of trying to use lazy load libraries and haven't managed to make all of it work, I can suggest you to create lazy load script on your own, or you can take a look at this code below. By only using jQuery and without needing any other library, you can use this script to achieve the lazy load (I modified the codes from the original one that I used at work): var doLazyLoad = true; var lazyLoadCounter = 0; var lazyLoadMax = 2; // Maximum number of lazy load done // Button to indicate lazy load is loading, // or when lazy load has reached its maximum number, // this button load data manually. // You can replace this with something like gif loading animation. var $btnLoadMore = $("#btn-lazy-load-more"); // I use AJAX function to get the data on lazy load var ajaxFn = function (enableScrollAnim = true) { var loadingStr = 'Loading...', idleStr = 'Load more', ajaxUrl = 'http://www.example.com/posts', ajaxHeaders = {'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest'}, ajaxData = { start: $('.posts-wrapper .post').length }; $btnLoadMore.text(loadingStr); // You can disable the button to prevent manual loading return $.ajax({ url: ajaxUrl, type: 'GET', dataType: 'json', data: ajaxData, headers: ajaxHeaders, // On success AJAX, append newly loaded data to lazy load container. // Here in my example, the GET request returns data.view i.e. the content, and data.total i.e. total number of posts success: function (data) { var $newLoadedPosts = $(data.view), nlsMarginBottom; $('.posts-wrapper').append($newLoadedPosts); $newLoadedPosts.css('display', 'none').fadeIn(); // Animate auto scroll to newly loaded content if (enableScrollAnim) { $('html, body').animate({ scrollTop: $newLoadedPosts.first().offset().top }); } if ($('.posts-wrapper .post').length &lt; data.total) { $btnLoadMore.text(idleStr); // If you disable the button, enable the button again here } else { // Remove the button when there's no more content to load. // Determined by data.total $btnLoadMore.remove(); } }, …
downvote count: 1
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/25257863

http://stackoverflow.com/comment/39463391
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25317016
has text: Looks really good, but it doesn't appear to be working. As in, literally nothing happens. No errors in the console, either. Oh, and thanks for the `alert()` tip, I didn't know that!
type: AnswerComment

http://stackoverflow.com/comment/45035943
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25282812
has text: This solution is not ideal. Consider this, the `inputValue` could also be a function that is returning an array value as output and you have to get its `length`. You could use `ngInit` or you can call that function multiple times; once to check whether it returns any value or secondly to get its length. That way its running the function multiple times.
type: Comment

http://stackoverflow.com/comment/39559179
comment on: http://stackoverflow.com/a/25368789
score: 0
type: Comment
has text: @Tim I think technically that's another question... but one idea I just had is to do some deferred chaining. `d1` is your AJAX call that gets the rows. Don't pass it to `$.when`. Create another deferred yourself: `var d2 = $.Deferred();`. Pass `d2` to `$.when`. When `d1` is done, have a done handler populate the rows and then resolve `d2` (`d2.resolve()`). That way the rows will be populated before `d2` is resolved, and the `$.when` promise doesn't resolve until `d2` does, so you have a transitive wait on your row population. Make sense? It sounds kinda hacky to me, but should work.
type: AnswerComment

http://stackoverflow.com/comment/39467904
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25319524
has text: If you format your code properly and consistently, it's easier to read.

http://stackoverflow.com/a/25251729
upvote count: 1
has comment: http://stackoverflow.com/comment/39345499
has body: If I'm understanding you correctly, you'll want your controller action to render javascript. Do something like this: def follow_or_unfollow @store = Store.find(params[:store_id]) if current_user.voting_for?(@store) current_user.unvote_for(@store) else current_user.vote_for(@store) end respond_to |format| format.js end end and then in your views make a file called follow_or_unfollow.js and paste this in it: $("#&lt;%= @store.id %&gt;").html("&lt;%= escape_javascript( render partial: 'favorite_index', locals: {store: @store} ) %&gt;"); note the "#" at the beginning of the jquery so it knows this is an ID. Finally make sure _favorite_index.html.erb exists somewhere in the same directory and renders the new button state.
type: Answer
has comment: http://stackoverflow.com/comment/39348183
has comment: http://stackoverflow.com/comment/39351179
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39352755
has comment: http://stackoverflow.com/comment/39347016
accepted answer of: http://stackoverflow.com/q/25251080
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25251080
has comment: http://stackoverflow.com/comment/39344785
has comment: http://stackoverflow.com/comment/39343112

http://stackoverflow.com/comment/39406564
score: 0
type: Comment
has text: Common JS should not be concatenated with specific JS for each page. That just reloads the common JS instead of caching it. Either have a common.js and a page-specific.js file for each page, or just load all the page specific code up front.
type: AnswerComment
comment on: http://stackoverflow.com/a/25286751

http://stackoverflow.com/comment/39479062
comment on: http://stackoverflow.com/q/25325520
has text: As per the 1st comment, the javascript will 1st change the image 3 seconds after the body has loaded, How ong that takes it down to network latency,
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25302521
answer count: 2
has answer: http://stackoverflow.com/a/25304074
has comment: http://stackoverflow.com/comment/39436544
has title: Selecting checked checkboxes out of multiple checkboxes
tagged with: javascript
tagged with: jquery
tagged with: ajax
has body: function getParam() { alert($("#paramNameVal").val()); // $paramName=$('#paramName'); alert("Hi"); var checkboxes; $("D1").change(function() { $("checkboxes").append("D1"); }); alert($("#checkboxes").val()); var interval = document.getElementById('time').value; $("#showParam1").html(""); $.ajax({ type: "POST", url: "dojo_Getgrid.action", data: { Interval: interval, Userlist: $("#paramNameVal").val(), checkID: checkboxes }, // data: { ,}, //data:$("#paramName").val(), success: function(response) { console.log(response); alert(response); $("#showParam1").html(response); // document.getElementById("showParam").style.display='block'; } }); } Hello .what I am trying to do is that ,I have got 7 checkboxes on screen representing days of the week ,,and there is a save button on click of that button ,I want to send the id/name of all those checkboxes which have been checked by user along with the ajax call to the java class , so that I can know all the days for which user has checked the corresponding checkbox . till now I have used .change function ,if value of that checkbox is changed then a constant representing id of checkbox is saved in variable names checkboxes and ultimatley send this variable checkboxes to java class along with ajax call $("D1").change(function() { $("checkboxes").append("D1"); }); but when i used alert($("#checkboxes").val()); to know ,what is ultimatley stored in that variable checkboxes ,it shows undefined as and alert .. here is my JSP page :- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="s" uri="/struts-tags"%> <%@ taglib prefix="sj" uri="/struts-jquery-tags"%> <%@ taglib prefix="sjg" uri="/struts-jquery-grid-tags"%> <s:label key="Master.Title" /> <sj:head debug="true" jqueryui="true" /> <s:set name="theme" value="'simple'" scope="page" /> <%-- --%> <s:form name="parameterGrid" theme="simple" > <s:label key="Everyday"></s:label> <s:checkbox name="All" id="All" theme="simple" onclick="ch…
score: 0
tagged with: checkbox
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39436705
has comment: http://stackoverflow.com/comment/39436368
has comment: http://stackoverflow.com/comment/39436498
has answer: http://stackoverflow.com/a/25302985
has comment: http://stackoverflow.com/comment/39437311
type: Question

rxjs
tags question: http://stackoverflow.com/q/25296168
tags question: http://stackoverflow.com/q/25338930
type: Tag
tag name: rxjs
tags question: http://stackoverflow.com/q/25381976

http://stackoverflow.com/q/25303420
has comment: http://stackoverflow.com/comment/39556401
score: 1
tagged with: java
linked to: http://stackoverflow.com/q/20910870
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/19039740
downvote count: 0
tagged with: jsp
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25381269
favorite count: 0
has title: Manipulating and storing Java hashmap(map of map) in java script at JSP to use later in combo menu
has answer: http://stackoverflow.com/a/25303569
has comment: http://stackoverflow.com/comment/39437891
has comment: http://stackoverflow.com/comment/39449006
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/5686735
upvote count: 1
has body: I have a hashmap as variable in baking bean like. private Map&lt;String, Map&lt;String, String&gt;&gt; states; At JSP page, I have two combo menu 1st is for country and second is for states. I need to populate second combo menu based on selected country on first combo menu, Mapping is there at above hash map. Any suggestions. I am using spring mvc and jsp. I can access above map at javascript using stateMap ='${resetForm.states}'; But it will be a string. Please help Thanks
tagged with: spring-mvc

http://stackoverflow.com/a/25457106
has body: Simple. Eventhough the angular docs do not mention ng-checked, it is available. &lt;input type="radio" name="radius" ng-change="handleRadioClick(radius)" ng-checked="radius.checked"&gt;
has comment: http://stackoverflow.com/comment/46260898
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25389701
type: Answer
answers question: http://stackoverflow.com/q/25389701
score: 4

http://stackoverflow.com/q/25294262
answer count: 1
linked to: http://stackoverflow.com/q/11245119
has answer: http://stackoverflow.com/a/25295130
has body: I want to be able to show a div inside a scrollable parent div wherever the mouse is clicked. I tried implementing JAVAGeek's answer to this question (using the tempX and tempY values to specify the left and top attributes of the div's CSS) but it doesn't account for scrolling properly, i.e. if I scroll down in the parent div and click the div doesn't appear where I clicked. How do I show a div at the absolute position of my click even if it's inside of a scrollable parent? Thanks
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39421888
has comment: http://stackoverflow.com/comment/39421943
accepted answer: http://stackoverflow.com/a/25295130
type: Question
has title: Show div at mouse click position, accounting for scrolling
tagged with: javascript
has comment: http://stackoverflow.com/comment/39421429
score: 0

http://stackoverflow.com/a/25279515
has comment: http://stackoverflow.com/comment/39393182
score: 0
has body: OK, using the DHTML datepicker, look for the three lines in GetDate() that read m=sm; d=sd; y=sy; That should be line 28. Add this: if ( new Date(y, m, d) &lt; now ) { y = now.getFullYear(); m = now.getMonth(); d = now.getDate(); } Hope that helps. By the by, unless you're heavily invested in this old datepicker, I'd recommend you pick another one that has wider support.
type: Answer
answers question: http://stackoverflow.com/q/25279113

http://stackoverflow.com/a/25240464
score: 0
type: Answer
has body: Above code is working fine ..... but while integrating it with your code it make be possible page is getting refreshed or submit button is triggering a postback which makes the textbox empty. One thing which cab be done is instead of type as "submit" normally use button
answers question: http://stackoverflow.com/q/25240122

http://stackoverflow.com/q/25256482
type: Question
has title: some javascript code doesn't working - if() sentence in event-handler 'onclick'
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39351530
has body: var head = document.getElementById('head'); var navMain = document.getElementById('navMain'); var navLinks = document.getElementsByClassName('navLink'); var floatEnder_1 = document.getElementById('floatEnder_1'); var iMainContents = document.querySelector('iframe#iMainContents'); // function change class of #head function changeHeadClass(from, to) { if(head.className === from) {head.className = to;} }; // event : click #navMain navMain.onclick = function(){ changeHeadClass('head','head_small'); floatEnder_1.style.display = 'none'; if(iMainContents.style.display == 'none') { iMainContents.style.display = 'initial'; }; } Please watch above codes. I'm trying to do unobtrusive js coding, but it is more difficult than insert js event code in html. When you see above, most of codes are works fine. but only one sentence, if(iMain...) isn't working. I read 'javascript definition guide 5th' and console report of browsers, but can't find the reason of the problem... http://jsfiddle.net/40ee6ady/ I wrote my codes above there.
score: -1
has answer: http://stackoverflow.com/a/25256607
downvote count: 1
has comment: http://stackoverflow.com/comment/39352045
upvote count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39351430
has answer: http://stackoverflow.com/a/25257197
answer count: 4
has comment: http://stackoverflow.com/comment/39351669
has answer: http://stackoverflow.com/a/25256664
has answer: http://stackoverflow.com/a/39093336
favorite count: 0
linked to: http://stackoverflow.com/q/14028959

http://stackoverflow.com/comment/39522840
type: Comment
comment on: http://stackoverflow.com/q/25340931
score: 0
type: QuestionComment
has text: @Khashayar.P I understand it's an angular app, but there wasn't any angular code. Also - it would appear that it turned out to be a firebase thing.

http://stackoverflow.com/comment/39454630
type: Comment
has text: Please, point - to __where__ OP wants "web-solution". Note, that he even mentioned the way that I've implemented as an acceptable option (but stated that didn't implemented becase is unfamiliar with such programming)
type: AnswerComment
comment on: http://stackoverflow.com/a/25264394
score: 0

http://stackoverflow.com/a/25318343
score: 0
type: AcceptedAnswer
type: Answer
has body: I suggest to use Css Transitions And Then use jquery to add the class to element: $(document).ready(function() { $('.blog-subscribe-hidden').addClass('animated'); }); Working Fiddle: http://jsfiddle.net/tXumG/14/
accepted answer of: http://stackoverflow.com/q/25318097
has comment: http://stackoverflow.com/comment/39465983
answers question: http://stackoverflow.com/q/25318097

http://stackoverflow.com/comment/39509175
score: 2
comment on: http://stackoverflow.com/q/25341504
has text: I don't see how CSS, CSS3, nor HTML5 figure into this question at all.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25245562
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25245470
has comment: http://stackoverflow.com/comment/39331168
type: Answer
score: 2
upvote count: 2
has body: Value is a property, not an attribute. To access, use: document.getElementById("pnr").value=this.textContent; .
answers question: http://stackoverflow.com/q/25245470

http://stackoverflow.com/a/40918306
answers question: http://stackoverflow.com/q/25313934
score: 0
type: Answer
has body: One alternative to creating a new directive is to just use angulars ngKeydown. Note: Do not use ngKeyup b/c that event fires after ngSubmit. Template: &lt;input type="text" ng-model="x" ng-keydown="$event.which === 13 ? fn($event) : null;" /&gt; Controller: $scope.fn = function($event) { if(_.isObject($event)) { $event.preventDefault(); } // Continue with whaterver this fn is supposed to do };

http://stackoverflow.com/q/25298063
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/53125031
tagged with: java
has answer: http://stackoverflow.com/a/53125031
type: Question
upvote count: 4
answer count: 2
tagged with: encoding
downvote count: 0
tagged with: url
has body: I am trying to pass this strings in the URL which contain special characters and the only way I can get it to work is with JavaScript encodeURIComponent('testerๆ๘ๅ') which produces "tester%C3%A6%C3%B8%C3%A5" Everything I try to do in Java produces different encodings, and do not work on the other end... Any idea how I can get testerๆ๘ๅ encoded to tester%C3%A6%C3%B8%C3%A5 in Java? Thanks in advance! package com.mastercard.cp.sdng.domain.user; import org.apache.commons.lang.StringUtils; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.script.ScriptException; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.net.URLEncoder; public class UrlEncodingSample { public static void main(String[] args) { String userId = "dummy"; try { validateEncoding(userId); userId = "testeræøå"; validateEncoding(userId); userId = URLEncoder.encode(userId); validateEncoding(userId); } catch (UnsupportedEncodingException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } } private static void validateEncoding(String userId) throws UnsupportedEncodingException { System.out.println("------ START TESTING WITH USER ID = '"+userId+"' ----------------------"); System.out.println("Test URLEncoder.encode(userId): " + URLEncoder.encode(userId)); System.out.println("Test URLEncoder.encode(userId,\"UTF-8\"): " + URLEncoder.encode(userId, "UTF-8")); System.out.println("Test URLEncoder.encode(userId,\"UTF-16\"): " + URLEncoder.encode(userId,"UTF-16")); System.out.println("Test URLEncoder.encode(userId,\"UTF-16LE\"): " + URLEncoder.encode(userId,"UTF-16LE")); System.out.println("Test URLEncoder.encode(userId,\"UTF-16BE\"): " + URLEncoder.encode(userId,"UTF-16BE")); ScriptEngine engine = new ScriptEngineManager().getEngineByName("JavaScript"); try { System.out.println("Test engine.eval(\"encodeURIComponent(\\\"\"+userId+\"\\\")\"): " + engine.eval("encodeU…
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/25298843
tagged with: utf-8
favorite count: 0
has title: How to get Java to match JavaScript encodeURIComponent() method?
accepted answer: http://stackoverflow.com/a/25298843

http://stackoverflow.com/comment/39436938
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/59333/discussion-between-user3201640-and-rohan-kumar).
comment on: http://stackoverflow.com/a/25278951
score: 0
type: AnswerComment

http://stackoverflow.com/q/25325616
type: Question
has answer: http://stackoverflow.com/a/25336837
has comment: http://stackoverflow.com/comment/39490040
has title: How to get multiple datepickers to work with altFields?
tagged with: jquery-ui
tagged with: javascript
has comment: http://stackoverflow.com/comment/39479700
has answer: http://stackoverflow.com/a/25331573
answer count: 2
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: datepicker
accepted answer: http://stackoverflow.com/a/25331573
score: 2
type: AnsweredQuestion
has body: In my application I have a form for invoices which can have multiple items. Each item has a date consisting of an input field (where the user can enter the date in his preferred format) and a hidden field (which gets sent to the database when the form gets submitted). Each items gets added to the invoice dynamically with jQuery. &lt;div class="item"&gt; &lt;input class="display_date" id="display_date_1" type="text" value="15.08.2014"&gt; &lt;input class="real_date" id="real_date_1" type="text" value="2014-08-15"&gt; ... &lt;/div&gt; &lt;div class="item"&gt; &lt;input class="display_date" id="display_date_2" type="text" value="16.08.2014"&gt; &lt;input class="real_date" id="real_date_2" type="text" value="2014-08-16"&gt; ... &lt;/div&gt; &lt;div class="item"&gt; &lt;input class="display_date" id="display_date_3" type="text" value="17.08.2014"&gt; &lt;input class="real_date" id="real_date_3" type="text" value="2014-08-17"&gt; ... &lt;/div&gt; My question is: How can I get the datepicker to work on all these (dynamically added) items? This is my jQuery but it doesn't work: $(function() { $('.display_date').each(function(){ $(this).datepicker({ dateFormat: "dd M yy", // format shown to the user altField: "#" + $(this).attr('id'), altFormat: "yy-mm-dd" // format for database processing }); }); }); Thanks for any help.
upvote count: 2
possible better answer: http://stackoverflow.com/a/25336837

http://stackoverflow.com/q/25331016
tagged with: jquery-ui
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25331880
tagged with: jquery
tagged with: jquery-ui-draggable
type: UnansweredQuestion
has body: I'm writing an application with draggable fields (the divs). Before these fields are placed they are one size but then once they are picked up and being dragged they change to their "final" size (the size can change at a later time too, but they stay the dragged size until it's changed manually later). What I'm trying to do is center the div relative to the cursor when the div is being dragged. I know about the cursorAt property of draggable objects, but it's not working when you drag the object for the first time. If you drag, drop, and drag again it will center correctly. Fiddle demonstrating the issue. $('div').draggable({ start: function () { $(this) .css('height', (Math.floor((Math.random() * 250) + 100).toString() + 'px')) .css('width', (Math.floor((Math.random() * 250) + 100).toString() + 'px')); $(this).draggable('option', 'cursorAt', { top: parseInt($(this).css('height')) / 2, left: parseInt($(this).css('width')) / 2 }); } }); Obviously that's just an example, but it demonstrates the point because it will never center the div relative to the cursor. I figured that since I'm setting the CSS first that it should be doing it correctly, but it doesn't. I've also tried moving the changing of the size to the mousedown event in to make sure the CSS get's changed first (in case for some reason it wasn't...was just a way to make sure) but it still doesn't work correctly. And I also tried calculating the new sizes first, and then using the variable to do the calculations instead of relying on the CSS values. Still didn't work.
type: Question
has title: Center draggable div relative to cursor when the size of the div changes

http://stackoverflow.com/a/25269457
has comment: http://stackoverflow.com/comment/39391425
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25259092
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25259092
type: Answer
has body: The addHTML call is async, so you have to wait for completion before trying to use the pdf output. Also, with a FileWriter an "arraybuffer" output is best suitable. Try this: function gotFileWriter(writer) { writer.onwriteend = function (evt) { console.log("contents of file now 'some sample text'"); // ... }; var pdf = new jsPDF('p', 'pt', 'a4'); pdf.addHTML(document.body, function () { writer.write(pdf.output('arraybuffer')); }); }
downvote count: 0
score: 2

http://stackoverflow.com/comment/39586903
comment on: http://stackoverflow.com/a/25383959
score: 0
type: AnswerComment
has text: I already said this in a comment from an answer which was deleted by the author. I am not using real "animations", I just insert data with `html()` and select a dropdown version with `prop()` - all necessary steps are mentioned in my first comment in the original question.
type: Comment

http://stackoverflow.com/q/25326659
tagged with: servlets
has title: Sign In validation JSP
score: 0
tagged with: validation
tagged with: jsp
has body: I'm developing a website that requires my validation of the sign in page. For that I created text fields on the sign in form. and validated them with my database using scriptlets. In scriptlet, I checked for the entered username and password in the database. I want to add javascript event to the 'if else' condition in the scriptlet i.e. if the username from the database is empty, it show perform certain events and if not(else), it should perform some other events. Any way to do so??
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39598530
has comment: http://stackoverflow.com/comment/39481161
answer count: 0
tagged with: scriptlet
has comment: http://stackoverflow.com/comment/39567461
type: Question
has comment: http://stackoverflow.com/comment/39518082
tagged with: javascript

http://stackoverflow.com/a/28119215
score: 0
has body: This also should work with newer versions of extjs (>=5): var allRecords = store.getData().getSource() || store.getData(); allRecords.removeAll();
type: Answer
answers question: http://stackoverflow.com/q/25311644

http://stackoverflow.com/q/25312281
tagged with: javascript
tagged with: jquery
tagged with: slim
has answer: http://stackoverflow.com/a/25312906
score: 0
tagged with: rest
answer count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39454570
has body: I have an Asynchronous call in jQuery where a POST request returns an HTTP 200, but there is no response text or anything to work with from the endpoint in question. I'm confused as to what could be the cause on my Localhost, as when I use the same call to poll a service like JSONTest, I get a valid object back in return. This is what the result endpoint looks like, written in PHP using Slim $app-&gt;post("/search", function() use ($app) { try { $request = $app-&gt;request; $body = $request-&gt;getBody(); $input = json_decode($body); //Prepare search string $query = "%". $input-&gt;query . "%"; $grade = '%grade ' . $input-&gt;grade . "%"; $meta = $input-&gt;meta; $proc_results = array(); $item = new stdClass(); $item-&gt;id = 1; $item-&gt;source = "source"; $item-&gt;type = "lesson_plan"; $item-&gt;description = "Description of the Lesson Plan"; $item-&gt;date_created = 1234567890; $proc_results[] = $item; $app-&gt;response()-&gt;header('Content-Type','application/json'); $app-&gt;response()-&gt;body(json_encode($proc_results)); } catch (Exception $e) { } }); This call does return a JSON response when using a utility like POSTMAN, but when I use the following test jQuery code, I get an Object that has no responseText or any sign that my interpreter has the object. $.ajax({ "type":"POST", "url":"http://localhost:9001/search", "data":{"query":"math","grade":"4"} }).done(function(result) { console.debug(result); }); Am I missing a component in my done() call to poll the resources? Is my Slim call sending malformed JSON? If needed I can get a working demo up online.
has answer: http://stackoverflow.com/a/25312353
has answer: http://stackoverflow.com/a/25313670
has title: jQuery Ajax call not returning anything
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/39454621

http://stackoverflow.com/tag/csv
type: Tag
tags question: http://stackoverflow.com/q/25266844
tags question: http://stackoverflow.com/q/25314440
tag name: csv
tags question: http://stackoverflow.com/q/25293465
tags question: http://stackoverflow.com/q/25253204
tags question: http://stackoverflow.com/q/25317329
tags question: http://stackoverflow.com/q/25284570
tags question: http://stackoverflow.com/q/25308224
tags question: http://stackoverflow.com/q/25301960
tags question: http://stackoverflow.com/q/25239478
tags question: http://stackoverflow.com/q/25299276
tags question: http://stackoverflow.com/q/25295862

http://stackoverflow.com/q/25294176
type: Question
has comment: http://stackoverflow.com/comment/39421188
tagged with: javascript
has comment: http://stackoverflow.com/comment/39421298
answer count: 3
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
tagged with: drop-down-menu
favorite count: 0
tagged with: angularjs
has body: I'm trying to make a menu where I can change the "cell" property of a person. Cells are defined as: Cells: [ { name: 'NE', id: 1 }, { name: 'NW', id: 2 }, { name: 'SE', id: 3 }, { name: 'SW', id: 4 } ] My html code &lt;div&gt;&lt;select ng-model="ui.returnedPeopleList[row.rowIndex]" ng-options="cell for cell in Cells"&gt;&lt;/select&gt;&lt;/div&gt; returnedPeopleList is an array of people. Basically what I have is a grid of people. Double clicking a person opens a modal instance where you can change their properties (hence, the row.rowIndex). The row is passed to the instance modal instance, where the changes are made. I'm not sure how much of this is relevant to the dropdown; I'm pretty new to angular. The dropdown menu is empty, and I have no idea what's wrong. Thanks in advance.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/31248903
has answer: http://stackoverflow.com/a/25294340
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39421373
has comment: http://stackoverflow.com/comment/39421620
has title: Dropdown menu not populating (angular)
has answer: http://stackoverflow.com/a/25294308

http://stackoverflow.com/q/25266770
has comment: http://stackoverflow.com/comment/39370007
has body: I'm looking for a way to select one div out of the sixteens and that one needs to change it CSS backgrounds. It also needs to happen every second, so every second a new div is selected from the other ones. I'm getting stuck with the every second part, this is a part from what I have(not self-made): jsFiddle My HTML code: Random plaatjes Plaatjes 1 Plaatjes 2 Plaatjes 3 Plaatjes 4 Plaatje 1 Plaatje 2 Plaatje 3 Plaatje 4 Plaatje 1 Plaatje 2 Plaatje 3 Plaatje 4 Plaatje 1 Plaatje 2 Plaatje 3 Plaatje 4 Plaatje 1 Plaatje 2 Plaatje 3 Plaatje 4 In my way, I want a random id="cell" to be selected every second with an red border or something. If you guys good help me get to the right way I would really appreciate it! Thanks for the help, and sorry for my bad English(not my mother tongue).
has title: Jquery select random cell every second
type: Question
has answer: http://stackoverflow.com/a/25266951
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25267091
score: 0
answer count: 3
accepted answer: http://stackoverflow.com/a/25266951
has comment: http://stackoverflow.com/comment/39370026
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39369845
has comment: http://stackoverflow.com/comment/39369916
has answer: http://stackoverflow.com/a/25266944
has comment: http://stackoverflow.com/comment/39370041
has comment: http://stackoverflow.com/comment/39369955
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25266944

http://stackoverflow.com/comment/39341596
has text: sometimes you want to act on a group instead of a single context. also good for "".split...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25251159
score: 0

http://stackoverflow.com/q/25317904
downvote count: 1
has comment: http://stackoverflow.com/comment/39464951
type: Question
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25317966
has answer: http://stackoverflow.com/a/25317966
score: 0
has body: I am running the code below in chrome's console. I would like filteredArr to contain 3 objects however I am getting the empty {} as a fourth. The idea is to filter through the flags array and return objects with key == true(or === true - not sure which one works) and the values of true keys append to filteredArr. Any help is appreciated! var flags = [ { usa: ["red", "white", "blue"] }, null, { germany: ["red", "yellow", "black"] }, {}, { jamaica: ["green", "yellow", "black"] }, "", undefined]; var filteredArr = flags.filter(function(val) { return !(val === "" || typeof val == "undefined" || val === null || typeof val == "null"); }); filteredArr;
has answer: http://stackoverflow.com/a/25317976
favorite count: 0
has comment: http://stackoverflow.com/comment/39464966
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39464997
has title: How to use javascript filter function
accepted answer: http://stackoverflow.com/a/25317976

http://stackoverflow.com/q/25361889
has comment: http://stackoverflow.com/comment/39544812
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39544757
has comment: http://stackoverflow.com/comment/39544822
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25361973
accepted answer: http://stackoverflow.com/a/25361973
has body: I am working on a project, where I want to show a second tab active on window load, but it always active the first tab. Here is my script: &lt;script&gt; $(document).ready(function() { $('#tabs div').hide(); $('#tabs div:first').show(); $('#tabs ul li:first').addClass('active'); $('#tabs ul li a').click(function() { $('#tabs ul li').removeClass('active'); $(this).parent().addClass('active'); var currentTab = $(this).attr('href'); $('#tabs div').hide(); $(currentTab).show(); return false; }); }); &lt;/script&gt; The problem is, when I write second in place of first it doesn't work.
has answer: http://stackoverflow.com/a/25361942
has title: How to active second tab instead of first one using JavaScript?
type: Question
possible better answer: http://stackoverflow.com/a/25361942
tagged with: javascript

http://stackoverflow.com/a/25276583
answers question: http://stackoverflow.com/q/25276223
has body: The documentation for the $q.reject() method shows how you can "catch" the rejection callback and recover from it. In this case you can just return a new value from the rejection function and $q will treat the promise as being resolved: writeRes.then(function(data, status, headers, config){ $scope.scope.param_values.push(data.id); //array of IDs relevant to the REST framework. }, function(error){ // handle the error and recover return true; });
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39405426
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25276223
score: 1

http://stackoverflow.com/comment/39501883
type: AnswerComment
type: Comment
has text: okay so more like this? `client.listDevices().then(function(){dosomething},function(){dosomethingforerror},function(){dosomethingforprogress})` i appreciate your help. each response im getting more understanding of how this works. If the above is correct, what would cause an error for listDevices() if not that no device is connected?
comment on: http://stackoverflow.com/a/25336666
score: 0

http://stackoverflow.com/a/25309447
upvote count: 2
answers question: http://stackoverflow.com/q/25309300
score: 2
downvote count: 0
has body: What you're currently doing with your jQuery selector is actually specifying a namespace/context for selecting an element. $('selector', 'place-to-look'). You're telling jQuery to look for selector as a child of the context element place-to-look, which, in this case, you're looking for a &lt;dd&gt; located under another &lt;dd&gt; that's second in the outer list. ... which doesn't exist! (Oh no!) I'm sure others will give you the answer of 'syntax error', but I thought you might like to know what you're doing as opposed to selecting in the same set of quotes like so: $('dd:nth-child(1), dd:nth-child(2)').
type: Answer

http://stackoverflow.com/comment/39465199
score: 1
type: QuestionComment
has text: @vch the `change` event only includes the DOM element, not the Range object. This would be a useful addition though.
type: Comment
comment on: http://stackoverflow.com/q/25317494

http://stackoverflow.com/comment/39480803
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25324888
has text: model hook contain: return this.store.find('consultation'); and in beforeModel I want add additional fields
score: 0

http://stackoverflow.com/q/25288307
score: 6
linked to: http://stackoverflow.com/q/9246438
type: Question
tagged with: phantomjs
has body: I have a very simple HTML form that I'm attempting to test with various kinds of data. I wrote a prototype proof-of-concept in MS Access/VBA using the IE object. It worked fine but the finished testing product has to use PhantomJS. I've got the page-interfacing to work and the form is populating just fine. Where I'm stuck is getting the submit button to fire. I've combed through S.O. and tried all suggestions and nothing is working. I'm using PhantomJS 1.9.7 and using straight JavaScript test scripts. I tried various JavaScript techniques to fire the submit button. To satisfy the "Just use JQuery" crowd, I tried that too. Nothing is working. When I render the form at the end of the test script, I see the form populated with data patiently waiting for the <search> button to be clicked. Here's a summary of what I tried: document.getElementById('btnSearch').click(); $("btnSearch").click(); var el = document.getElementById('btnSearch'); // Get search button object $(el).click(); document.getElementById('Form1').submit(); Tried creating a click event and firing it from the button object (in the code below) Tried creating a click event and firing it from the body object with the coordinates of a point inside the button in question Here's the form: (And please, no comments/debates on the lack of CSS, use of tables, etc. I have no say or influence over the people who created the site.) Da Site Street Address: City: State: AL - Alabama AK - Alaska [The rest of the other states] WI - Wisconsin WY - Wyoming PR - Puerto Rico Zip Code: Here's the JavaScript to drive the form: var maxtimeOutMillis = 3000; var start; var finish; var page = require('webpage').create(); // Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") page.onConsoleMessage = function(msg) { console.log(msg); }; page.open('http://www.MadeUpURL.com/', function(status) { page.includeJs("http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", functio…
tagged with: javascript
tagged with: forms
has comment: http://stackoverflow.com/comment/39414848
has comment: http://stackoverflow.com/comment/39414756
has comment: http://stackoverflow.com/comment/39413608
tagged with: automated-tests
downvote count: 0
answer count: 1
has title: PhantomJS and clicking a form button
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25691331
has comment: http://stackoverflow.com/comment/39415344
upvote count: 6
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25691331
has comment: http://stackoverflow.com/comment/39413330

http://stackoverflow.com/q/25370751
has title: Can't submit JSON object to JSP
answer count: 3
has comment: http://stackoverflow.com/comment/39562370
upvote count: 1
has answer: http://stackoverflow.com/a/25371476
favorite count: 0
has comment: http://stackoverflow.com/comment/39562267
has comment: http://stackoverflow.com/comment/39562359
has answer: http://stackoverflow.com/a/25372238
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25372238
downvote count: 0
score: 1
tagged with: java
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39562421
possible better answer: http://stackoverflow.com/a/25371778
has body: I'm trying to send a JSON object to a JSP to parse. The JavaScript code is: function sendData(field1, oper1, value1, field2, oper2, value2, field3, oper3, value3){ var formData = {"field1":field1, "oper1":oper1, "value1":value1, "field2":field2, "oper2":oper2, "value2":value2, "field3":field3, "oper3":oper3, "value3":value3}; $.post("&lt;%=request.getRequestURL().toString()%&gt;getInfo.jsp", {formData:formData}, function(response){alertHere(response)}); } function alertHere(){ window.alert("Post Successful!") } My submit button is: &lt;input type="submit" value="SEARCH" name="submit" class="srchbutton" onclick="sendData(document.getElementById('field1').value, document.getElementById('oper1').value&gt; There are several more fields passed in the JavaScript button on click, I just didn't want to post that long of a line. When I try to post with text data in the form, my web developer console flashes the path to my JSP really quickly then disappears. It's too fast to see the error. If there's no data, the post is successful, as my alertHere function in $.post() is called correctly. I'm not sure if I'm missing something.
has answer: http://stackoverflow.com/a/25371778
type: Question
has comment: http://stackoverflow.com/comment/39562463
linked to: http://stackoverflow.com/q/3177733
tagged with: jsp
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25370741
downvote count: 0
answers question: http://stackoverflow.com/q/25370555
has body: Your problem is that you are passing in the function reference to the ng-change directive. However, that directive expects an expression which can evaluated. So attach the parentheses to the function so that it can be evaluated as a function call. Like here: http://jsfiddle.net/MTfRD/1101/
type: Answer
score: 6
upvote count: 6

http://stackoverflow.com/q/25371630
has comment: http://stackoverflow.com/comment/39564204
has answer: http://stackoverflow.com/a/25371984
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39564145
tagged with: javascript
has title: How to identify mobile devices like desktops?
has body: I have reference the https://panopticlick.eff.org/ to help me identify computers hashing the plugins. But this does not work with mobile devices, android, iphone etc. How can I identify mobile devices in a successful way, not by IP or user-agent? I would like to use JavaScript for this.
score: 0
has answer: http://stackoverflow.com/a/25371667
type: UnansweredQuestion
tagged with: php

http://stackoverflow.com/a/25317931
score: 1
answers question: http://stackoverflow.com/q/25317821
has comment: http://stackoverflow.com/comment/39465475
has comment: http://stackoverflow.com/comment/39465313
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You're assigning function execution. If you want to assign actual function you need something like button.onclick = function() { alert("lol"); } Another thing - you have ID defined twice for the DIV. Remove one and use the one that remains.
accepted answer of: http://stackoverflow.com/q/25317821
has comment: http://stackoverflow.com/comment/39465143
upvote count: 1

http://stackoverflow.com/q/25344898
answer count: 1
accepted answer: http://stackoverflow.com/a/25345212
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25345212
has body: I like what these people are doing with copy/paste data entry, validation and layout within a textarea. I seems to go beyond common form validation models. http://batchgeo.com/ Can anyone suggest a js library or some reading on this subject? Their geo-mapping is also impressive but not as mysterious. thanks,
tagged with: javascript
has title: fancy data entry, validation and layout within a textarea
score: 0
tagged with: textarea

http://stackoverflow.com/q/25387090
score: 0
has answer: http://stackoverflow.com/a/25387293
has title: How to compile a node.js module myself
type: UnansweredQuestion
tagged with: git
tagged with: node.js
type: Question
has body: Can someone give me a brief overview of what is involved in compiling a node.js module myself? I need to use mongodb@1.1.3. Unfortunately, npm install mongodb@1.1.3 fails because it has a dependency on bson@0.1.1. bson@0.1.1 uses node install, I am on Xubuntu (Debian), which has changed node to nodejs because of a namespace collision. Can I just git clone the module into a directory off of ~/workspace/projectname/node_modules? Then modify the offending reference, and voila?
tagged with: mongodb
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39593173

http://stackoverflow.com/a/25349143
accepted answer of: http://stackoverflow.com/q/25296285
score: 0
type: AcceptedAnswer
has body: Now I have created my own AutoMapper as I could not find something usable in google: Pass a source and target object to the transform function and from every source object properties which can be found on the target the values are copied :-) 'use strict'; angular.module('mymodule').service('AutoMapper', function () { this.transform = function (source, target) { for (var sourceProperty in source) { for(var targetProperty in target) { if(targetProperty === sourceProperty) { target[targetProperty] = source[sourceProperty]; break; } } } }; });
type: Answer
answers question: http://stackoverflow.com/q/25296285

http://stackoverflow.com/comment/39457149
type: Comment
comment on: http://stackoverflow.com/q/25313699
type: QuestionComment
score: 0
has text: Unfortunately this does not help me because all the actions - creation, attachment of list to input tag, and population of list must be dynamic for my use-case.

http://stackoverflow.com/comment/39365685
score: 0
has text: You are right @MartinWebb but what is important here is to help and learn each other.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25252699

http://stackoverflow.com/q/25258921
favorite count: 0
tagged with: accessibility
has comment: http://stackoverflow.com/comment/39355946
upvote count: 206
has answer: http://stackoverflow.com/a/25275455
has answer: http://stackoverflow.com/a/25343898
has comment: http://stackoverflow.com/comment/39476501
tagged with: http://stackoverflow.com/tag/html
has title: Simulating tremor (from e.g. Parkinson's Disease) with the mouse on a webpage?
has comment: http://stackoverflow.com/comment/39452634
tagged with: css
tagged with: simulation
has comment: http://stackoverflow.com/comment/39437077
has comment: http://stackoverflow.com/comment/39541310
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/25271290
has answer: http://stackoverflow.com/a/25268124
has comment: http://stackoverflow.com/comment/39452906
has comment: http://stackoverflow.com/comment/39476946
has answer: http://stackoverflow.com/a/27434093
has comment: http://stackoverflow.com/comment/39476545
has body: I'm working for a foundation that raises awareness for accessibility in the internet. For a presentation, we want to offer a small workshop that simulates different disabilities/impairments to people. This is done via a website created especially for this presentation. One of the demonstrated impairments is having a tremor, which means experiencing shaky, difficult-to-control hand movements. With this impairment, it's very difficult to move the mouse cursor exactly and to press the mouse button while the mouse is over a link. Both some old people and people with disease, e.g. Parkinson's, can suffer from tremor. Now I'd like to somehow move the mouse cursor in an unpredictable way, so that it's very hard for people to click on a small button. Because JavaScript doesn't allow moving the mouse cursor directly, I'm looking for other ways to achieve this. I came up with the following ideas: Using a mouse driver / utility that simulates the mouse shaking. Hide the mouse cursor via CSS, place a GIF animation of a shaking mouse cursor at the place of the original cursor (with JavaScript), and then make the target link clickable only every few seconds for a second or so. This would at least give the feeling as if one always clicks at the wrong moment. While the first idea would be pretty cool, I couldn't find a tool like this, whether for Mac nor for Windows. And I don't have any skills in programming such a thing myself. The second idea seems a bit clumsy, but it would achieve the desired effect, I think. Does anybody have another idea?
has answer: http://stackoverflow.com/a/25305252
has comment: http://stackoverflow.com/comment/39355746
has answer: http://stackoverflow.com/a/25292531
has answer: http://stackoverflow.com/a/25281544
has answer: http://stackoverflow.com/a/25324485
linked to: http://stackoverflow.com/q/2734117
has comment: http://stackoverflow.com/comment/39452886
has comment: http://stackoverflow.com/comment/39785710
type: Question
has answer: http://stackoverflow.com/a/25269401
has answer: http://stackoverflow.com/a/25304432
has comment: http://stackoverflow.com/comment/39437168
has answer: http://stackoverflow.com/a/25259550
has comment: http://stackoverflow.com/comment/39532210
score: 204
tagged with: javascript
has answer: http://stackoverflow.com/a/25264394
has comment: http://stackoverflow.com/comment/39541466
answer count: 13

http://stackoverflow.com/a/25296731
downvote count: 0
score: 1
has body: You should not use this, you already declared local (private) variables for name and age: function Person() { var _name = 'Joe'; var _age = 32; this.setName = function (name) { _name = name; } this.setAge = function (age) { _age = age; } this.getName = function () { return _name; } this.getAge = function () { return _age; } }
answers question: http://stackoverflow.com/q/25296593
upvote count: 1
has comment: http://stackoverflow.com/comment/39426232
type: Answer

http://stackoverflow.com/comment/39600530
type: Comment
comment on: http://stackoverflow.com/a/25381678
score: 0
has text: I realize now I should most likely do this as a new question so i will create a new question regarding the formatting issue.
type: AnswerComment

http://stackoverflow.com/comment/39303308
comment on: http://stackoverflow.com/a/25230997
type: AnswerComment
has text: I did try adding a class earlier to the ul and modified the jQuery code accordingly, but that didn't solve the problem. Anyway, thanks for taking the time to answer!
score: 0
type: Comment

http://stackoverflow.com/comment/39479438
type: AnswerComment
has text: Alright, can you give me an example for that? And do i still need to use the function i wrote?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25325785

http://stackoverflow.com/comment/39534550
has text: don't use a `` if you're not going to link to another resource. `href="#"` actually *means* something in HTML5, namely "navigate to the top of this document" so if you need what is effectively a button, not a link to the top of the document, use a ` ` element and then add CSS to make it look exactly how you need it to look (the only reason it looks like a button is browser default styling, all of which is overrulable)
type: QuestionComment
comment on: http://stackoverflow.com/q/25356199
type: Comment
score: 3

http://stackoverflow.com/a/25266144
answers question: http://stackoverflow.com/q/25266119
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39368928
has body: That's because Chrome treats all origins using the file: protocol as being different from each other, and so the Same Origin Policy comes into play. It's just a security choice distinction between Chrome and some other browsers. You basically can't use ajax with local files served via the file: protocol. (In Chrome.) You could read the file using the File API (this answer shows how), but of course that has limitations (not least that the user has to give you the file to read, either via &lt;input type="file"&gt; or drag and drop).
has comment: http://stackoverflow.com/comment/39368698
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39368667

http://stackoverflow.com/comment/39597398
has text: Yes. I am asking that because I am trying to determine if your browser has rendered the DOM yet. And what @Utkanos said.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25389342
type: QuestionComment

http://stackoverflow.com/q/25234060
score: 0
has comment: http://stackoverflow.com/comment/39309027
has comment: http://stackoverflow.com/comment/39309199
answer count: 1
has comment: http://stackoverflow.com/comment/39309051
type: UnansweredQuestion
has title: The error of my Javascript function which supposed to return the length of an array if an array is given and return zero otherwise
has comment: http://stackoverflow.com/comment/39309049
has answer: http://stackoverflow.com/a/25234121
has comment: http://stackoverflow.com/comment/39309012
type: Question
has body: I don't know much programming and I'm learning Javascript for a couple of days now so my question might be very easy, apologize in advance: The question is: Create a function named 'arrayCounter' that takes in a parameter which is an array. The function must return the length of an array passed in or 0 if a 'string', 'number' or 'undefined' value is passed in. And I've done this: function arrayCounter(i) { var no = ['string', 'undefined', 'number']; for (j = 0; j &lt; no.length; j += 1) { if(typeof(i) === no[j]) {return 0} } return i.length Why my code is wrong?
has comment: http://stackoverflow.com/comment/39309046
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/39308987
has comment: http://stackoverflow.com/comment/39309044
has comment: http://stackoverflow.com/comment/39309034

http://stackoverflow.com/q/25359214
has comment: http://stackoverflow.com/comment/39540324
upvote count: 1
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25359886
accepted answer: http://stackoverflow.com/a/25359886
has comment: http://stackoverflow.com/comment/39540538
has comment: http://stackoverflow.com/comment/39541252
has comment: http://stackoverflow.com/comment/39540556
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: wordpress
has comment: http://stackoverflow.com/comment/39540064
type: Question
has title: How to handle updating the navigation bar while using ajax
has body: I have an AJAX implementation on my Wordpress install and I'm using the 'CSS and Javascript toolbox' plugin to apply additional Javascript code. I have also tried the following code in the header.php file in both the section and . I'm using the standard 'Twenty Fourteen' theme and I'm referencing the primary navigation bar at the top. There are no subpages, just normal links. http://twentyfourteendemo.wordpress.com/ The code I'm using, which I'm sure is the problem, is this &lt;script&gt; jQuery('ul.menu li').click(function(){ // Remove class on each item jQuery('ul.menu li').removeClass('current-menu-item current_page_item'); // Add class for this one jQuery(this).addClass('current_page_item current-menu-item'); }) &lt;/script&gt; I have also tried this &lt;script&gt; jQuery('ul.menu li').each(function() { jQuery(this).removeClass('current-menu-item'); jQuery(this).removeClass('current_page_item'); }); jQuery(this).parents('li').addClass('current_page_item'); jQuery(this).parents('li').addClass('current-menu-item'); &lt;/script&gt; I don't know Javascript very well but this isn't doing anything. When a link is clicked, the 'highlighted' page on the navigation bar stays on the original page. I have other code, that toggles the navigation bar on and off when a link is clicked (on mobile) and that works fine so the code is registering, just not working. Does anyone know why this code isn't working? I've been stuck with this problem for days and I can't launch without this being fixed, I'd even throw some beer money to anyone with a solution
tagged with: javascript
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/39465936
score: 0
type: Comment
type: QuestionComment
has text: It looks like you're not using angular the way it was intended. By testing postback, you've reverted to a webforms style instead of the ajax centric MVC.
comment on: http://stackoverflow.com/q/25318439

http://stackoverflow.com/comment/39594370
has text: @AugieGardner What I mean is there's no real cost for a bot related to a server taking 1000ms to build its answer, which seems to be something you didn't take into account.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25387615
type: Comment

http://stackoverflow.com/q/25258362
upvote count: 1
downvote count: 1
favorite count: 0
tagged with: d3.js
has title: D3.js - Get all possible child elements for a node
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25259245
type: Question
accepted answer: http://stackoverflow.com/a/25259245
answer count: 1
tagged with: javascript
has body: I am using D3.js to create a Tree structure. The application I am developing requires me to show the immediate children &amp; the total children for each node. I can find the immediate children using d.children.length , but is it possible to get the total child elements(upto leaf) below a node ? If yes how can I do it ?
score: 0

http://stackoverflow.com/q/25324526
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25324592
score: 0
tagged with: google-chrome-extension
has answer: http://stackoverflow.com/a/25324592
type: AnsweredQuestion
has body: What I wanna know is the easiest way to know how many people use my extension, and I want to have a daily report, meaning I want each user to notify me that he uses it the first time he starts up the browser on a particular day. I tried caching the date of last notification using localStorage but it is different for different domains, so it doesn't work - everytime user opens new web-site, it notifies me once again. Someone help pls, thanks in advance!
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/39477062
has title: How many users use my extension?

http://stackoverflow.com/q/25313942
possible better answer: http://stackoverflow.com/a/25314121
score: 0
has answer: http://stackoverflow.com/a/25314133
has answer: http://stackoverflow.com/a/25314121
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25314216
has title: Two buttons, one remains visited till other is clicked
tagged with: css
answer count: 4
type: AnsweredQuestion
has body: I have a set of buttons. I need the button that is clicked to remain highlighted after it has been clicked. When another button is clicked, I need the last highlighted button to go back to its original state, and for the newly clicked button to now be highlighted and so on.
has answer: http://stackoverflow.com/a/25314281
type: Question
has answer: http://stackoverflow.com/a/25314216
tagged with: javascript
has comment: http://stackoverflow.com/comment/39457488

http://stackoverflow.com/a/25279494
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39398016
has comment: http://stackoverflow.com/comment/39393392
type: Answer
has body: Hi Try this I solved to remove the duplicates value in the array check it... var wUser = []; var nonWUser = []; angular.forEach(deviceContactEmail, function(phonevalue){ console.log(phonevalue); angular.forEach(friendemail[0].data.userList, function (value) { if (phonevalue.emails) { if(phonevalue.emails[0].value === value.emailId){ console.log(phonevalue.emails[0].value); wUser.push(phonevalue); } else { console.log("------------------------------------------------------------------------"); console.log(phonevalue.emails[0].value); if ($scope.nonWUser.length == 0) { nonWUser.push(phonevalue); } var filteredVal= $scope.nonWUser.filter(function (filterValue) { return filterValue.emails[0].value == phonevalue.emails[0].value; }); if (filteredVal.length == 0) nonWUser.push(phonevalue); } } }); }); check the edited file
accepted answer of: http://stackoverflow.com/q/25279183
answers question: http://stackoverflow.com/q/25279183
upvote count: 1
score: 1

http://stackoverflow.com/comment/39597652
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25389038
has text: You would have to tap into the `change` event. Here's an example: http://jsfiddle.net/fny66zkd/1/
type: AnswerComment

http://stackoverflow.com/comment/39476769
has text: Actually, it was first time for me to use Stackoverflow. I received so many benefits from you guys. Thank you again.
comment on: http://stackoverflow.com/q/25324267
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25314784
has comment: http://stackoverflow.com/comment/39459291
downvote count: 0
has comment: http://stackoverflow.com/comment/39460779
type: Answer
score: 1
has body: You can extract the main logic in an function like bellow, This is because you won't repeat your code. function showTablesByRadio(){ if($(this).attr('value')=='yes'){ $('.showCta').show(); } if($(this).attr('value')=='no'){ $('.showCta').hide(); } } call That function on click of radio &amp; for each radio on load. $('input[type=\"radio\"]').click(showTablesByRadio); $(document).ready(function(){ $('input[type=\"radio\"]').each(showTablesByRadio); })
upvote count: 1
answers question: http://stackoverflow.com/q/25314698

http://stackoverflow.com/comment/39374493
type: QuestionComment
has text: Nice! Glad it worked out for you!
comment on: http://stackoverflow.com/q/25266557
score: 0
type: Comment

http://stackoverflow.com/comment/39517041
type: QuestionComment
has text: The values don't update. And in FireFox, the slider's movement is very jerky.
comment on: http://stackoverflow.com/q/25331608
score: 0
type: Comment

http://stackoverflow.com/q/25351477
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25352055
type: Question
type: AnsweredQuestion
has title: Disabling form default behavior rails
has comment: http://stackoverflow.com/comment/39526133
score: 0
tagged with: ruby-on-rails
answer count: 1
has body: I am trying to disable my default form behavior. I know typically to do this I am supposed to return false but that is not working. Does disabling default behavior only work after making a post request? I want to disable it because A) I want to see if my values are being serialized correctly. B) I want to make a server request in the future without using post, but rather by using websockets Current code: $(document).ready(function() { $(".attack").submit(function() { var values = $(this).serialize(); console.log(values); return false; }); return false; });
has answer: http://stackoverflow.com/a/25352055

http://stackoverflow.com/a/43584324
score: 5
has comment: http://stackoverflow.com/comment/74227474
type: Answer
has comment: http://stackoverflow.com/comment/86078847
has body: Give the container div a class: .large-tooltip .tooltip-inner { width: 250px; } In order to give different widths for tool-tips, rather than from adding different templates, it is possible to add different css classes for the container element and we can change the width of each element accordingly.
upvote count: 5
downvote count: 0
answers question: http://stackoverflow.com/q/25246391
has comment: http://stackoverflow.com/comment/74217853

http://stackoverflow.com/comment/39365024
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25264266
has text: You should avoid the first `isGood(arr[i++]).catch(` and use a named IIFE instead, otherwise it won't work for empty arrays.

http://stackoverflow.com/comment/39387919
type: QuestionComment
has text: Yes but i want to handle in both front and backend.
comment on: http://stackoverflow.com/q/25276425
score: 0
type: Comment

http://stackoverflow.com/comment/39310899
type: QuestionComment
has text: Check [What arguments are there in favor of weak typing?](http://programmers.stackexchange.com/questions/38002/what-arguments-are-there-in-favor-of-weak-typing)
type: Comment
comment on: http://stackoverflow.com/q/25234942
score: 3

http://stackoverflow.com/a/25291674
has body: first set your wmode to transparent in embedding code. &lt;param name="wmode" value="transparent" /&gt; then place a div to the entire surface of your swf. This should work fine.
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25291456
type: Answer

http://stackoverflow.com/comment/39539855
has text: This is all good advice, but sounds like they are testing in a debug (e.g. localhost) environment, so their existing absolute URLs should work for now. I suspect the problem lays elsewhere :)
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25359093
score: 0

http://stackoverflow.com/comment/39528130
has text: you're welcome. pls think about accepting when it works ;) (and I'm pretty sure it will) Don't forget to fix a height limit for your view vertical panel.
comment on: http://stackoverflow.com/a/25334547
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/78733116
comment on: http://stackoverflow.com/a/25359140
score: 0
type: AnswerComment
has text: How would one go about using this?
type: Comment

http://stackoverflow.com/q/25249333
has body: I have a simple GSP View which contains a reference to 2 bundles being managed by the Grails Resources plugin. the reference to the core angularjs libraries are in my layout. A basic representation of the view is like so: a title <r:require modules="index, widgeta"/> <widgeta/> Grails seems to pull everything in just fine, i can even see the myapp.controller('index', function(){}); line get executed. However; my controller function itself never gets executed. Why not!?
tagged with: grails-resources-plugin
type: AnsweredQuestion
has title: Why is my GSP pulling in my AngularJS javascript files but not executing my controller function?
type: Question
tagged with: javascript
tagged with: grails
has answer: http://stackoverflow.com/a/25249387
accepted answer: http://stackoverflow.com/a/25249387
score: 0
answer count: 1
tagged with: angularjs

http://stackoverflow.com/comment/39323590
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25241009
type: Comment
has text: absolutely, nothing to add)

http://stackoverflow.com/comment/39330087
type: QuestionComment
has text: But then, your JSON data is returning more values (7) than your table can fit (2).
score: 0
comment on: http://stackoverflow.com/q/25239554
type: Comment

http://stackoverflow.com/a/25326045
has comment: http://stackoverflow.com/comment/39480207
has comment: http://stackoverflow.com/comment/39479988
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has body: Delete the original array, then use push Array.prototype.foo = function() { this.length = 0; this.push( "random", "static", "replacement" ); } As volune said, if the input is an array, you can use the apply function. Array.prototype.foo = function() { this.length = 0; var newArray = ["random", "static", "replacement"]; this.push.apply(this, newArray); }
type: Answer
has comment: http://stackoverflow.com/comment/39480033
has comment: http://stackoverflow.com/comment/39483178
score: 2
answers question: http://stackoverflow.com/q/25325981
accepted answer of: http://stackoverflow.com/q/25325981
has comment: http://stackoverflow.com/comment/39479933
has comment: http://stackoverflow.com/comment/39480349

http://stackoverflow.com/comment/39401043
type: Comment
has text: Simple and nice, it works like a charm. Thanks for your help, and the stop() tip!
type: AnswerComment
comment on: http://stackoverflow.com/a/25283639
score: 0

http://stackoverflow.com/q/25308224
has comment: http://stackoverflow.com/comment/39447063
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39446996
has comment: http://stackoverflow.com/comment/39446776
has comment: http://stackoverflow.com/comment/39447134
tagged with: http://stackoverflow.com/tag/csv
has comment: http://stackoverflow.com/comment/39447025
tagged with: node.js
has answer: http://stackoverflow.com/a/25316737
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39446933
has comment: http://stackoverflow.com/comment/39446837
linked to: http://stackoverflow.com/q/3749231
has title: How to export to CSV?
linked to: http://stackoverflow.com/q/4639372
has body: I want to be able to allow an object to be download as a CSV file. I've converted the object into an suitable format for a CSV but I am having trouble with actually getting it to download. I have tried: window.open("data:text/csv;charset=utf-8,"+ escape(csvObj)); but I keep getting window is not defined as an error and my work colleague told me it is a bad way of doing it. this is what I have so far 'Export to CSV': function(msg, done){ var array = [ msg.data.title, msg.data.description, msg.data.objectives, msg.data.outcome, msg.data.hours ]; var str = ''; for(var i=0; i&lt;array.length; i++){ var line = ''; for(var index in array[i]){ line += array[i][index]+','; } line.slice(0,line.length-1); str += line+ '\r\n'; } console.log('**************'); console.log(str); var csvData="data:text/csv;charset=utf-8," + escape(str); } as it's part of a workflow it drops through to this function when the user selects the export to csv option so all I really want to do is download csvData now...any ideas on how to do this?
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25316737

http://stackoverflow.com/a/25258997
type: Answer
has comment: http://stackoverflow.com/comment/39355794
answers question: http://stackoverflow.com/q/25258352
has comment: http://stackoverflow.com/comment/39356116
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39357683
has body: You don't want to have have some jQuery in a file and some AngularJS in another file, usually. If jQuery creates elements etc, they probably won't be picked up by angular. The correct solution is to use an Angular directive. Here, it looks like somebody made one for you. angular-bootstrap-select this is what i got for you, the question asked in stackoverflow the same answer I copied for you see here docs download here
has comment: http://stackoverflow.com/comment/39357416
has comment: http://stackoverflow.com/comment/39357523
has comment: http://stackoverflow.com/comment/39357753
has comment: http://stackoverflow.com/comment/39356221
downvote count: 0
has comment: http://stackoverflow.com/comment/39361142
has comment: http://stackoverflow.com/comment/39357688

http://stackoverflow.com/q/25336141
score: 0
has body: The is how I decorated my circle text, I copied it from somewhere. But it still seems overflow the circle and don't wrapped automatically. How to make my label text in the circle can be wrapped for example if This is stackoverflow It should be wrapped as following (if it it overflowed in the circle ) This is stackoverflow Here's my javascript snippet .select('text') .attr("dy", ".3em") .style("text-anchor", "middle") .style("font-size", function(d) { var len = d.className.substring(0, d.r / 3).length; var size = d.r/3; size *= 10 / len; size += 1; return Math.round(size)+'px'; }) .text(function(d) { var text = d.className.substring(0, d.r / 3); return text; });
linked to: http://stackoverflow.com/q/16657319
has comment: http://stackoverflow.com/comment/39506392
tagged with: d3.js
type: UnansweredQuestion
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/39503586
type: Question
tagged with: javascript
has title: How to make my bubble label can be wrapped not overflow the circle

http://stackoverflow.com/comment/39485193
type: AnswerComment
has text: That plugin if you look at the docs on git, fires an event. that event gives you the url, in that url you grab your barcode, do what you want to do, if the window is opening, their should be a means to stop it from the event, perhaps return false? i will take a look
type: Comment
comment on: http://stackoverflow.com/a/25318064
score: 0

http://stackoverflow.com/q/25271328
tagged with: wordpress
has body: I use the following code to generate a dynamic list with a javascript sliding effect: <?php //display 10 posts with title and date $args=array( 'post_type' => 'post', 'post_status' => 'publish', 'post_category' => '123', 'posts_per_page' => 12, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?> <?php the_time('F jS, g:i a') ?> <?php endwhile; } wp_reset_query(); // Restore global post data stomped by the_post(). ?> Now, I'd like to use the slide effect to display 4 recent posts at a time out of 12, making 3 transitions total. With a normal, unordered list, this works fine. When I use the WP_Query as the list, the list will not populate more than one transition. What is wrong here that only 4 of the 12 posts show? Also, how can I default to the first set of 4 List items. There is a transition effect taking place before the list populates, resulting in blank space and then content being displayed. I'd like list to start with the 4 most recent posts and then transition to the next set of content and so forth.
has title: Display multiple content items from a dynamic list (Wordpress WP-Query) with Javascript Slide Effect
type: Question
answer count: 1
tagged with: javascript
tagged with: html-lists
score: 0
has answer: http://stackoverflow.com/a/25277784
tagged with: dynamic-list
type: UnansweredQuestion

http://stackoverflow.com/comment/39835007
score: 0
comment on: http://stackoverflow.com/a/25497113
type: Comment
has text: @Rudie: Who says there must be a way? I have never found any and I tried to reflect that truth in my answer. If you are more knowledgeable than I, then make another answer and I'll upvote you.
type: AnswerComment

http://stackoverflow.com/comment/39307897
type: Comment
type: QuestionComment
score: 1
has text: Remove the `event.preventDefault()`, and put `return false` inside the `if` statement (after the `alert`), and change the `confirm` line to `return confirm('...`. This should prevent the form from submitting when the email isn't filled in or when they cancel the `confirm`
comment on: http://stackoverflow.com/q/25233545

http://stackoverflow.com/comment/39525628
type: Comment
has text: sorry. compiler just says "JavaScript Error: TypeError: Cannot set property '0' of undefined"
type: QuestionComment
comment on: http://stackoverflow.com/q/25351282
score: 0

http://stackoverflow.com/comment/39339649
type: QuestionComment
has text: If it's a bookmarklet - I'd probably just do `eval('(' + strData + ')')` *hides*
comment on: http://stackoverflow.com/q/25249266
score: 4
type: Comment

http://stackoverflow.com/q/25354649
duplicate of: http://stackoverflow.com/q/15149207
answer count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/15149207
tagged with: google-chrome
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39534894
upvote count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Injecting HTML using Chrome extension fails non-deterministically
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
has body: I am developing a Chrome extension to inject HTML before the first result of a Google search using a content script, e.g. $(document).ready(function() { $('.g:first').before(' Hello world! '); }); The element appears to be inserted correctly into the DOM (querying $('.g:first') after insertion gives the new element). However, the element fails to render about half the time. This problem occurs regardless of the run_at property for content scripts in the extension's manifest. (Also, very infrequently, $('.g:first') does not even return anything because the page has not finished loading in $(document).ready - some of the internal HTML elements are not populated. Not sure if this is related.) Is this an extension-specific issue? How can it be resolved? Debugging suggestions are also welcome!

http://stackoverflow.com/comment/39586547
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/25383720
has text: You are using jQuery, do not use inline events.
type: Comment

http://stackoverflow.com/comment/39500375
has text: Re: result, are you looking for a string: 'view.frame.size.height', or an array: ['view', 'frame', 'size', 'height'] ?
comment on: http://stackoverflow.com/q/25335804
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39400167
type: AnswerComment
comment on: http://stackoverflow.com/a/25246930
score: 0
type: Comment
has text: tried but how do i write the condition for capthca is solved or not?

http://stackoverflow.com/q/25276124
has comment: http://stackoverflow.com/comment/39387365
answer count: 3
tagged with: ternary-operator
favorite count: 0
has title: JS ternary operator vs if/else
downvote count: 2
has comment: http://stackoverflow.com/comment/39388071
has answer: http://stackoverflow.com/a/25276162
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25276160
upvote count: 3
score: 1
has body: Trying to get a better understanding of JavaScript. I've checked out a few similar questions answered on this forum but I'm still confused on this point. I've got some code off the web that toggles the visibility of a modal window (div) and an overlay (div) - (I know this might be better done with jQuery but I wanted to understand JS first): function overlay() { el = document.getElementById("overlay"); /* TERNARY */ el.style.visibility = (el.style.visibility == "visible") ? "hidden" : "visible"; /* if(el.style.visibility == "visible"){ el.style.visibility = "hidden"; }else if(el.style.visibility == "hidden"){ el.style.visibility = "visible"; } */ } I thought that the ternary operator was just a more compact way of writing an if/else statement. But when I substitute the ternary operator in the code above with an if/else statement (currently commented out in code), the code doesn't work. I've probably got something wrong but I can't figure out what? Could someone help? Thanks.
type: Question
possible better answer: http://stackoverflow.com/a/25276160
tagged with: if-statement
has answer: http://stackoverflow.com/a/48964644
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25276162

http://stackoverflow.com/a/25282495
score: 0
has body: first change &lt;form action="lookup.asp" method="post"&gt; to &lt;form action="lookup.asp" method="post" name="test_form" id="test_form"&gt; Second change onClick="this.form.submit()" to onClick="document.forms.test_form.submit()" EDIT: You can also do it like this onclick="submit_form()" &lt;script&gt; function submit_form() { $("#test_form").submit(); } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/39408232
answers question: http://stackoverflow.com/q/25276820
has comment: http://stackoverflow.com/comment/39404576
type: Answer

http://stackoverflow.com/a/25272317
upvote count: 1
answers question: http://stackoverflow.com/q/25272236
downvote count: 0
score: 1
has body: there are a couple of options- use a shared object (I prefer a factory; you could go with a service as well) which both controllers reference. have the 1st controller set the data in that shared object, and the second one can read it. for example- app.factory('sharedStuffFactory', function() { return { sharedData: null; //that will be filled be one of the controllers } }); app.controller('FormController', function ($scope, sharedStuffFactory) { $scope.IdSubmitted = function () { $scope.datatokens = json_datatokens; sharedStuffFactory.sharedData = json_datatokens; } }); app.controller('#10Controller', function ($scope, sharedStuffFactory) { $scope.datatokens = sharedStuffFactory.sharedData; }); if you change your html structure a little to put the second div inside the first one, you could simply share a scope between them.
type: Answer

http://stackoverflow.com/q/25305683
score: 0
has comment: http://stackoverflow.com/comment/39442218
tagged with: javascript
has title: Updating Nvd3 chart priodically
linked to: http://stackoverflow.com/q/24689157
has body: I'm working with Nvd3 charts from the examples from their official website. Now I want a line chart to update periodically based on data sent from server but I couldn't found any useful Example for this on internet. I have created a function which re-draws the chart when new data is arrived but i want to append every new point to the existing chart (like we can do in highcharts) but i'm stuck. Here is the code I'm using for Updating the chart. var data = [{ "key" : "Long", "values" : getData() }]; var chart; function redraw() { nv.addGraph(function() { var chart = nv.models.lineChart().margin({ left : 100 }) //Adjust chart margins to give the x-axis some breathing room. .useInteractiveGuideline(true) //We want nice looking tooltips and a guideline! .transitionDuration(350) //how fast do you want the lines to transition? .showLegend(true) //Show the legend, allowing users to turn on/off line series. .showYAxis(true) //Show the y-axis .showXAxis(true); //Show the x-axis chart.xAxis.tickFormat(function(d) { return d3.time.format('%x')(new Date(d)) }); chart.yAxis.tickFormat(d3.format(',.1%')); d3.select('#chart svg').datum(data) //.transition().duration(500) .call(chart); nv.utils.windowResize(chart.update); return chart; }); } function getData() { var arr = []; var theDate = new Date(2012, 01, 01, 0, 0, 0, 0); for (var x = 0; x &lt; 30; x++) { arr.push({ x : new Date(theDate.getTime()), y : Math.random() * 100 }); theDate.setDate(theDate.getDate() + 1); } return arr; } setInterval(function() { var long = data[0].values; var next = new Date(long[long.length - 1].x); next.setDate(next.getDate() + 1) long.shift(); long.push({ x : next.getTime(), y : Math.random() * 100 }); redraw(); }, 1500);
answer count: 0
tagged with: nvd3.js
tagged with: d3.js
has comment: http://stackoverflow.com/comment/39540444
type: UnansweredQuestion
tagged with: charts
has comment: http://stackoverflow.com/comment/39505602
has comment: http://stackoverflow.com/comment/39541639
linked to: http://stackoverflow.com/q/15330390
type: Question

angular-ui-router
tags question: http://stackoverflow.com/q/25295098
tags question: http://stackoverflow.com/q/25344297
tags question: http://stackoverflow.com/q/25303892
tags question: http://stackoverflow.com/q/25272856
tags question: http://stackoverflow.com/q/25305078
tag name: angular-ui-router
tags question: http://stackoverflow.com/q/25265739
tags question: http://stackoverflow.com/q/25260317
tags question: http://stackoverflow.com/q/25281090
tags question: http://stackoverflow.com/q/25358040
tags question: http://stackoverflow.com/q/25285523
tags question: http://stackoverflow.com/q/25347870
tags question: http://stackoverflow.com/q/25276106
tags question: http://stackoverflow.com/q/25299856
tags question: http://stackoverflow.com/q/25322977
tags question: http://stackoverflow.com/q/25317764
type: Tag
tags question: http://stackoverflow.com/q/25274030
tags question: http://stackoverflow.com/q/25349170
tags question: http://stackoverflow.com/q/25289135
tags question: http://stackoverflow.com/q/25370775
tags question: http://stackoverflow.com/q/25280400

http://stackoverflow.com/comment/39556438
score: 1
type: Comment
type: QuestionComment
has text: When you make the display change, change the height to auto.
comment on: http://stackoverflow.com/q/25367778

http://stackoverflow.com/a/25292908
accepted answer of: http://stackoverflow.com/q/25292811
has comment: http://stackoverflow.com/comment/39418115
answers question: http://stackoverflow.com/q/25292811
type: Answer
score: 3
upvote count: 3
has body: You can't use .val on a td, so you need to get the .text() of the element, and parse it as an integer (optional, but a good idea): var $val1 = parseInt($('.val1', this).text()) http://jsfiddle.net/uyyzkLny/2/
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25314706
type: Answer
has comment: http://stackoverflow.com/comment/39459228
answers question: http://stackoverflow.com/q/25314581
score: 0
has comment: http://stackoverflow.com/comment/39458971
has comment: http://stackoverflow.com/comment/39459024
has comment: http://stackoverflow.com/comment/39458917
has body: http://jsfiddle.net/j1sjzmpm/ use onkeyup http://www.w3schools.com/jsref/event_onkeyup.asp &lt;input type="text" onkeyup="displayText(this);" value="" /&gt; &lt;div id="display"&gt;&lt;/div&gt; function displayText(x) { document.getElementById('display').innerHTML = x.value }

http://stackoverflow.com/comment/39320046
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25239941
has text: Is this what you're trying to achieve? http://jsfiddle.net/MelanciaUK/em0tgzqh/2/

http://stackoverflow.com/q/25253258
tagged with: css
has answer: http://stackoverflow.com/a/25253593
has body: Much easier to explain with an image (see below). https://www.dropbox.com/s/2a19vv7pooop0r3/stack.jpg I'd like to make an interactive carousel by displaying 4 images. Each image takes up 25% of space horizontally, but on rollover, expands to show the majority of the image. None of the images should translate in any way, just have their masks adjusted. Reason: I've got 4 renders of a 3D model (wireframe, solid, textured, rendered). I'd like to be able to see more/less of each one by hovering over them. Edit: Video explains it perfectly: https://www.dropbox.com/s/g3mq15mlf560q68/example.mov
has comment: http://stackoverflow.com/comment/39345579
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39345899
possible better answer: http://stackoverflow.com/a/25253593
type: Question
has answer: http://stackoverflow.com/a/25253822
score: 0
has title: Adjust CSS image masks on :hover in a carousel
has answer: http://stackoverflow.com/a/25253736
accepted answer: http://stackoverflow.com/a/25253736
tagged with: javascript
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39430621
comment on: http://stackoverflow.com/q/25299276
type: Comment
type: QuestionComment
has text: I'm assuming `name` is supposed to be an element of the csv. there is no code here to extract a `name` element from the `data`
score: 0

http://stackoverflow.com/comment/39443731
score: 0
type: AnswerComment
has text: I'm not intending to, just assumed the mods would do so!
type: Comment
comment on: http://stackoverflow.com/a/25304800

http://stackoverflow.com/comment/46764399
has text: Tested it using Protractor 1.8.0 on Chrome, Mac OS X 10.10.2
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/28086603
type: Comment

http://stackoverflow.com/a/25288579
type: Answer
has body: IE7 does not support CSS opacity. you will need to have this syntax: filter: Alpha(Opacity=100);
answers question: http://stackoverflow.com/q/25288443
upvote count: 2
score: 2
downvote count: 0

http://stackoverflow.com/comment/39517421
score: 0
comment on: http://stackoverflow.com/q/25346538
has text: Please .load implementation here as said above.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39517271
has text: yes... everything you run in javascript (event handlers, dom manipulation etc) and even DOM rendering done by browser is done on the same thread. setTimeout, setInterval, async ajax calls these are executed by browser on a background thread, but the callback which is your javascript again, will be executed on UI thread only.
comment on: http://stackoverflow.com/a/25341708
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39408826
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25287517
has text: http://www.yearofmoo.com/2013/08/remastered-animation-in-angularjs-1-2.html Here is official https://docs.angularjs.org/api/ng/directive/ngRepeat#usage
score: 0

http://stackoverflow.com/comment/111135610
has text: you have syntax problem
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25345470
type: Comment

http://stackoverflow.com/comment/39585503
type: QuestionComment
comment on: http://stackoverflow.com/q/25383295
has text: I think what you need is an isolate scope directive.
score: 0
type: Comment

http://stackoverflow.com/q/25268571
score: 2
downvote count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/39554756
type: Question
has title: Angular hangs during route change on xhr.onreadystatechange in createHttpBackend
tagged with: batarang
tagged with: google-chrome-devtools
tagged with: javascript
has comment: http://stackoverflow.com/comment/39380221
has body: I've spent the last two days trying to figure out why my app hangs when switching routes. This code is inherited from another developer. I've put console.logs EVERYWHERE and it looks like everything finished with the route change, then it just hangs for like 10 seconds. I decided to try using Chrome's dev tools to profile the code and I noticed 12 seconds or 30% of the processing time is spent on the xhr.onreadystatechange function. The data being processed isn't that large (150kb to 200kb) and only about 3-4 xhr requests are being made (most of them are just a few kbs). I'm not going to post the entire project, but I was wondering if I could have further advice for troubleshooting this issue. As is the chrome tools are very laggy and most of the tabs, including performance, in Batarang are unresponsive.
upvote count: 2
has comment: http://stackoverflow.com/comment/40239312
favorite count: 0
has comment: http://stackoverflow.com/comment/39784392
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/39333178
type: Comment
has text: As for your question, I agree that this is a bad idea, although I don't know how I would solve it. I'm scraping this data off the internet, is there a better way to format my JS without having control of the HTML?
comment on: http://stackoverflow.com/a/25246816
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39503641
type: Comment
comment on: http://stackoverflow.com/a/25338047
score: 0
type: AnswerComment
has text: Here's more cleaned up version without table, but it still uses margin and top. Every solution has some "evil" in it. http://jsfiddle.net/3bumk/77/

http://stackoverflow.com/comment/39459777
type: Comment
has text: Doesn't work at all. Kill adding any active classes. Unless I am doing something wrong.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25315190

floating-point
tags question: http://stackoverflow.com/q/25341114
type: Tag
tags question: http://stackoverflow.com/q/25341466
tag name: floating-point

http://stackoverflow.com/q/25292461
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Show Hide Scollto Menu won't fire Normal Links?
has body: Not sure what I'm doing wrong here. But when I test this menu out the absolute links wont trigger? I'm using a jquery script to trigger the show/hide functionality of the menu and simultaneously adds and removes specific class names from a couple divs. What I'd like to do is make it so absolute url's work for going to outside pages. I'm using my own internal pages with absolute path for testing. Home Screen Web Focused Summary Portfolio Overview Skills Music Focused Summary Music Video Photos (coming soon) Overview Skills Connect Here is the simple JS I have implemented for the show/hide & scroll & a few other functions used. /* ============================================================ SCROLL TO =============================================================== */ $(document).ready(function(){ // show and hide mobile menu $('a#triggerMobileMenu, div#mobileMenu li a').on('click', function(evt){ evt.preventDefault(); $('#mobileMenu').toggleClass('menu_hide menu_show'); $('#mobileScreen').toggleClass('lockscreen_off lockscreen_on'); }); }); /*global $:false */ $(document).ready(function(){"use strict"; $(".scroll").click(function(event){ var full_url = this.href; var parts = full_url.split("#"); var trgt = parts[1]; var target_offset = $("#"+trgt).offset(); var target_top = target_offset.top - 75; $('html, body').animate({scrollTop:target_top}, 1500); }); }); $(document).ready(function(){ $(window).scroll(function(){ if ($(this).scrollTop() > 100) { $('.scrollup').fadeIn(); } else { $('.scrollup').fadeOut(); } }); $('.scrollup').click(function(){ $("html, body").animate({ scrollTop: 0 }, 600); return false; }); }); $(document).ready(function() { // the portfolio items var $container = $('#isotope-container'); $container.isotope({ layoutMode: 'masonry', masonry: { columnWidth: 127, gutter: 16 }, filter: '*', animationOptions: { duration: 750, easing: 'linear', queue: false } }); // filter portfolio items $('#isotope-options a').click(function(){ $('#isotope-options .cur…
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25292566
score: 1
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25234944
downvote count: 1
has body: We can use jQuery to set the value of your select tag when a particular button is pressed. Let's say you have some button with id "enterLbs": Set to lbs. With jQuery, we can select this button and bind an event handler to the button's click event. In this case, when the button is clicked, we want to set the value of the select (with id "weight-unit") to "lbs": $("#enterLbs").click(function() { $("#weight-unit").val("lbs"); }); So, when the button with id "enterLbs" is pressed, the select with id "weight-unit" has its value set to lbs. Consider the following working example: http://jsfiddle.net/u2p9npt5/. If you do not want to use jQuery, you can use JavaScript's document.getElementById function to add an event handler to the button with id "enterLbs```: var button = document.getElementById("enterLbs"); var select = document.getElementById("weight-unit"); button.addEventListener("click", function() { select.value = "lbs"; }); Consider this jsfiddle if you would rather not use jQuery: http://jsfiddle.net/c51gsp1L/.
answers question: http://stackoverflow.com/q/25234873
type: Answer
score: 0
upvote count: 1

http://stackoverflow.com/q/25383295
type: AnsweredQuestion
has title: angularjs interval applies changes in rootscope
type: Question
accepted answer: http://stackoverflow.com/a/25383438
tagged with: javascript
tagged with: scope
has comment: http://stackoverflow.com/comment/39585848
tagged with: intervals
answer count: 1
has comment: http://stackoverflow.com/comment/39587269
has body: I followed angularjs's example to doing a timer that updates every second. .directive('myCurrentTime', ['$interval', 'dateFilter', function($interval, dateFilter) { return function(scope, element, attrs) { var stopTime; function updateTime() { element.text(dateFilter(new Date(), "hh:mm:ss")); } updateTime(); stopTime = $interval(updateTime, 1000); element.on('$destroy', function() { $interval.cancel(stopTime); }); } }]); My problem is that on every call to function of the interval(updateTime), the whole scope is updated instead of only the scope of the directive. The problem is that I have filters for languages in the root scope and then it calls all the filters every time which is pretty bad.. Is it possible to only apply the function on the local scope of the directive? I tryed using: function updateTime() { scope.$apply(function () { element.text(dateFilter(new Date(), "hh:mm:ss")); }); } stopTime = $interval(updateTime, 1000, null, false); but with no success. I added a fiddle with the example: http://jsfiddle.net/f1qqw4d9/2/ I don't want the message below the time to change Thanks
has comment: http://stackoverflow.com/comment/39585900
tagged with: angularjs
score: 0
has answer: http://stackoverflow.com/a/25383438
has comment: http://stackoverflow.com/comment/39585503

http://stackoverflow.com/q/25257485
upvote count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39353649
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39353583
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/39353547
has body: Hi i am currently working on a small project where I am supposed to query a JSON API with the format { "results": [ { "livingstd": "80%", "place": "ClassA" }, { "livingstd": "50%", "place": "ClassC" } ... ] } I am supposed to show the livings td whenever i hover over to a mini house icon. so i wrote a javascript but it doesnt work. and I dont understand what went wrong. Can anyone shed some light on this? It doesn't show anything at all &lt;script type="text/javascript" src="js/function1.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function (e) { //api url var url = "dummyurl"; //store search term var query; //when the user hover over $("button").hover(function (e) { //get value and store in variable query = $("#query").val(); //get the json file $.getJSON(url + query, function (json) { $.each(json.results, function (i, occupancy) { $("results").append('&lt;p&gt;' + occupancy.occupancy + 'at' + occupancy.time + '&lt;/p&gt;') }); }); }); }); &lt;/script&gt;
has title: jQuery JSON API not working
answer count: 1
has answer: http://stackoverflow.com/a/25259351
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39353320

http://stackoverflow.com/a/25298229
score: 0
answers question: http://stackoverflow.com/q/25297923
type: Answer
has body: You should be able to simply manipulate the &lt;script&gt; element. Delete it from the DOM by id, and insert an identical copy. That will re-run the script, and the server should be configured to disallow caching if it is indeed getting stale.

http://stackoverflow.com/comment/39392365
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25279151
has text: use `$('selector').load(function(){})`
score: 1

http://stackoverflow.com/q/25383292
has title: Using Polymer with Angularjs
has body: I'm trying to understand what will be the best way to use polymer with angularjs. I want the MVC powers of angular with the declarative simplicity of polymer elements. My two thought processes are to completely forego angular directives and only use polymer, or to wrap the polymer in a directive. The latter seems like it would work better with data binding and complex scope attributes, but may make the beauty of polymer a moot point since it's no longer very declarative at that point. Thoughts? What's the best way to merge these two worlds?
type: AnsweredQuestion
type: Question
tagged with: angularjs-directive
possible better answer: http://stackoverflow.com/a/32971718
tagged with: polymer
upvote count: 9
has answer: http://stackoverflow.com/a/32971718
has answer: http://stackoverflow.com/a/25391171
tagged with: javascript
answer count: 2
linked to: http://stackoverflow.com/q/25867182
downvote count: 0
favorite count: 0
tagged with: angularjs
score: 9
accepted answer: http://stackoverflow.com/a/25391171

http://stackoverflow.com/comment/39367109
type: Comment
score: 2
has text: Since you have disabled it,why not use a div styled to look like a textbox (and add a hidden input if need for postback)
comment on: http://stackoverflow.com/q/25265242
type: QuestionComment

http://stackoverflow.com/a/53011635
has body: how XMLHttpRequest works? In the CORS specification, the browsers have to perform a preflight request to know which methods are available/allowed: GET, POST, HEAD... The preflight is performing an OPTIONS request. The OPTIONS itself is a method, so you have to enable/allow it too as the other Http methods. Here is an example: const data = '{"message":"hi there!"}' const xhr = new XMLHttpRequest() xhr.open('POST', endpointURL) xhr.setRequestHeader('Content-type', 'application/json') xhr.send(JSON.stringify(data)) First of all the XMLHttpRequest object is doing an OPTIONS call in order to know which methods are available for the endpointURL. The CORS headers are returned from the server too. With this information XMLHttpRequest knows if it can perform a POST call. If CORS is allowed, XMLHttpRequest is going to work. In order to test the XMLHttpRequest calls, you can do an OPTIONS call in the postman or rest client tool, or a CURL: curl -X OPTIONS -k -H 'Conte -Type: application/json' -i 'https://yourserver/path/hello' --data '{"message": "hello world"}' and then you can perform an POST call: curl -X POST -k -H 'Content-Type: application/json' -i 'https://yourserver/path/hello' --data '{"message": "world"}' In the server side don't forget to enable the allowed methods: GET, POST, OPTIONS, and return the exposedHeaders and allowedHeaders @Configuration @EnableWebMvc public class WebConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") .allowedOrigins("*") .allowedMethods("POST","GET","OPTIONS") .allowedHeaders("*") .allowCredentials(false).maxAge(3600); } }
downvote count: 0
answers question: http://stackoverflow.com/q/25296455
type: Answer
upvote count: 3
score: 3

http://stackoverflow.com/comment/39550805
has text: Right, however this answer takes what you got and makes it work with both JavaScript-enabled and JavaScript-disabled browsers. Since your delay is actually 5 seconds, and the other answers do not display a proper counter, it may frustrate the user who'd think his/her device takes a long time to respond; in short, it's a matter of UI feedback. Those who do not enable JS will not see anything, however most browsers *do* enable JS nowadays, therefore you cover a majority of use case, while preserving the same behaviour in the end. Just saying. I'll edit the answer to reflect this comment.
comment on: http://stackoverflow.com/a/25361279
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39460141
has text: It rendered in IE8 for me. (The label font was cursive and a little hard to read.)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25315368

http://stackoverflow.com/a/25375346
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25374623
answers question: http://stackoverflow.com/q/25374623
type: AcceptedAnswer
has body: I got it working!! $.ajax({ url: 'currentstars.php', data: { id: productID, value: value }, type: 'POST', success: function(results) { $('.rateit').rateit('value', (results)); } }); with that query and function i'm able to update to the average rating when both the page is loaded and when a rating is selected!!! what a nightmare that was lol :)

http://stackoverflow.com/a/25349806
type: Answer
has body: You have to check if the slider is in the viewport. $(window).scroll(function() { var windowPosition = $(window).scrollTop(); var slidePosition = $("#your-slide").offset().top; if (slidePosition &lt; windowPosition) { // add code here to play slider } }
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25349738
has comment: http://stackoverflow.com/comment/39552945
downvote count: 0
has comment: http://stackoverflow.com/comment/39523034

http://stackoverflow.com/comment/39311220
has text: Just as a note -- As a more Object-Oriented approach you could make a `deck` object and add the `search` method to it. Then you could say `deck.search(callbackFunction);`
comment on: http://stackoverflow.com/q/25234607
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25247486
has comment: http://stackoverflow.com/comment/39334286
has comment: http://stackoverflow.com/comment/39334496
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25247605
type: Question
has answer: http://stackoverflow.com/a/25247605
has body: I cannot get $scope.loading to update inside in my controllers createProject() function. The scope is changed but the value on page does not update, why? I have tried apply() but this just gives an error: Error: [$rootScope:inprog] http://errors.angularjs.org/1.2.19/$rootScope/inprog?p0=%24digest at Error (native) at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js:6:450 at m (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js:105:353) at k.$apply (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js:113:31) at http://127.0.0.1:8004/static/js/controllers/project.js:56:27 at J (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js:100:424) at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js:102:64 at k.$eval (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js:112:319) at k.$digest (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js:109:392) at k.$apply (http://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js:113:100) HTML: Create Directive: app.directive('spinnerButton', function () { return { restrict: "A", transclude: true, template: " " + " Not a button! ", scope: {loading: "=spinnerButton"}, link: function (scope, elem) { elem.bind("click", function () { scope.loading = true; }); } }; }); inside a controller: var createProject = function () { var new_project_data = { "title": $scope.project.title, "description": $scope.project.description }; var resource = httpFactory.post("project", new_project_data) resource.then(function (object) { $scope.$apply(function(){ $scope.loading = false; }) }); };
has comment: http://stackoverflow.com/comment/39334792
tagged with: javascript
score: 0
has title: AngularJS scope will not change inside my controller
answer count: 1
tagged with: angularjs

http://stackoverflow.com/q/25236386
has answer: http://stackoverflow.com/a/25236608
has title: How to invoke javascript OOPS based class in another javascript
has answer: http://stackoverflow.com/a/25236568
favorite count: 0
has body: I have a javascript class called "LayoutProcessor".js ,defined as follow: define('layoutProcessor', ['jquery'], function($) { "use strict"; function LayoutProcessor() { return (this); } LayoutProcessor.prototype.process = function() { console.log('inside process'); }; LayoutProcessor.prototype.responseHandler = function() { console.log('inside responseHandler'); }; return new LayoutProcessor(); }); I am trying to access the method "process" in another javascript class called "test.js", which is defined as follow: test.js require(['LayoutProcessor.js','jquery'], function(layoutProcessor,$) { $(document).ready(function(){ var response = new LayoutProcessor().process(); }); }) But I am getting a type error: new LayoutProcessor() is not a constructor.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25236519
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39313578
type: Question
tagged with: javascript
score: 0
answer count: 3

http://stackoverflow.com/q/25326536
tagged with: javascript
has answer: http://stackoverflow.com/a/25326585
score: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/39481021
has comment: http://stackoverflow.com/comment/39481028
has comment: http://stackoverflow.com/comment/39480915
has comment: http://stackoverflow.com/comment/39481240
has comment: http://stackoverflow.com/comment/39481160
has comment: http://stackoverflow.com/comment/39481042
has comment: http://stackoverflow.com/comment/39481011
has answer: http://stackoverflow.com/a/25331349
has body: I'm studying some CreateJS samples and in one of them I've seen this and I'm wondering what use it's for (function() { var c = createjs; var a = function(blabla) { this.blabla = blabla; var p = Game.prototype; p.a; p.b; p.c; p.d; /* ... 15 variables like that ... */ p.init = function(param) { /* blabla */ } /* ... long code after that ... */ })(); It's on the github samples, in the /createjs/sandbox-master/PlanetaryGary directory, it's the file js/Game.js
type: Question
accepted answer: http://stackoverflow.com/a/25331349
has answer: http://stackoverflow.com/a/25326690
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39481162
has title: What is the point of declaring variables without assignment?
upvote count: 4
answer count: 3
possible better answer: http://stackoverflow.com/a/25326585
downvote count: 0

http://stackoverflow.com/a/77350621
answers question: http://stackoverflow.com/q/25357635
has body: using optional chaining operator (?.) to access the property isMale of the object myVar. optional chaining allows safe access to the properties of an object, even if the object itself might be null or undefined rather than causing an error. if (myVar?.isMale) { // Do something 2 } else { // Do something 1 }
score: 0
type: Answer

http://stackoverflow.com/a/25287432
upvote count: 1
answers question: http://stackoverflow.com/q/25287112
has comment: http://stackoverflow.com/comment/39433860
has comment: http://stackoverflow.com/comment/39434010
has comment: http://stackoverflow.com/comment/39434440
has body: You can use HTML5 WebAudio API. Introduction to audio and video capturing Capture audio &amp; video in HTML5 Nice Library to record audio with samples Recorder.js
type: Answer
score: -1
downvote count: 2
has comment: http://stackoverflow.com/comment/79399514

http://stackoverflow.com/q/25238010
type: Question
has answer: http://stackoverflow.com/a/25238059
tagged with: javascript
answer count: 1
has body: Im playing an audio file and I want to pause and resume this file.I have the pause() and resume() functions and i have the following html button I want to toggle the button where the user when clicking back the pause button the resume() function is called. how could that happen??
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
score: 0
has title: toggle html button pause and resume functions

http://stackoverflow.com/comment/39468319
has text: What about the recursiveSearch addon here http://xregexp.com/plugins/? It looks like it is almost what I need but how would I make it match things that aren't in parentheses?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25319558

http://stackoverflow.com/comment/39318598
has text: no, it does exist. If you use Return false; on the button then it stops post back so you can perform an F12 on the element and it does exists when you click on the url.
comment on: http://stackoverflow.com/a/25238422
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/121779722
type: Comment
comment on: http://stackoverflow.com/a/33770858
score: 1
has text: @Brackets No it doesn't.
type: AnswerComment

http://stackoverflow.com/q/25319654
has comment: http://stackoverflow.com/comment/39468306
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25319780
has comment: http://stackoverflow.com/comment/39468137
has comment: http://stackoverflow.com/comment/39468140
has comment: http://stackoverflow.com/comment/39468285
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39468108
has body: I have a javascript code Html5Template_300x250 = function(config) { this.config = config; var self = this; adkit.onReady(this.init()); }; Html5Template_300x250.prototype = { // Function That Creates Element Var d: function(id) { return document.getElementById(id); }, // Initialize DCO HTML5 template init: function() { adkit.onReady(this.handleSVData); }, handleSVData: function() { var myData = adkit.getSVData("varName"); alert(myData); this.startAd(); }, startAd: function(data) { alert("test2"); } } In the above code i have used an external javascript adkit.js and using that method in my code. The initial method is started as adkit.onReady(this.init()); It is calling a init function and which is then calling other methods including handleSVData which is getting a value from the json file which is in the root folder as var myData = adkit.getSVData("varName"); The part of the code is working fine but after that line i am calling another method this.startAd(); But this method is not working and i am getting error TypeError: this.startAd is not a function I am not good in javascript and giving me headaches can someone explain me why it is so complicated and what i am doing wrong here ??
accepted answer: http://stackoverflow.com/a/25319780
type: Question
has comment: http://stackoverflow.com/comment/39468169
has comment: http://stackoverflow.com/comment/39468130
linked to: http://stackoverflow.com/q/20279484
has comment: http://stackoverflow.com/comment/39468216
tagged with: javascript
has title: Javascript TypeError : i need explanation
has comment: http://stackoverflow.com/comment/39468337

http://stackoverflow.com/comment/39318842
type: AnswerComment
comment on: http://stackoverflow.com/a/25238953
type: Comment
has text: you need to import ckeditor.js , jquery.validate.min.js , lcoastyles.css . please look at this demo [link](http://jsfiddle.net/BmZ93/82/)
score: 0

http://stackoverflow.com/q/25284398
has title: identify button click event using text jquery
type: Question
downvote count: 2
has answer: http://stackoverflow.com/a/25284495
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25284602
answer count: 3
possible better answer: http://stackoverflow.com/a/25284495
favorite count: 0
upvote count: 0
tagged with: php
has answer: http://stackoverflow.com/a/25284453
accepted answer: http://stackoverflow.com/a/25284453
type: AnsweredQuestion
score: -2
has body: I have three buttons which are automatically generated with a jQuery plugin. Invoice1 Invoice2 Invoice3 I want to write jQuery (JS) code to update form textbook only click Invoice2 button. So, I want to write jQuery to identify it using text on button. I can write jQuery to update text box, but I don't know how to separately click Invoice2 button from others. I can't add another class or id because the buttons are generated automatically.

http://stackoverflow.com/comment/39475107
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25316312
type: Comment
has text: I'm not sure how to include this into my code... Shoud I add this to my scroll.js...? If yes, where?

http://stackoverflow.com/a/25240400
answers question: http://stackoverflow.com/q/25239348
score: 0
has body: Server Sent Events-channels are abstracted by keeping a PrintWriter open, that in various ways can be sent to the client when new data arrives there. To be able to send data to the client, writing to the PrintWriter should likely to be separated from the response logic you have above (to avoid blocking threads that is better to be used to reply to new incoming web requests). A suggestion would be to keep the PrintWriter channel in a session variable, and have an altogether different service responsible of scheduling and writing out messages, for instance by scheduling an Executor per user/printwriter in a ScheduledExecutorService, that sends some messages and then terminates the the executor, keeping the PrintWriter open until it somehow times out.
type: Answer

http://stackoverflow.com/a/25368312
accepted answer of: http://stackoverflow.com/q/25368141
has comment: http://stackoverflow.com/comment/39558374
has body: Some browsers (e.g. Chrome) will re-arrange the keys alphabetically, so there is no reliable, cross-browser way to retain the key order for an object. You should either turn it into an array, or specify the key order separately (e.g. as a separate array). UPDATE As runTurm correctly pointed out, in ngRepeat specifically the keys are ordered alphabetically by Angular. So, the easiest way to retain a specific order would be to use a separate array for holding the keys in desired order: /* CONTROLLER: */ $scope.keys = ["Screen", "Resolution", "HDD", "RAM", "CPU", "Software"]; $scope.selectedProduct = { Specification: { ... }, ... }; {{selectedProduct.Specification[key]}} If you find it more readable or if you plan to use selectedProduct.Specification[key] in multiple places, you could use ngInit to alias it as value: {{value}} See, also, this short demo.
upvote count: 3
type: AcceptedAnswer
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/39558108
downvote count: 0
answers question: http://stackoverflow.com/q/25368141

http://stackoverflow.com/comment/39447085
score: 0
type: AnswerComment
type: Comment
has text: According to this [post](http://stackoverflow.com/questions/17606936/angularjs-dot-in-ng-model), the one that said is Miško.
comment on: http://stackoverflow.com/a/25307869

http://stackoverflow.com/comment/39665586
type: Comment
has text: What is your sonar.sources value?
comment on: http://stackoverflow.com/a/25313303
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39469524
type: Comment
comment on: http://stackoverflow.com/a/25319947
type: AnswerComment
score: 0
has text: Looks like the page is wired up to use jQuery, try placing the code inside a document.ready event $(document).ready(function(){ // Code Here. }); This will ensure that the code will run after the page is loaded.

http://stackoverflow.com/a/25385200
type: Answer
answers question: http://stackoverflow.com/q/25385110
has body: Get rid of the quotes around the variable: jq(this).css("background-position", bgPosX + 'px' + bgPosY + 'px'); And get rid of the second comma...
upvote count: 0
score: -1
downvote count: 1

http://stackoverflow.com/q/25249266
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39337618
linked to: http://stackoverflow.com/q/7146268
has comment: http://stackoverflow.com/comment/39339669
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/39339640
tagged with: javascript
has comment: http://stackoverflow.com/comment/39339553
favorite count: 0
has comment: http://stackoverflow.com/comment/39339609
has comment: http://stackoverflow.com/comment/39340092
has comment: http://stackoverflow.com/comment/39339929
has comment: http://stackoverflow.com/comment/39337636
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/39339649
type: UnansweredQuestion
score: 2
has body: I'm creating a bookmarklet that will accept a JSON string through a prompt like so: prompt("Enter your JSON", ""); Once they enter their JSON string, I convert their string into a JSON Object using JSON.parse. Unfortunately, as far as I can tell JSON.parse is not supported in IE9. The object of my bookmarklet is to loop through the available &lt;input&gt;'s on the page and fill their values with data from my JSON object. What can I do in order to get this to work in IE9? One possible solution - This answer: https://stackoverflow.com/a/7146404/556079 suggests that JSON.parse will work if my document is in standards mode. Since this is a bookmarklet, I have no control over the doctype of the page. Would it be possible to change the doctype using my bookmarklet? I would prefer to avoid loading libraries in my bookmarklet like http://bestiejs.github.io/json3. If this can be done without resorting to that, that would be ideal. Alternatively, the input doesn't need to even be a JSON. I just need to get some user submitted data into a loop where I can reference anywhere between 2 and 50 values.
has title: How can I use JSON.parse in a bookmarklet in IE9 if the page is not in standards mode?

http://stackoverflow.com/a/25289927
score: 1
answers question: http://stackoverflow.com/q/25289749
upvote count: 1
has comment: http://stackoverflow.com/comment/39413344
has body: $(function () { $("input[id*='checkbox1']").click(function (e) { $("#&lt;%=ListView2.ClientID %&gt;").find("#DeleteBackground").removeAttr('disabled'); }); });
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25289749
type: Answer

http://stackoverflow.com/a/25366349
has body: I think what you are looking for is the php function get_browser. It allows you to get information about the users browser. https://php.net/manual/en/function.get-browser.php The Other option is the global variable $_SERVER. $_SERVER is an array containing information such as headers, paths, and script locations. The entries in this array are created by the web server. There is no guarantee that every web server will provide any of these; servers may omit some, or provide others not listed here. That said, a large number of these variables are accounted for in the » CGI/1.1 specification, so you should be able to expect those.
has comment: http://stackoverflow.com/comment/39556265
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25366248

http://stackoverflow.com/comment/39607917
comment on: http://stackoverflow.com/a/25394642
type: AnswerComment
type: Comment
score: 0
has text: It's the name in the template of the element you want to iterate over: `{{#each selected}} ... {{/each}}`. You can see it in the example. Of course you can change `selected` to whatever variable name you think best-suited.

reactjs
tags question: http://stackoverflow.com/q/25331732
tags question: http://stackoverflow.com/q/25371926
tags question: http://stackoverflow.com/q/25294114
tags question: http://stackoverflow.com/q/25377759
type: Tag
tags question: http://stackoverflow.com/q/25255517
tags question: http://stackoverflow.com/q/25378594
tag name: reactjs
tags question: http://stackoverflow.com/q/25250098

http://stackoverflow.com/a/25337017
type: Answer
has body: you're not calling your function correctly. function calling is always done like SendAMessageToPerson( &lt;parameters if any&gt; ); &lt;------- Notice these brackets. So make your call as SendAMessageToPerson(); also your if condition is not formed correctly. if you are writing if (checkPersonIsComing = 'true') don't you think this statement is identical to assigning a variable "checkPersonComing" to the value 'true'. So this when putting inside the if statement always return TRUE. To make it a condition use === rather than =.
answers question: http://stackoverflow.com/q/25336793
score: 0

http://stackoverflow.com/a/25367484
type: Answer
answers question: http://stackoverflow.com/q/25361971
accepted answer of: http://stackoverflow.com/q/25361971
has body: Damn, I'm dumb. Every message goes through server extensions, after that is send to listeners (other clients). I added token for my server side client. Check token in incoming extension If token is incorrect, do not propagate message (don't run callback). My code: incoming: (message, callback) -&gt; # validate, if message has been sent by server if message.channel == channels.newMessages # /messages/new # I added token for server side client if message.data.token != settings.serverToken return # if message token is incorrect, don't run callback callback(message) # send message to all listeners
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/25283733
has comment: http://stackoverflow.com/comment/39400965
tagged with: character-encoding
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/39401432
has title: CKEditor 4.3.3 adding â€‹ with single line break
tagged with: javascript
tagged with: ckeditor
has comment: http://stackoverflow.com/comment/39447129
downvote count: 0
favorite count: 0
has body: This is more than likely a problem to do with charset encoding. However, i'm unable to locate where the problem is occuring. I have CKEditor 4.3.3 installed on a server and when I enter a single line break (shift+enter) I get â€‹. I picked up on this same problem years ago: http://ckeditor.com/forums/CKEditor/single-line-break-adding-special-characters However, charset encoding solved the issue. Now, i've learned from my mistakes and everything is in UTF-8 as far as I can tell. Document, js, etc. So, what else could be causing this issue? What all could be affecting the encoding and thus these problems? Seems to only happen in Chrome too.
has comment: http://stackoverflow.com/comment/39414931
answer count: 0
type: UnansweredQuestion
upvote count: 1
score: 1

http://stackoverflow.com/comment/39390001
comment on: http://stackoverflow.com/q/25277674
has text: can you share some context of the code like the html and the javascript function where it is used...
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39374372
type: QuestionComment
comment on: http://stackoverflow.com/q/25269110
has text: `.split('\n').slice(0,2)`?
score: 2
type: Comment

http://stackoverflow.com/a/25362599
has comment: http://stackoverflow.com/comment/39546511
has comment: http://stackoverflow.com/comment/39546456
type: Answer
has comment: http://stackoverflow.com/comment/39547337
has comment: http://stackoverflow.com/comment/39547731
score: 0
has body: remove display: none; in the css Here is your css file body { margin: 10px auto; width: 570px; font: 75%/120% Arial, Helvetica, sans-serif; } .box { display:inline-block; padding: 3px; margin: 3px auto; } .accordion2 { min-height:95px; height:auto !important; height:95px; } .accordion2 h3 { padding-bottom: 1px; margin: 0; border-bottom: none; cursor: pointer; min-height:95px; height:auto !important; border:1px solid blue; } .accordion2 h3:hover { background-color: #e3e2e2; } .accordion2 h3.active { background-position: right 5px; } .accordion2 div { /* background: red; */ margin: 0; }
answers question: http://stackoverflow.com/q/25361724

http://stackoverflow.com/comment/39330633
comment on: http://stackoverflow.com/a/25244839
has text: No worries, [here is a nice reference for answering questions](http://stackoverflow.com/help/how-to-answer)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39495359
score: 0
type: Comment
type: QuestionComment
has text: Because you need to check against your username database, you will need to query your server. If you don't want to change pages, you will need to do this via AJAX. Basically, make a background call to your PHP, and don't allow your form to submit until you get a positive response from your server. If you haven't done any AJAX, I would suggest reading through a few tutorials.
comment on: http://stackoverflow.com/q/25333771

http://stackoverflow.com/a/25434480
has comment: http://stackoverflow.com/comment/39684385
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39682951
type: Answer
has comment: http://stackoverflow.com/comment/73925804
has comment: http://stackoverflow.com/comment/39683292
score: 2
accepted answer of: http://stackoverflow.com/q/25272020
upvote count: 2
has comment: http://stackoverflow.com/comment/39682943
answers question: http://stackoverflow.com/q/25272020
has comment: http://stackoverflow.com/comment/44925084
has comment: http://stackoverflow.com/comment/39684184
has body: your approach was quite right. you probably get the flickering due to the scroll change position. the trick is to change the div's to position: fixed when scrolling and, than change them back afterwards. the steps are: save the current scroll vertical position change the div's to position: fixed change the div's scrollTop to 0 - scrollPosition start horizontal transition after the transition: change the window's scroll position with scrollTo() revert position: fixed on the div's so the natural browser behavior works. here is a plain vanilla javascript example (also as fiddle): transition in this example i used the transitionEnd event. have in mind that if you have this event on both animating div's the event will fire twice. solutions to this are: if the timings are identical just use the event on one div (used in the example) use the event an all div's but just do changes respective to the event's div animate a container with all the div's inside. so you will just need one event. if you can not use the transitionEnd event use requestAnimationFrame() and animate manually via js i also use a fixed height container for the transitions in this example. if you have div's with different height's you will have to change the containers height after the transition. ideally before reverting from position: fixed. have in mind that changing a div to position: fixed will show it even if it is in a container with overflow: hidden. in the case of a mobile webapp this will not be an issue because the div's are outside of the screen. on a pc you might have to put another div over the other to hide the one transitioning in.
has comment: http://stackoverflow.com/comment/39683157

http://stackoverflow.com/comment/39614902
has text: @user3094292 if the answer is fine, would be helpful if you accepted it or upvoted it!!!!
comment on: http://stackoverflow.com/a/25375434
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/a/25276561
answers question: http://stackoverflow.com/q/25274558
score: 0
type: Answer
has body: Try listening to finish instead of close before calling the callback. close is for the Readable stream, where finish is for the Writable stream. file.on('finish', function() { callback('done'); }) Refer to the API docs for more details: http://nodejs.org/api/stream.html#stream_event_finish

http://stackoverflow.com/comment/39423374
type: AnswerComment
has text: Some points to check with some `console.log()`: - Check your code is being called and also make sure it's running after the page has finished loading like my updated code. Use the Javascript console to see if any error raised up and fix them before. Also, run `cordova build ios` before you test on your device.
score: 0
comment on: http://stackoverflow.com/a/25261986
type: Comment

http://stackoverflow.com/comment/39453355
score: 0
has text: Will the filter operate on both getting and setting or just get? (will try and see what happens)
comment on: http://stackoverflow.com/a/25311767
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39556719
score: 0
comment on: http://stackoverflow.com/q/25367834
type: Comment
type: QuestionComment
has text: @ElmoVanKielmo Only a JSON string is fetched from the server - I build the DOM with JS. I'll post the code for the AJAX request in the main body, though it only takes about 2 seconds for larger tables.

http://stackoverflow.com/comment/39349307
comment on: http://stackoverflow.com/q/25255345
has text: A quick and easy way is to make the sub content be a child element of the top button, that way it hasn't actually "left" the hovered button area.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39327014
comment on: http://stackoverflow.com/a/25243509
type: Comment
has text: It's all good. I wasn't sure that would fix all of his problems, hence why I left it a comment.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39363333
type: QuestionComment
has text: `var clone = $('#product-1').clone(false)[0].outerHTML.replace(/Ingredient 1/g, "Ingredient " + counter)`
comment on: http://stackoverflow.com/q/25263081
score: 0
type: Comment

http://stackoverflow.com/comment/39459151
comment on: http://stackoverflow.com/a/25314437
score: 0
type: Comment
type: AnswerComment
has text: I moved the var numOfEl inside the function and it works.Thank you!

http://stackoverflow.com/q/25315681
answer count: 1
tagged with: javascript
score: 0
tagged with: sinatra
has body: I'm new to Ruby and Sinatra and am trying to send an email every time someone presses the submit button. I installed the Pony gem based on the sinatra website and other questions asked here, but when I try to send it sends me to a page with a picture of a spilled glass that says: "Errno::ENOENT at /submit No such file or directory - which sendmail file: pony.rb location: ` line: 305" Here is my code post '/submit' do subject = Subject.new( :experiment_data =&gt; params[:data], :created_at =&gt; Time.now ) if subject.save session[:subj_id] = subject.id require 'pony' Pony.mail(:to =&gt; 'toemail@gmail.com', :from =&gt; 'fromemail@yahoo.com', :subject =&gt; 'Waz up') redirect '/submit' else return "Failed to save data" end end get '/submit' do if session[:subj_id] subj_id = session[:subj_id] code = Digest::SHA1.hexdigest "#{subj_id}" erb :submit, :locals =&gt; {:code =&gt; code, :subj_id =&gt; subj_id} else redirect '/' end end Is this the best way to do this? The email I'm trying to send has lots of variable that will need to be filled out with data coming from javascript variables on the html page. I'm thinking of using an erb template, but I'm not really sure how this would work.
tagged with: email
tagged with: ruby
type: UnansweredQuestion
has title: Sending email with Sinatra error
has answer: http://stackoverflow.com/a/25327632
type: Question

http://stackoverflow.com/q/25349785
score: 0
tagged with: highcharts
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I have been searching and struggling to find a solution for my problem for a long time but no luck. I have a simple screen where i ask user to enter their score. Once they enter their score my graph shows up with my pre-defined average score and highest score. In this case, my average score is 1450 and the highest score is 1900. What i want to do is that once my page is loaded i want my graph displays the average and highest score already. Once user enter his score then it shows up. Below is my code and you can see it here: http://jsfiddle.net/8jomr1wd/ Any idea? $(function () { $('#btn').click(function () { var val1, options; val1 = parseFloat($('input[name=entered]').val()); if ((val1 >= 0) && (val1 <= 1900)) { // start creating the chart options = { chart: { type: 'column' }, title: { text: 'Title' }, subtitle: { text: 'This is subtitle' }, xAxis: { type: 'category', labels: { enabled: true }, legend: { enabled: true }, categories: ['Your score', 'Average', 'Highest Score'] }, legend: { enabled: false }, plotOptions: { series: { borderColor: '#000000', borderWidth: 1, dataLabels: { enabled: true }, colorByPoint: true } }, credits: { enabled: false }, yAxis: { max: 1900, tickInterval: 100, title: 'test' }, tooltip: { enabled: true }, series: [{ name: 'Score', data: [val1, 1450, 1900] }], }; } else { $("#result").append(" Score must be between 0-1900 "); } $('#container').highcharts(options); }) });
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25350357
has title: How to configure Highcharts so that it displays some pre-defined value
type: Question
accepted answer: http://stackoverflow.com/a/25350357

http://stackoverflow.com/comment/39531006
type: Comment
has text: Is your `<?php $showComments?>` supposed to echo something?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25354123

http://stackoverflow.com/a/25351019
upvote count: 1
has comment: http://stackoverflow.com/comment/39558037
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25350995
has comment: http://stackoverflow.com/comment/39526325
answers question: http://stackoverflow.com/q/25350995
type: Answer
downvote count: 0
score: 1
has body: Adjusted cf comment (jsfiddle also modified) See this jsFiddle for $('table').eq(1).find(tr:first').hide(); As far as I understand (from OPs comment on @DavidThomas' answer) the table resides within an iframe. You'll need to get the contents of that frame first, something like var framebody = $($('iframe')[0].contentDocument.body) ,frameSecondTable = framebody.find('table').eq(1); The jsFiddle shows the workings of that.
has comment: http://stackoverflow.com/comment/39525121

object
tags question: http://stackoverflow.com/q/25387588
tag name: object
tags question: http://stackoverflow.com/q/25244482
tags question: http://stackoverflow.com/q/25265788
tags question: http://stackoverflow.com/q/25363551
tags question: http://stackoverflow.com/q/25303955
tags question: http://stackoverflow.com/q/25340916
tags question: http://stackoverflow.com/q/25257979
tags question: http://stackoverflow.com/q/25310889
tags question: http://stackoverflow.com/q/25318824
tags question: http://stackoverflow.com/q/25249367
tags question: http://stackoverflow.com/q/25318687
tags question: http://stackoverflow.com/q/25238251
tags question: http://stackoverflow.com/q/25276460
tags question: http://stackoverflow.com/q/25329678
tags question: http://stackoverflow.com/q/25310900
tags question: http://stackoverflow.com/q/25371672
tags question: http://stackoverflow.com/q/25382709
tags question: http://stackoverflow.com/q/25373907
tags question: http://stackoverflow.com/q/25239553
tags question: http://stackoverflow.com/q/25364175
tags question: http://stackoverflow.com/q/25371841
tags question: http://stackoverflow.com/q/25355478
tags question: http://stackoverflow.com/q/25354154
tags question: http://stackoverflow.com/q/25373720
tags question: http://stackoverflow.com/q/25263086
tags question: http://stackoverflow.com/q/25363165
tags question: http://stackoverflow.com/q/25294263
tags question: http://stackoverflow.com/q/25388371
tags question: http://stackoverflow.com/q/25349552
tags question: http://stackoverflow.com/q/25332784
tags question: http://stackoverflow.com/q/25290573
tags question: http://stackoverflow.com/q/25365864
tags question: http://stackoverflow.com/q/25364410
tags question: http://stackoverflow.com/q/25331316
tags question: http://stackoverflow.com/q/25380144
tags question: http://stackoverflow.com/q/25278200
tags question: http://stackoverflow.com/q/25344430
tags question: http://stackoverflow.com/q/25296593
tags question: http://stackoverflow.com/q/25288964
type: Tag
tags question: http://stackoverflow.com/q/25256585
tags question: http://stackoverflow.com/q/25261002
tags question: http://stackoverflow.com/q/25267421
tags question: http://stackoverflow.com/q/25383417
tags question: http://stackoverflow.com/q/25241364
tags question: http://stackoverflow.com/q/25294821
tags question: http://stackoverflow.com/q/25312753
tags question: http://stackoverflow.com/q/25377621
tags question: http://stackoverflow.com/q/25347617
tags question: http://stackoverflow.com/q/25350364

http://stackoverflow.com/comment/39495217
type: Comment
has text: I tried what you recommended and it makes the font only change when clicked. Maybe I did it wrong but I want to achieve what my JSFiddle is currently doing but only while hovering on #change. Thank you for the reference link, I'm going to try and figure it out off that later on today. I should probably learn the basics before I tinker with all this lol. Thanks again.
type: AnswerComment
comment on: http://stackoverflow.com/a/25322617
score: 0

http://stackoverflow.com/q/25389096
tagged with: javascript
answer count: 2
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39598811
favorite count: 0
has answer: http://stackoverflow.com/a/54659933
upvote count: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25391872
has title: Why is memory usage not correctly updated?
has comment: http://stackoverflow.com/comment/39599336
has comment: http://stackoverflow.com/comment/39597443
tagged with: memory
tagged with: google-chrome
possible better answer: http://stackoverflow.com/a/25391872
type: Question
accepted answer: http://stackoverflow.com/a/54659933
has body: Warning: this code will eventually exhaust your browser tab's memory and crash the tab. In the following fiddle, I have set up a process that leaks a lot of memory and continuously reports how much memory is being used. I am using the performance.memory API, which only seems to be implemented on chrome. The problem is that the amounts reported never change, despite the fact that memory usage is rapidly increasing. Instead, I would expect the number on top to continually increase. Here is the javascript code: (function() { var x = []; function createSomeNodes() { var div, i = 100, frag = document.createDocumentFragment(); for (;i &gt; 0; i--) { div = document.createElement("div"); div.appendChild(document.createTextNode(i + " - "+ new Date().toTimeString())); frag.appendChild(div); } document.getElementById("debug").appendChild(frag); } function clear() { document.getElementById('stats').innerHTML = ''; } function show(stat) { var div = document.getElementById('stats'); div.appendChild(document.createTextNode(stat)); div.appendChild(document.createElement("div")); } var start = Date.now() + 2 * 1000; function grow() { x.push(new Array(1000000).join('x')); createSomeNodes(); setTimeout(grow,40); if (Date.now() &lt; start) { return; } (function() { clear(); var pm = window.performance &amp;&amp; window.performance.memory; if (!pm) { show("no performance.memory api"); return; } var lim = pm.jsHeapSizeLimit, // Memory the JavaScript heap is limited to // Memory allocated on the JavaScript heap (includes free space) total = pm.totalJSHeapSize, used = pm.usedJSHeapSize; // Memory currently being used show("Crash Index (% of Heap Limit Allocated): " + Math.round(total / lim * 100)); show("% of Allocated Memory Used: " + Math.round(used / total * 100)); })(); } setTimeout(grow,1000); })() If I set the variable start to a higher number, I see a higher initial value for what I have called the "crash index," but after it is first shown, even this value does not increase.

http://stackoverflow.com/comment/39475841
score: 0
comment on: http://stackoverflow.com/q/25323737
type: Comment
type: QuestionComment
has text: ie function returned before adding to the collection of models?

http://stackoverflow.com/comment/39610709
score: 0
type: QuestionComment
type: Comment
has text: Looking at the doco for `FormPanel` a key to getting the `SubmitCompleteEvent`s is the creation of generated `target` attribute in the form element being wrapped. It'd be interesting to know that once the module loads - but before the form submits - can you you inspect the form element and compare the `target` attribute between the browsers? ... discrepancy between the browsers suggests a bug, but tracing what's happening behind the scenes may give some clues to a work-around.
comment on: http://stackoverflow.com/q/25275675

http://stackoverflow.com/comment/39438446
score: 1
has text: I'm not sure if there's yet support for HKCU (https://code.google.com/p/chromium/issues/detail?id=237873). Insert the registry value into HKLM and see if it helps.
comment on: http://stackoverflow.com/q/25303039
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25376659
has body: I have this kind of gui where I use setInterval to accomplish a simple kind for hover animation: table { border-collapse: collapse; } table tr td { width: 100px; text-align: center; text-transform: uppercase; border: 1px solid #000; } .red { background: red; } row 1 row 2 row 3 row 4 row 5 row 6 row 7 row 8 row 9 What i want to know is how am I going to redo this using jQuery animate or any method that could still do same functionality instead of using the setInterval to loop over the child elements to hover? Check Output Here.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25377120
has comment: http://stackoverflow.com/comment/39573538
tagged with: jquery
type: Question
has title: Replace setInterval with jQuery Animation
has comment: http://stackoverflow.com/comment/39573623
has comment: http://stackoverflow.com/comment/39573591
accepted answer: http://stackoverflow.com/a/25377120
has comment: http://stackoverflow.com/comment/39573506
score: 0
has comment: http://stackoverflow.com/comment/39573738
answer count: 1
has comment: http://stackoverflow.com/comment/39573596
tagged with: javascript
tagged with: optimization

http://stackoverflow.com/comment/39576506
comment on: http://stackoverflow.com/q/25378295
score: 0
type: Comment
type: QuestionComment
has text: ohh yess!! i knew this would be something this silly.

http://stackoverflow.com/q/25379746
has comment: http://stackoverflow.com/comment/39593543
type: Question
tagged with: internet-explorer
has answer: http://stackoverflow.com/a/25390336
tagged with: javascript
tagged with: jquery
downvote count: 0
answer count: 1
has title: YoutubeAPI video sometimes doesn't load in IE 11
favorite count: 0
has comment: http://stackoverflow.com/comment/39579175
type: UnansweredQuestion
has body: I made website which loads videos by id from database. I am using YoutubeAPI to embed player but in IE player sometimes doesn't load. Here is the script. &lt;script&gt; var player; var player_width = $(window).width() - 100; var player_height = $(window).height() - 50; $('.prev-next').height(player_height); $('.prev-next-but').height(player_height); function onYouTubePlayerAPIReady() { player = new YT.Player('player', { width: player_width, height: player_height, videoId: '&lt;?php echo $yt_id; ?&gt;', events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange } }); } function onPlayerReady(event) { event.target.playVideo(); } function onPlayerStateChange(event) { if(event.data === 0) { document.forms["not_skipped"].submit(); } } I don't have this problem, when I am using simple iframe, but I don't know how to trigger event that way when video finishes.
score: 1
upvote count: 1
tagged with: youtube-api

http://stackoverflow.com/comment/39500204
type: Comment
has text: just realised out code is the same. Your code works for me in Chrome 36.
type: QuestionComment
comment on: http://stackoverflow.com/q/25336428
score: 0

http://stackoverflow.com/a/25383725
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25383574
type: Answer
has body: pass is a method of an array element (some kind of test function)
score: 0
accepted answer of: http://stackoverflow.com/q/25383574

http://stackoverflow.com/q/25302477
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39449176
has answer: http://stackoverflow.com/a/25371208
tagged with: firefox-addon
tagged with: ipc
linked to: http://stackoverflow.com/q/17351922
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39463624
tagged with: sockets
tagged with: google-chrome-extension
type: UnansweredQuestion
upvote count: 1
has body: I'd like you to give a tip for my issue. I'm pretty new to javascript so I don't have such overview. I have a desktop application - it's basically a storega for data (+ some GUI). And there's a set of Javascript files, which are ment to get data from desktop application. These javascript files runs in every browser - for each browser I've made a extension wrapper. There is also a testing java-webkit browser, which injects these files directly (so no extension's API). So I need to create communication API between Javascript and desktop application, which is able to run in every environment (browser-specific implementation would be too "expensive" to maintain). So I was thinking of sockets. But there is only Websocket protocol support in javascript. Client looks simple, but I'm afraid that server-side would require too much work and dependecies. Could you give me a tip, for other technologies, which compatible with my requirments? And second question - to the sockets - would it be even possible to access socket on "localhost:port" from these's javascript files, when they are Content scripts running in page's context? Thank you for advice.
has title: Javascript access desktop application

http://stackoverflow.com/q/25247021
has answer: http://stackoverflow.com/a/25247707
favorite count: 0
has answer: http://stackoverflow.com/a/25247168
score: 2
has body: I am trying to figure out how to clone this div so that the cloned version has product 2 as its class name as well as the input nams to have rate2 and notes2. Trying to append in here **** Add another product ================================================================================= I have a rough idea of how to clone it but thats as far as my knowledge goes. I have looked at other posts and can't see an easy way of doing it. JQuery- $(document).ready(function(){ $("#addproduct").click(function(){ $(".product1").clone().appendTo("body"); }); }); Thanks for any help!
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39333281
tagged with: clone
downvote count: 0
has title: Clone and change classname +1 and name of fields
type: Question
upvote count: 2
accepted answer: http://stackoverflow.com/a/25247969
tagged with: javascript
tagged with: jquery
answer count: 3
has answer: http://stackoverflow.com/a/25247969
possible better answer: http://stackoverflow.com/a/25247707

http://stackoverflow.com/q/25327988
tagged with: javascript
has answer: http://stackoverflow.com/a/25328269
has body: Im trying to change a mask to an image in a html5 canvas when the mouse enters the canvas. When the mouse enters the canvas i draw a shape thats gonna act as a mask. It draws as i want but it wont mask the image. The function that draws the mask is drawLine(); What is wrong here? var canvas = document.getElementById('canvas'); var context = canvas.getContext('2d'); var img = document.createElement('IMG'); var mY; var mX; img.onload = function () { context.save(); context.beginPath(); context.moveTo(0, 0); context.lineTo(160, 600); context.rect(0, 0, 160, 600); context.closePath(); context.clip(); context.drawImage(img, 0, 0); context.restore(); }; img.src = "http://placekitten.com/160/600"; canvas.addEventListener('mouseenter', function(evt) { var mousePos = getMousePos(canvas, evt); var message = mousePos.y + ', ' + mousePos.x; mY = mousePos.y; mX = mousePos.x; drawLine(); }, false); function getMousePos(canvas, evt) { var rect = canvas.getBoundingClientRect(); return { x: evt.clientX - rect.left, y: evt.clientY - rect.top }; } function drawLine() { if(mX &gt; 80) { context.restore(); context.fillStyle = "rgb(000,000,000)"; context.beginPath(); context.moveTo(160, mY); context.lineTo(0,mY+setCutAngle()); context.lineTo(0,600); context.lineTo(160,600); context.fill(); context.closePath(); } else { } context.stroke(); } function setCutAngle() { return Math.floor(Math.random() * 45) + 10; }
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/25328269
has comment: http://stackoverflow.com/comment/39484080
has comment: http://stackoverflow.com/comment/39485042
type: AnsweredQuestion
type: Question
tagged with: canvas
has title: Mask image in html canvas

http://stackoverflow.com/a/25369454
has comment: http://stackoverflow.com/comment/39559804
score: 9
has comment: http://stackoverflow.com/comment/39559900
has body: Both John Conde's and ryeballar's answers are correct and will work. If you want to get too geeky: John's has the downside that it has to make two decisions per $digest loop (it has to decide whether to add/remove center and it has to decide whether to add/remove left), when clearly only one is needed. Ryeballar's relies on the ternary operator which is probably going to be removed at some point (because the view should not contain any logic). (We can't be sure it will indeed be removed and it probably won't be any time soon, but if there is a more "safe" solution, why not ?) So, you can do the following as an alternative: ng-class="{true:'center',false:'left'}[page.isSelected(1)]"
answers question: http://stackoverflow.com/q/25369250
upvote count: 9
type: Answer
downvote count: 0

http://stackoverflow.com/q/25251163
has comment: http://stackoverflow.com/comment/39341647
has comment: http://stackoverflow.com/comment/39342452
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39341513
score: 0
answer count: 1
has body: Have some js $(document).ready(function(){ var winHeight = window.innerHeight ? function() { return window.innerHeight; } : function() { return document.documentElement.clientHeight; }; $('.first-block').height(winHeight); $(window).scroll(function(){ var firstBlockHeight = winHeight(); var scrollTop= $('body').scrollTop(); if (scrollTop &gt; 0 &amp;&amp; scrollTop &lt; firstBlockHeight/2 &amp;&amp; $('body').hasClass('scrolled') === false) { $("body") .animate({ scrollTop: firstBlockHeight+10 }, 600) .addClass('scrolled'); } else if (scrollTop==0) { $("body") .animate({ scrollTop: 0 }, 600) .removeClass('scrolled'); } }); }); which scrolls first block 100% height by single mouse wheel. This code dont work in firefox.. And there are bugs if play with scrolling.. Help please fix that and add cross browser support. See please JsFiddle. Thanks.
has answer: http://stackoverflow.com/a/25270080
accepted answer: http://stackoverflow.com/a/25270080
has comment: http://stackoverflow.com/comment/39342056
has title: cross browser mouse wheel, to scroll 100% browser height by one single wheel
tagged with: css
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/9471286
tagged with: scroll
has comment: http://stackoverflow.com/comment/39341363
type: Question
has comment: http://stackoverflow.com/comment/39341556
tagged with: mousewheel

http://stackoverflow.com/a/72507384
type: Answer
answers question: http://stackoverflow.com/q/25285393
downvote count: 1
score: -1
has body: there are some efforts from the pdfmake community around this issue, an potential solution would be using this library which is enables the use of the system fonts. This will reduce your js bundle since there is no need to add the ~900KB of the vfs_fonts.js
upvote count: 0

http://stackoverflow.com/q/25251757
score: 0
has comment: http://stackoverflow.com/comment/39342844
has comment: http://stackoverflow.com/comment/39343154
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39342942
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I have a table that is auto-generated: function updateDataTable(data) { // Clear the data table. $("#getData").empty(); // Create new data table. $("#getData").append(" "); // Create header for data table. $("#resources").append(" " + "" + "Project" + "" + "" + "Culture" + "" + "" + "Resource" + "" + "" + "Comments" + "" + " "); $("#getData").append(" "); // For each item, append to data table. $.each(data, function (i, item) { $("#resources").append(" " + "" + item["Project"] + "" + "" + item["Culture"] + "" + "" + item["ResourceValue"] + "" + "" + item["Comments"] + "" + " "); }); and here is CSS for the table: div#resources div > span { font-size: 12px; display: table-cell; border: 1px solid grey; overflow-wrap: break-word; } I'm just curious what attribute is deciding the width of each cell, because when I look at it, some columns with more content do not get more space, is there anyway to set that columns with more content get more space? And sorry for bonus question: How to make each cell scrollable vertically? I tried overflow-y:scroll; but it didn't work.
answer count: 0
has comment: http://stackoverflow.com/comment/39342584
has comment: http://stackoverflow.com/comment/39342724
has comment: http://stackoverflow.com/comment/39343086
type: Question
has comment: http://stackoverflow.com/comment/39342812
has comment: http://stackoverflow.com/comment/39342557
tagged with: javascript
has title: What is deciding the width of my table-column? And how to set cells scrollable vertically?

http://stackoverflow.com/a/25240031
has body: Just for the LOLs, here's a one-liner demonstrating how you can call a jQuery function by (variable) name, and also use modulo arithmetic to avoid two separate calls to .getDay(): $('#div1')[(date.getDay() + 6) % 7 &lt; 5 ? 'show' : 'hide'](); The modulo arithmetic works thus: Sun = 0, + 6 = 6, mod 7 = 6 Mon = 1, + 6 = 7, mod 7 = 0 ... Fri = 5, + 6 = 11, mod 7 = 4 Sat = 6, + 6 = 12, mod 7 = 5 Hence Monday to Friday give 0 .. 4, and Saturday and Sunday give 5 and 6, allowing a single comparison to check for weekend vs weekday. For posterity, here's a potentially useful helper function: Object.defineProperty(Date.prototype, 'isWeekday', { value: function() { return (this.getDay() + 6) % 7 &lt;= 4; })); usage: if (mydate.isWeekday()) { ... }
answers question: http://stackoverflow.com/q/25239771
score: 0
type: Answer

http://stackoverflow.com/a/25286238
score: 0
has comment: http://stackoverflow.com/comment/39406465
has body: You could use Jquery for that $(function() { $('#form').delay(milliseconds).submit(); });
answers question: http://stackoverflow.com/q/25286049
type: Answer

http://stackoverflow.com/q/25329648
tagged with: background
has title: Get background color from an image using color-thief
has comment: http://stackoverflow.com/comment/39487134
tagged with: javascript
type: UnansweredQuestion
tagged with: rgb
tagged with: image
has body: I am working on a script to grab the dominant color from an image using color-thief.js and then use that color as background-color. I have never used this plugin before so I don't know what I am exactly doing wrong. The background color is not applying though. $(document).ready(function($) { $(".box img").load(function(){ var dominantColor = getDominantColor($(this)); $(this).parent().css("background-color", "rgb("+dominantColor+")"); }); }); Thanks in advcance.
has comment: http://stackoverflow.com/comment/39487305
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25329782
favorite count: 0
has comment: http://stackoverflow.com/comment/39487006
type: Question
upvote count: 2
answer count: 1

http://stackoverflow.com/a/25261753
score: 4
has body: You need to append new value to existing array stored in local storage, not new empty array: var LS = { set: function (key, val) { return localStorage.setItem(key, JSON.stringify(val)); }, get: function (key) { return JSON.parse(localStorage.getItem(key)); } }; var itemArray = LS.get('Viewed') || []; var myItem = $("li#ref").data("ref"); if (itemArray.indexOf(myItem) !== -1) { itemArray.push(myItem); } LS.set("Viewed", itemArray); You should probably also check if the value is already in array to avoid duplicates.
has comment: http://stackoverflow.com/comment/39360538
has comment: http://stackoverflow.com/comment/39361968
accepted answer of: http://stackoverflow.com/q/25261670
answers question: http://stackoverflow.com/q/25261670
has comment: http://stackoverflow.com/comment/39361245
type: Answer
upvote count: 4
downvote count: 0
type: AcceptedAnswer

opencv
type: Tag
tags question: http://stackoverflow.com/q/25239391
tag name: opencv

http://stackoverflow.com/comment/39508867
comment on: http://stackoverflow.com/q/25340931
score: 0
type: Comment
type: QuestionComment
has text: @runTarm I added a delay time but it didn't work :(

http://stackoverflow.com/q/25322971
type: Question
tagged with: debugging
tagged with: internet-explorer-9
tagged with: javascript
has title: Dojo require AMD modules debugging IE9
has answer: http://stackoverflow.com/a/25335639
score: 0
answer count: 1
has body: Recently an app I'm working on made the move from an old dojo version 1.2 up to 1.8 While using dojo 1.2, RequireJS was used to load modules. The problem with dojo's require seems to be that it is using XHR+eval for script files, while RequireJS loaded the scripts in some other way, perhaps tags? This have made debugging in IE9 really hard as the source files cannot be found, since they are eval'd and anonymous. Firebug (1.12.4) seems to have this issue aswell, but randomly. It also makes finding the script errors really hard since they are somewhere in dojo.js. Is there any way to have dojo load non-dojo modules using the RequireJS pattern? Dojo version can not be changed and going back to RequireJS is not really the best option either. Are there any tools to make debugging easier in IE9? Really need to view those script files.
type: UnansweredQuestion
tagged with: requirejs
tagged with: dojo

http://stackoverflow.com/q/25248154
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25248501
accepted answer: http://stackoverflow.com/a/25248501
possible better answer: http://stackoverflow.com/a/25250819
type: Question
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
has body: I'm working on a partial view web page using angularjs for the different states. This is my main page where I will be loading in all the partial views. I have a side navbar used to navigate load in the views: !DOCTYPE html> Settings Defaults Carriers Trailers Shop Shifts Bend Class Capacities //where page is loaded in Here is a look at Sidebar.js: var toggle, mainLeft; function toggleNav() { if (toggle == 0) { toggle = 1; $("#sidebar").toggle('slide'); $("#main").animate({ left: "10", }, 350, function () { }); $('.mainContent').animate({ width: '100%' }, 500); $('.toggleClass').addClass('glyphicon-chevron-right').removeClass('glyphicon-chevron-left'); } else { toggle = 0; $("#sidebar").toggle('slide'); $("#main").animate({ left: mainLeft, }, 350, function () { }); $('.mainContent').animate({ width: '85%' }, 500); $('.toggleClass').addClass('glyphicon-chevron-left').removeClass('glyphicon-chevron-right'); } } $(document).ready(function () { var left = $('#sidebar').width(); mainLeft = left + 50; $('#main').css({ left: mainLeft }); toggle = 0; $('#btnToggle span').addClass('glyphicon glyphicon-chevron-left'); }); $(document).ready(function () { $('#navList li').click(function () { $(this).siblings('li').removeClass('active'); $(this).addClass('active'); }); }); And my navigation CSS: /* Sidebar navigation */ .nav-sidebar { margin-right: -21px; /* 20px padding + 1px border */ margin-bottom: 20px; margin-left: -20px; } .nav-sidebar > li > a { padding-right: 20px; padding-left: 20px; color:#8b6d80; } .nav-sidebar > .active > a { color: #fff; background-color: #8b6d80; } .listItem { background-color:whitesmoke; font-size:medium; } .selectedItem { border-left:solid 5px; border-color:#8b6d80; background-color:#EEEEEE; font-size:medium; } I'm setting the clicked link with a CSS class "active" to make apparent what link they have clicked. Angularjs is very nice where it remembers the users breadcrumbs and takes care of loading the correct page when the back button is used. Ho…
has answer: http://stackoverflow.com/a/25250819
has title: Updating nav CSS on shell page when using Angularjs
tagged with: angularjs

http://stackoverflow.com/comment/39435654
has text: The error message says that `window.Taggle` is *not* a defined property *when* the statement `new Taggle(..)` is executed. Find out why; but don't doubt the error.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25302103

http://stackoverflow.com/q/25336564
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39500470
type: AnsweredQuestion
upvote count: 0
tagged with: php
type: Question
score: -2
has title: AngularJS passing data to PHP
downvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/25336915
accepted answer: http://stackoverflow.com/a/25336915
tagged with: javascript
has comment: http://stackoverflow.com/comment/39500439
favorite count: 0
has body: Not sure if anyone understand my requirements since I'm still new to AngularJs but how can I pass a data which is stored in angular's scope to PHP? I know if I would use it in html code I can access it by calling {{scope.data}} but how do I achieve this by passing it to PHP? &lt;td style="width: 5%" rowspan="2" valign="top"&gt; &lt;?php echo BsHtml::imageRounded(Yii::app()-&gt;baseUrl . {{user.avatar}} ); ?&gt; &lt;/td&gt; Thanks Guys...

c#
tags question: http://stackoverflow.com/q/25295492
tags question: http://stackoverflow.com/q/25305591
tags question: http://stackoverflow.com/q/25355386
tags question: http://stackoverflow.com/q/25310025
tags question: http://stackoverflow.com/q/25334986
tags question: http://stackoverflow.com/q/25338529
tags question: http://stackoverflow.com/q/25236946
tags question: http://stackoverflow.com/q/25378854
tags question: http://stackoverflow.com/q/25317668
tag name: c#
tags question: http://stackoverflow.com/q/25242519
tags question: http://stackoverflow.com/q/25374782
tags question: http://stackoverflow.com/q/25372086
tags question: http://stackoverflow.com/q/25259853
tags question: http://stackoverflow.com/q/25372388
tags question: http://stackoverflow.com/q/25305846
tags question: http://stackoverflow.com/q/25234313
tags question: http://stackoverflow.com/q/25236883
tags question: http://stackoverflow.com/q/25236989
tags question: http://stackoverflow.com/q/25382542
tags question: http://stackoverflow.com/q/25294263
tags question: http://stackoverflow.com/q/25382221
tags question: http://stackoverflow.com/q/25358353
tags question: http://stackoverflow.com/q/25260371
tags question: http://stackoverflow.com/q/25360395
tags question: http://stackoverflow.com/q/25262029
tags question: http://stackoverflow.com/q/25318439
tags question: http://stackoverflow.com/q/25250192
tags question: http://stackoverflow.com/q/25358877
tags question: http://stackoverflow.com/q/25376595
tags question: http://stackoverflow.com/q/25273213
tags question: http://stackoverflow.com/q/25262450
tags question: http://stackoverflow.com/q/25279819
tags question: http://stackoverflow.com/q/25270972
tags question: http://stackoverflow.com/q/25355037
tags question: http://stackoverflow.com/q/25233324
tags question: http://stackoverflow.com/q/25302238
tags question: http://stackoverflow.com/q/25237309
tags question: http://stackoverflow.com/q/25304099
tags question: http://stackoverflow.com/q/25240630
tags question: http://stackoverflow.com/q/25251874
tags question: http://stackoverflow.com/q/25305364
tags question: http://stackoverflow.com/q/25310055
tags question: http://stackoverflow.com/q/25281176
tags question: http://stackoverflow.com/q/25323027
tags question: http://stackoverflow.com/q/25230249
tags question: http://stackoverflow.com/q/25333190
tags question: http://stackoverflow.com/q/25338550
tags question: http://stackoverflow.com/q/25383338
tags question: http://stackoverflow.com/q/25256997
type: Tag
tags question: http://stackoverflow.com/q/25266579
tags question: http://stackoverflow.com/q/25366891
tags question: http://stackoverflow.com/q/25381013
tags question: http://stackoverflow.com/q/25378068
tags question: http://stackoverflow.com/q/25238589
tags question: http://stackoverflow.com/q/25243973
tags question: http://stackoverflow.com/q/25240312
tags question: http://stackoverflow.com/q/25289091
tags question: http://stackoverflow.com/q/25266322
tags question: http://stackoverflow.com/q/25389114
tags question: http://stackoverflow.com/q/25291789
tags question: http://stackoverflow.com/q/25324960
tags question: http://stackoverflow.com/q/25334290
tags question: http://stackoverflow.com/q/25301627
tags question: http://stackoverflow.com/q/25306238
tags question: http://stackoverflow.com/q/25346356
tags question: http://stackoverflow.com/q/25380520
tags question: http://stackoverflow.com/q/25287481
tags question: http://stackoverflow.com/q/25278052
tags question: http://stackoverflow.com/q/25324901

http://stackoverflow.com/comment/39338956
has text: @XinYin and yes, outputData is a reactive value.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25247852

http://stackoverflow.com/a/25299100
upvote count: 3
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25298984
score: 3
has body: Within your function: var x = function(){ var result = 5, clear = function(){ result = 0; The identifier result in this function has a closure to the variable result in the outer function (i.e. outer execution context). }; return { result: result, That assigns the value of the variable named result to the object property named result. clear: clear } } So later when you call y.clear() you are setting the value of the variable held in the closure, which does not update the object property named result. If you want x to be a constructor, then: function X() { this.result = 5; this.clear = function() { this.result = 0; } } So now: var y = new X(); y.clear(); console.log(y.result); // 0 Note that it is convention for constructors to have a name starting with a capital letter. You can learn more about how to use the new operator on MDN. To leverage ECMAScript inheritance, put the clear function on the constructor's prototype so that all instances inherit the one method, rather than each having its own: function X() { this.result = 5; } X.prototype.clear = function() { this.result = 0; }

http://stackoverflow.com/a/25375266
answers question: http://stackoverflow.com/q/25374840
score: 0
has body: please add the following hidden element: and inside the script update the hidden input $(document).ready(function(){ $("#calculator-form").submit(function(){ //bind to submit trigger var input=$("#number"); if (input.val()<25){ // check if the value is less than 25 $("#hidden-number").val((input.val)*0.90); // update the value with the new value and submit } }); }); then in your back end, instead of reading from height read from hheight $height=$_POST['hheight'];
type: Answer
has comment: http://stackoverflow.com/comment/39572205
has comment: http://stackoverflow.com/comment/39575194

http://stackoverflow.com/q/25294756
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39421979
has answer: http://stackoverflow.com/a/25294927
has body: I'm trying to filter urls I grabbed using json but the code is not working $.each(data.next, function(z,item){ JSON.stringify(item.data.url); var url =item.data.url; if (url.substring(0,11)=='http://youtub'){ var x = '&lt;p&gt;' + url + '&lt;/p&gt;'; //this line and the one after that is just to put it in html $(x).appendTo("#text"); } }); Where did I make the error? I've never used stringify before so is that it?
has title: filtering object so that only certain links are accepted
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39422019
has comment: http://stackoverflow.com/comment/39421971
type: Question
has comment: http://stackoverflow.com/comment/39426742
tagged with: javascript

http://stackoverflow.com/a/25361422
score: 1
has comment: http://stackoverflow.com/comment/39544366
has comment: http://stackoverflow.com/comment/39544207
answers question: http://stackoverflow.com/q/25361296
upvote count: 1
type: Answer
has body: Parse and format the numeric portion using parseFloat and Number.toString. Add a special case to handle LBs: function formatPrice(price) { return parseFloat(price) + (price.match(/ .+$/) ? price.match(/ (.+)$/)[1] : ""); } console.log(formatPrice("1.00")); // 1 console.log(formatPrice("1.09")); // 1.09 console.log(formatPrice("1.09000")); // 1.09 console.log(formatPrice("1.00 lb")); // 1lb console.log(formatPrice("1.09 lb")); // 1.09lb console.log(formatPrice("1.09 kg")); // 1.09kg
downvote count: 0

http://stackoverflow.com/a/25234870
has comment: http://stackoverflow.com/comment/39322405
score: 1
answers question: http://stackoverflow.com/q/25234414
has body: It's probably because of the match rule "matches" : ["*://*/"]. You need to change it to "matches" : ["*://*/*"] because currently it only matches tabs that have no path on them. E.g. http://example.com/ will match but http://example.co.uk/foo will not match.
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25234414
type: Answer

http://stackoverflow.com/q/25380093
upvote count: 2
tagged with: google-chrome
downvote count: 1
has body: Newbie web developer here! I have a logo embedded in a navigation bar which is showing differently in Chrome vs. in IE version 10 running document standards. The page is running bootstrap CSS. The code is as follows: Team Mission Charity Events Past Contact Gallery In IE the output is expected, like this (ignore the black box, that's me censoring my employer): In Chrome, it looks like this: The CSS for the image under bootstrap.css and list is as follows: img { width: auto; height: auto; max-width: 100%; vertical-align: middle; border: 0; -ms-interpolation-mode: bicubic; } li { line-height: 20px; } Does anyone know what I'm doing wrong? EDIT: Following multiple suggestions to try stating a width, I put in "width: 100px;" after the 'height' in the html code. The image resizes correctly in IE10 but maxes out at 64px on chrome. Looking at Computed Style shows:
type: Question
has title: Image displays differently in Chrome and in IE
tagged with: internet-explorer
tagged with: javascript
has answer: http://stackoverflow.com/a/25380156
answer count: 3
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39579491
has comment: http://stackoverflow.com/comment/39579625
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25380154
tagged with: css
has comment: http://stackoverflow.com/comment/39579665
has answer: http://stackoverflow.com/a/25380207

http://stackoverflow.com/comment/39627826
comment on: http://stackoverflow.com/q/25379340
score: 0
has text: Hi, you are right, have fixed you notices in the code.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/29663469
score: 1
upvote count: 1
has body: Here's my code for doing that logic. Thanks! function _moveElementObject(object, from, to) { var newObjects = []; var newObject = {}; var oldObject = {}; var firstObject = {}; var lastObject = {}; var toMoveKey = ""; var toMoveValue; oldObject = object; var objLength = _countProperties(oldObject); var keyNo = 1; for (var key in oldObject) { if (keyNo == from) { toMoveKey = key; toMoveValue = oldObject[key]; } keyNo++; } console.log(oldObject); keyNo = 1; for (var key in oldObject) { if (keyNo &lt; to) { firstObject[key] = oldObject[key]; newObject[key] = firstObject[key]; } keyNo++; } console.log(firstObject); keyNo = 1; for (var key in oldObject) { if (to &lt;= objLength) { lastObject[key] = oldObject[key]; } keyNo++; } delete lastObject[toMoveKey]; newObject[toMoveKey] = toMoveValue; for (var key in lastObject) { newObject[key] = lastObject[key]; } console.log(newObject); console.log("push"); return newObject; } var sampleObj = { "element1" : {} // object, "element2" : {}, "element3" : {} }; _moveElementObject(sampleObj,3,1); // output object, { "element3" : {}, "element1" : {}, "element2" : {}, }
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25261002

http://stackoverflow.com/q/25335789
has body: For example: var array = ['A','B','C','D','E','A','B','C','D','E','A','B','C','D','E']; function test(cb) { var newArray = []; for (var i = 0; i &lt; array.length; i++) { newArray.push(array[i]); } cb(newArray); } test(function (data) { console.log(data); }); console.log('test'); http://jsfiddle.net/7sz7Ldoa/ Let's say that the array has millions of values. It will take long for the newArray to get populated, and meanwhile my other code (console.log) isn't running. Why isn't it async by default like a lot of things are in JS? How can I make it more efficient by making it async?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39499076
type: Question
score: 0
has comment: http://stackoverflow.com/comment/39499136
has comment: http://stackoverflow.com/comment/39499211
has comment: http://stackoverflow.com/comment/39499048
has title: Why are only some things async in JS and not things like for loops?
has comment: http://stackoverflow.com/comment/39499049
has comment: http://stackoverflow.com/comment/39499063
has comment: http://stackoverflow.com/comment/39499123
linked to: http://stackoverflow.com/q/10344498
answer count: 0
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/10344498
has comment: http://stackoverflow.com/comment/39499127

http://stackoverflow.com/q/25310055
has answer: http://stackoverflow.com/a/28611606
score: 1
tagged with: bootstrap-typeahead
downvote count: 1
type: Question
upvote count: 2
tagged with: c#
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39450576
has answer: http://stackoverflow.com/a/25311250
has body: I'm trying to implement a simple WebMethod in C# to search a db of 50,000 people. I'm using Twitter Bootstrap bloodhound.js and typeahead.js to tokenize and autocomplete the responses. When I run this code, typeahead shows a dropdown menu with undefined. How can I correctly process the JSON response to strip out the d object returned by .NET WebMethod and correctly pass my records to Bloodhound? I've tried this using the dataFilter method provided by jQuery's $.ajax, but it's not working for me. C# WebMethod: [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public static object searchStaffByName(string q) { using (App_Data.DQDBDataContext dc = new App_Data.DQDBDataContext()) { var results = dc.getStaffDetails(q).ToList(); return new { Status = "OK", Records = results, Count = results.Count }; } } Typeahead JS implementation: var textlookup = new Bloodhound({ datumTokenizer: function (d) { return Bloodhound.tokenizers.whitespace(d.val); }, queryTokenizer: Bloodhound.tokenizers.whitespace, remote: { url: 'Search.aspx/searchStaffByName', replace: function (url, query) { searchQuery = query; return url; }, ajax: { beforeSend: function (jqXhr, settings) { settings.data = JSON.stringify({ q: searchQuery }); jqXhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8'); }, dataFilter: function (data, type) { if (type === "json") { data = $.parseJSON(data); if (typeof data.d === 'object' &amp;&amp; data.d.Count &gt; 0) { return data.d.Records; } } }, type: 'POST' } } }); textlookup.initialize(); $('.autocomplete').typeahead({ hint: true, highlight: true, minLength: 3 }, { name: 'textlookup', displayKey: 'Forename', source: textlookup.ttAdapter() }); Sample JSON Response: { "d": { "Status":"OK", "Records": [{ "id":45711192, "phone":"514-579-5721", "Forename":"Jayden", "Surname":"Adams", "DOB":"\/Date(990226800000)\/" }, { "id":12603644, "phone":"333-143-9094", "Forename":"Jake", "Surname":"Adams", "DOB":"\/Date(43542000000)\/" }, { "id":68196438, …
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: Typeahead.js and Bloodhound.js integration with C# WebForms WebMethod

http://stackoverflow.com/comment/39586976
has text: @DarkFalcon yeah, thats what I was seeing. But can't figure our how to 'extend' that original method so it would have additional key/value inside filter_item object..
type: QuestionComment
comment on: http://stackoverflow.com/q/25383614
score: 0
type: Comment

http://stackoverflow.com/comment/94297488
type: Comment
comment on: http://stackoverflow.com/a/25359714
has text: Unfortunately this will not polyfill iframe environments... just the parent window
type: AnswerComment
score: 0

http://stackoverflow.com/q/25370065
upvote count: 1
answer count: 1
tagged with: zeroclipboard
favorite count: 0
tagged with: clipboard
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25624149
has body: I'm using JavaScript to analyze data locally. I'm trying to implement ZeroClipboard to copy a fairly large HTML table to the clipboard. I got the sample code to work in the following JSFiddle. I can also run this code successfully from a web server. The problem I'm having, however, is that this exact code won't work locally in the browser, which is where it will be used. Why will it not work locally, and how can I get it to work? OR Is there another way to copy a huge HTML table to the clipboard? Looking for a front-end solution. Below is the code: Copy to Clipboard
downvote count: 0
score: 1
type: Question
tagged with: javascript
tagged with: copy
has title: ZeroClipboard Implementation
tagged with: html-table

http://stackoverflow.com/comment/39371744
score: 0
type: Comment
type: QuestionComment
has text: Why can't people create jsfiddle and post it here to their question? why? 1st world problems...
comment on: http://stackoverflow.com/q/25267468

http://stackoverflow.com/q/25269025
accepted answer: http://stackoverflow.com/a/25269061
tagged with: google-maps-api-3
has body: In our app, we use the google maps api(Javascript). Overall it works fine but from time to time it would stop to work because of what I believe is a change in the google maps api. But I can't help to think that there is no way google is changing the behavior of the API like this overnight, so I must do something wrong. Basically to get the center of the map I was doing: map.getCenter().k+","+map.getCenter().B But last night it was changed to map.getCenter().k+","+map.getCenter().A This must not be the right thing to do, because it's the third time they change the attribute.
score: 0
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/18087008
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25269061
duplicate of: http://stackoverflow.com/q/18087008
upvote count: 1
downvote count: 1
type: Question
tagged with: google-maps
has comment: http://stackoverflow.com/comment/39374336
has comment: http://stackoverflow.com/comment/39374168
has title: Google Maps API. What am i doing wrong?
tagged with: javascript

http://stackoverflow.com/q/25269451
has body: In Google Chrome & Safari, with a parent page containing an iframe: Parent Cras justo odio, dapibus ac facilisis in, egestas eget quam. Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Nullam quis risus eget urna mollis ornare vel eu leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur blandit tempus porttitor. Maecenas faucibus mollis interdum. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Vestibulum id ligula porta felis euismod semper. If the iframe uses window.replaceState with a hash: Frame ...on window load, the parent window will jump to the scroll position of the iframe: Everything I've read about window.replaceState suggests that it shouldn't maniuplate the parent frame at all. Am I missing something?
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
answer count: 0
type: UnansweredQuestion
tagged with: iframe
upvote count: 1
tagged with: html5-history
score: 1
has title: window.replaceState in iframe causes parent window scroll jump?
type: Question
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25316508
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25316448
has body: An object would suit your needs best in this case. You can use map() to create one from the option elements in any given select. Try this: var values = $('#mySelect option').map(function() { var obj = {}; obj[$(this).text()] = $(this).val(); return obj; }); Example fiddle Given this HTML: Foo Bar The returned object would look like this: [ { "Foo": "1" }, { "Bar": "2" } ]
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39409924
has text: it is not `bar()` but `foo.bar()` where your function resides
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25288540
score: 1

http://stackoverflow.com/a/25318169
accepted answer of: http://stackoverflow.com/q/25316577
answers question: http://stackoverflow.com/q/25316577
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: Pretty bummed out. All I had to do was: new_list = request.POST.getlist("alerts_array[]", None) If you are passing in a list through ajax, you access that array through getlist and key[]
downvote count: 0
score: 1

http://stackoverflow.com/comment/39378718
score: 0
type: Comment
has text: Yes, it have like 40 records. I've removed the or and put to search only for {from_id: from, to_id: to}. It worked fine, but with $or condition the error comes back.
comment on: http://stackoverflow.com/a/25271247
type: AnswerComment

http://stackoverflow.com/a/25278024
answers question: http://stackoverflow.com/q/25277975
has comment: http://stackoverflow.com/comment/39390588
has body: if you write document before getElementById it should work fine . Here is jsBin example JSBIN var a = document.getElementById('abc'); alert(a.id) // it works. var b = document.getElementsByClassName('qwe'); alert(b[0].id); // this is not working. returns only empty space : ''
downvote count: 0
has comment: http://stackoverflow.com/comment/39390589
type: Answer
score: 1
upvote count: 1

titanium-alloy
tags question: http://stackoverflow.com/q/25310304
tag name: titanium-alloy
type: Tag

http://stackoverflow.com/a/25342247
score: 1
upvote count: 1
has body: You could use indexOf: var duplicates = 0; $.each(obj,function(index,Object) { console.log(Object.From_Name); if(nam.indexOf(Object.From_Name) == -1) { nam += Object.From_Name } else { duplicates += 1; } }) console.log(duplicates); This will look into the string, if there's a already a substring it will skip the concatenation part.
has comment: http://stackoverflow.com/comment/39510319
downvote count: 0
answers question: http://stackoverflow.com/q/25342202
type: Answer
has comment: http://stackoverflow.com/comment/39510341

http://stackoverflow.com/comment/39434792
type: QuestionComment
comment on: http://stackoverflow.com/q/25301627
has text: it is CreateLeave.aspx/GetCurrentTime in your question
type: Comment
score: 1

http://stackoverflow.com/q/25344259
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39513798
tagged with: node.js
has answer: http://stackoverflow.com/a/25413720
type: AnsweredQuestion
has body: I'm trying to run a program built with GHCJS using node.js. However, I get the following error: SyntaxError: Too many variables declared (only 131071 allowed) at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:906:3 Is it possible to increase the number of allowed variables in node? Is there a better utility for running JS files which would allow for more variables Are there optimization tools which could automatically reduce the number of variables? Note that this is machine generated JS, so I have no desire to go through by hand and reduce the number of variables. Any ideas are welcome.
has comment: http://stackoverflow.com/comment/39530854
score: 7
upvote count: 7
has comment: http://stackoverflow.com/comment/39518369
type: Question
has comment: http://stackoverflow.com/comment/39516675
accepted answer: http://stackoverflow.com/a/25413720
tagged with: haskell
tagged with: ghc
has title: Too many variables to run GHCJS program with Node
tagged with: ghcjs
answer count: 1
downvote count: 0

validation
tags question: http://stackoverflow.com/q/25308708
tags question: http://stackoverflow.com/q/25313167
tags question: http://stackoverflow.com/q/25308848
tags question: http://stackoverflow.com/q/25348891
tags question: http://stackoverflow.com/q/25294352
tags question: http://stackoverflow.com/q/25320091
tags question: http://stackoverflow.com/q/25373124
tags question: http://stackoverflow.com/q/25278251
tags question: http://stackoverflow.com/q/25375567
tags question: http://stackoverflow.com/q/25356214
type: Tag
tag name: validation
tags question: http://stackoverflow.com/q/25387092
tags question: http://stackoverflow.com/q/25234255
tags question: http://stackoverflow.com/q/25330571
tags question: http://stackoverflow.com/q/25315494
tags question: http://stackoverflow.com/q/25324960
tags question: http://stackoverflow.com/q/25238853
tags question: http://stackoverflow.com/q/25320189
tags question: http://stackoverflow.com/q/25306238
tags question: http://stackoverflow.com/q/25326659
tags question: http://stackoverflow.com/q/25310125
tags question: http://stackoverflow.com/q/25321140
tags question: http://stackoverflow.com/q/25367073
tags question: http://stackoverflow.com/q/25320256
tags question: http://stackoverflow.com/q/25254085
tags question: http://stackoverflow.com/q/25269159
tags question: http://stackoverflow.com/q/25291876
tags question: http://stackoverflow.com/q/25361874
tags question: http://stackoverflow.com/q/25335794
tags question: http://stackoverflow.com/q/25253892
tags question: http://stackoverflow.com/q/25285840
tags question: http://stackoverflow.com/q/25243662
tags question: http://stackoverflow.com/q/25280758
tags question: http://stackoverflow.com/q/25240503
tags question: http://stackoverflow.com/q/25250377
tags question: http://stackoverflow.com/q/25264026
tags question: http://stackoverflow.com/q/25381434
tags question: http://stackoverflow.com/q/25251215
tags question: http://stackoverflow.com/q/25372374
tags question: http://stackoverflow.com/q/25301132
tags question: http://stackoverflow.com/q/25297720
tags question: http://stackoverflow.com/q/25349916
tags question: http://stackoverflow.com/q/25275560
tags question: http://stackoverflow.com/q/25283836
tags question: http://stackoverflow.com/q/25245205
tags question: http://stackoverflow.com/q/25280853
tags question: http://stackoverflow.com/q/25341927
tags question: http://stackoverflow.com/q/25370386

urlfetch
tags question: http://stackoverflow.com/q/25331087
tag name: urlfetch
type: Tag

http://stackoverflow.com/a/25369947
score: 0
type: Answer
has body: Conceptually, the first thing you would need to do is determine the type of statement you are working with. In this case, a comparison statement. So you need a regex statement to filter this into a "statement type". Once you do that, you can figure out what the arguments are. So you create a regex to pull out the arguments on each side of the operator. Next, the strings that represent action code items need to be parsed. The this argument is actually an object, whereas "PropertyStreetNumber" is a string. You've got to be able to determine which is which. Then you can filter that into a function that has been created specifically to handle those statements types. If at all possible, I would try to avoid the use of eval(). You can get into trouble with it.
answers question: http://stackoverflow.com/q/25369784

http://stackoverflow.com/a/25352063
answers question: http://stackoverflow.com/q/25351813
upvote count: 1
type: Answer
has body: You can use a AngularJS Service to load a JSON-File over a REST interface like this: dataService.service("dataService", function($http) { var data= {}; $http.get('data/serverData.json').then(function(serverData) { data = serverData; }); this.getData= function(){ return data; }; });
downvote count: 0
score: 1

http://stackoverflow.com/q/25265865
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39374501
tagged with: drawing
linked to: http://stackoverflow.com/q/11774038
type: UnansweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25271866
upvote count: 1
type: Question
tagged with: rendering
tagged with: canvas
has body: In Javascript's Canvas, you can easily draw a circle using the ctx.arc method, I wonder, do the arc function calculate the number of vertices needed to draw a circle for the best performance and graphics? In some cases (using Chrome) you can see that it's a regular polygon and not a "circle". The formula for the radians between each vertex is: th = arccos(2 * (1 - e / r)^2 - 1) where e is the pixel size as mentioned in this question. So, finally, should I use the existing function or make my own using the formula for the best performance and graphics?
has title: Do Javascript's ctx.arc method calculate the vertices relative to pixel size and radius?
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25401811
answers question: http://stackoverflow.com/q/25353132
type: Answer
has body: To "direct" the buyer to that specific area in the page you could use an achor pointing to the specific div using the id: Make Offer To open the tab you would have to add some JavaScript (either in a .js file included in the page or in a template file). If you know how the tabs js works, you could reuse some code. If not you can trigger the click using jQuery or something similar: function openMakeOfferTab(){ jQuery(".make-offer-tab").click(); }
score: 0

http://stackoverflow.com/a/25281993
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25261625
type: Answer
has body: You have 3 issues: you're not waiting for the save to finish you're not calling res.success() you're referencing myCallback which from what you've shown us isn't defined Simple solution is to replace this line: gameScore.save(null); With this code: gameScore.save().then(function () { res.success(); }); If you really do need that fetch call you would chain that in: gameScore.save().then(function () { return gameScore.fetch(myCallback); }).then(function () { res.success(); });
downvote count: 0

http://stackoverflow.com/comment/39521404
type: AnswerComment
has text: can you share plunker ..?I need to scroll that div which have contend..I don't need the scroll page ..I want to scroll the div (or move focus to bottom ) when item is added
type: Comment
comment on: http://stackoverflow.com/a/25348926
score: 0

http://stackoverflow.com/comment/39384184
comment on: http://stackoverflow.com/q/25273012
score: 1
type: Comment
type: QuestionComment
has text: `reloadPage` is deprecated, yet it works. There is a bug in `reload` that isn't fixed yet https://github.com/jquery/jquery-mobile/issues/7406

http://stackoverflow.com/a/25347604
score: 0
has body: document.getElementById("my-element").remove();
has comment: http://stackoverflow.com/comment/39519139
type: Answer
answers question: http://stackoverflow.com/q/25347586

http://stackoverflow.com/comment/39408043
type: Comment
comment on: http://stackoverflow.com/a/25287345
has text: `$('#id').data('some', 'thing')` `[ ​ ​ ]` `$('#id').data()` `Object {some: "thing"}`
type: AnswerComment
score: 0

http://stackoverflow.com/q/25259016
has answer: http://stackoverflow.com/a/25259054
has answer: http://stackoverflow.com/a/25259061
has comment: http://stackoverflow.com/comment/39355754
type: Question
has answer: http://stackoverflow.com/a/25259051
has comment: http://stackoverflow.com/comment/39356023
tagged with: javascript
has comment: http://stackoverflow.com/comment/39355829
has answer: http://stackoverflow.com/a/25259042
score: 0
has title: Declared javascript variable not working in a JS function
has answer: http://stackoverflow.com/a/25259065
tagged with: function
tagged with: variables
answer count: 5
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25259061
possible better answer: http://stackoverflow.com/a/25259042
has body: The code is as follows: var name = 'test'; //declaring variable function nameEcho(name) { var namephrase = "The saved name is, " + name; // adding the variable to a string alert(namephrase); // make a popup with the variable } The code above is in a JS file. When I trigger the function with a button on a HTML page I get an alert saying: The saved name is, Sorry if this is a super simple question, I am new to JS, but something must be going over my head. Any help would be appreciated.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39355920

http://stackoverflow.com/comment/39576249
score: 0
comment on: http://stackoverflow.com/q/25377762
type: Comment
type: QuestionComment
has text: I don't know phonegap, but do you get the "in eventlistener" alert before the "you are in fac" alert? If not it could mean that somehow the `deviceready` event is not fired...

http://stackoverflow.com/comment/39424144
type: Comment
comment on: http://stackoverflow.com/a/25295536
score: 0
type: AnswerComment
has text: Thanks for catching that. There were so many errors, it's hard to spot them all haha. If anyone see's anything else, feel free to edit the answer.

http://stackoverflow.com/a/25230764
has body: <%= team.name %> works beacuse it is echoed using <%= %>, whereas <% Team ... it is not. (Note the "<%" as opposed to "<%=" ) Try: var ul = $('#teams_div'); var html = ' '; <% Team.where(["champeonship_id >='+ id+'"]).each do |team| %> html += ' <%= team.name %></a '; <%end%> html += ' '; ul.append(html);
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25230664

http://stackoverflow.com/q/25266861
answer count: 1
has answer: http://stackoverflow.com/a/25269239
has title: Angular JS extracting JSON data
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39370691
has body: I'm trying to learn Angular JS to create web applications. I've gone through Angular JS's phonecatApp tutorial online, and am trying to adapt it to store some information about bases I currently have the index.html file that calls the ngview directive. I've split the html pages into two templates and two respective controllers. I'm also using a custom service to get information from a JSON file that has the data I'm working with. Here is my code "app.js" that invokes the respective pages and templates: 'use strict'; /* App Module */ var bracApp = angular.module('bracApp', [ 'ngRoute', 'bracControllers', 'bracServices', 'myDropdown' /* creates above as dependencies of the application module */ ]); bracApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/base', { templateUrl: 'partials/brac-list.html', controller: 'bracListCtrl' }). when('/base/:baseId', { //* everything with ":" beforehand is extracted into the $routeParams object *// templateUrl: 'partials/brac-detail.html', controller: 'bracDetailCtrl' }). otherwise({ redirectTo: '/base' }); }]); Here is the "controllers.js" file: 'use strict'; /* Controllers */ var bracControllers = angular.module('bracControllers', []) bracControllers.controller('bracListCtrl', ['$scope', 'Base', function($scope, Base) { $scope.bases = Base.query(); $scope.orderProp = 'Bases'; }]); bracControllers.controller('bracDetailCtrl', ['$scope', '$routeParams', 'Base', function($scope, $routeParams, Base) { $scope.base = Base.get({baseId: $routeParams.baseId}); }]); Here is the "services.js" file which should fetch the JSON information from bases.json: 'use strict'; /* Services - used to link data to application from JSON*/ var bracServices = angular.module('bracServices', ['ngResource']); bracServices.factory('Base', ['$resource', function($resource) { return $resource('bases.json', {}, { query: {method: 'GET', params:{baseId:'Bases'}, isArray:true} }); }]); The JSON file has a several objects that consist of o…
downvote count: 0
has comment: http://stackoverflow.com/comment/39378115
score: 1
linked to: http://stackoverflow.com/q/25267920
favorite count: 0
tagged with: angularjs
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39370178
tagged with: http://stackoverflow.com/tag/json
upvote count: 1

http://stackoverflow.com/comment/39585853
type: AnswerComment
score: 0
type: Comment
has text: That's brilliant thank you. I used omitFields and that worked perfectly. I think I'll spend some time getting more familiar with the docs!
comment on: http://stackoverflow.com/a/25371127

http://stackoverflow.com/comment/39448860
type: Comment
comment on: http://stackoverflow.com/a/25309204
type: AnswerComment
score: 0
has text: Unfortunately, this doesn't work for me. It throws an error that says e is not defined.

http://stackoverflow.com/a/25266756
type: Answer
has body: datepicker() is not a method in plain jQuery. It is part of the jQueryUI library, which you will also need to include in your page: The jQueryUI library can be downloaded from http://jqueryui.com
answers question: http://stackoverflow.com/q/25266551
score: 0

web-services
type: Tag
tags question: http://stackoverflow.com/q/25381013
tags question: http://stackoverflow.com/q/25268938
tag name: web-services
tags question: http://stackoverflow.com/q/25239531
tags question: http://stackoverflow.com/q/25256898
tags question: http://stackoverflow.com/q/25301472

http://stackoverflow.com/comment/39464379
type: AnswerComment
comment on: http://stackoverflow.com/a/25317547
has text: I honestly wasn't expecting an answer to this! I never would have thought it would be this. Thanks so much! It looks like Masonry can also handle this too: http://masonry.desandro.com/appendix.html#imagesloaded I haven't implemented it yet, I'll try and get it working now.
type: Comment
score: 0

http://stackoverflow.com/q/25306451
has answer: http://stackoverflow.com/a/25306481
type: AnsweredQuestion
score: 7
has answer: http://stackoverflow.com/a/25306486
has comment: http://stackoverflow.com/comment/39443391
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25306486
upvote count: 8
type: Question
answer count: 2
downvote count: 1
possible better answer: http://stackoverflow.com/a/25306481
favorite count: 0
has comment: http://stackoverflow.com/comment/39443407
tagged with: http://stackoverflow.com/tag/html
tagged with: input
has body: This is the code for an input text field. What I want is to call the "checkDateFormat" function with the text input as a parameter when the user leaves the field. Here is the code I've written: Fecha de prueba: &lt;input type="text" name="date_t" id="date_t" value="22/08/2014" onblur="checkDateFormat(this.date_t.value)"&gt;&lt;br&gt; However I'm sure the function isn't even called. What am I doing wrong?
has comment: http://stackoverflow.com/comment/39443401
has title: How to pass input text as parameter to javascript onblur event?

http://stackoverflow.com/q/25269926
upvote count: 0
answer count: 1
has title: Google Maps Suddenly stopped working on our site
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25270017
downvote count: 1
type: Question
tagged with: javascript
score: -1
has body: I setup google maps and it was working fine but just spotted that is is no longer firing any hints would be welcome I am not getting any error messages in the console either which is even more annoying so not quite sure why its not working:
tagged with: google-maps

http://stackoverflow.com/a/25319964
upvote count: 2
downvote count: 0
has body: Sure you can... Let's say you have a link on "index.htm": Contact. And on site "contact.htm" you have a tag: . So if the browser loads the new site with hash "http://yoursite.com/contact.htm#bottom" it will "jump" to the bottom of the page automatically - but this will not look like a scroll event! If you want to have a nice scroll effect you must not have an anchor with id equals hash but read the hash with javascript document.location.hash analyze it and scroll like you are used to scroll if the user is on the same site the scroll event takes place. best regards :)
type: Answer
answers question: http://stackoverflow.com/q/25319841
score: 2

http://stackoverflow.com/q/25371627
tagged with: ajax
has answer: http://stackoverflow.com/a/25372341
score: 11
accepted answer: http://stackoverflow.com/a/25372341
upvote count: 11
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26063098
type: Question
tagged with: mithril.js
possible better answer: http://stackoverflow.com/a/26063098
tagged with: javascript
has body: I'm using Mithril JS in a project and I'm having trouble understanding exactly how to go about hooking into the Ajax lifecycle. Like if I have an Ajax request takes awhile, I want to show a spinner. Pretty basic, but I can't seem to figure out how that can happen. I want to use the same container for the spinner as the content that the Ajax request is looking for. Here's my setup: var Thing = function (data) { var p = m.prop; this.title = p(data.title); this.timestamp = p(moment.unix(data.timestamp)); } Thing.list = function(options) { m.request({method: "GET", url: "/things.json", type: Thing, background: true}); }; MyApp.components.thingsList = { controller: function ThingListController() { this.things = m.prop([]); Thing.list().then(this.things).then(m.redraw); }, view: function thingListView(ctrl) { return m('div#thing-tab', [ m('ul#things', [ ctrl.things().map(thingView) ]) ]); } }; function thingView(thing) { ...some view stuff... } I've got it working the way I want, but I just can't figure out how to hook into the ajax lifecycle. Again, I just wanna show a spinner when the request starts and then replace that with the result of the ajax request. Any and all help is greatly appreciated! Thanks,
answer count: 2
downvote count: 0
has title: How do I show a spinner while waiting for an AJAX request in Mithril JS?
favorite count: 0

http://stackoverflow.com/q/25273042
linked to: http://stackoverflow.com/q/19955493
has comment: http://stackoverflow.com/comment/39382270
has comment: http://stackoverflow.com/comment/39382913
answer count: 0
duplicate of: http://stackoverflow.com/q/19955493
upvote count: 3
type: UnansweredQuestion
score: 1
downvote count: 2
has comment: http://stackoverflow.com/comment/39382509
has comment: http://stackoverflow.com/comment/39381785
has comment: http://stackoverflow.com/comment/39381744
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/39382659
favorite count: 0
has title: When does a !== a?
has comment: http://stackoverflow.com/comment/39382040
has body: I ran into the expression a !== a in someone else's code: function isEmpty(a) { return a === undefined || a === '' || a === null || a !== a; } The only case where I can think of the final expression evaluating to true is when isNaN(a). Are there any other values of a for which a !== a is true?
has comment: http://stackoverflow.com/comment/39381850
linked to: http://stackoverflow.com/q/359494
has comment: http://stackoverflow.com/comment/39381907

http://stackoverflow.com/q/25286791
has answer: http://stackoverflow.com/a/25348033
linked to: http://stackoverflow.com/q/25252599
tagged with: javascript
score: 0
has title: Progress Bar For Java Applet With Using All Browsers
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: applet
type: AnsweredQuestion
has body: I want to add progress bar when the applet is loaded on all browsers (Google Chrome, Mozilla Firefox , Internet Explorer , Safari, Opera) . I try to make this with javascript and html body onload method. I use below code.. Your Title Here Loading applet, please wait. Requires a browser that supports Java. Above code works true on internet explorer but not work true on firefox and chromium. Progress Bar disappear when install plugin pop up message is shown in mozilla firefox before applet fully loaded. This progress bar must disappear after applet fully loaded. How can i do this with mozilla firefox and google chromium correctly. Should i use different codes for each browsers..
has comment: http://stackoverflow.com/comment/39411477
accepted answer: http://stackoverflow.com/a/25348033
tagged with: java
type: Question
tagged with: browser

http://stackoverflow.com/comment/39379349
comment on: http://stackoverflow.com/q/25248862
has text: Interpolators + Routes / JavaScript
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25347374
downvote count: 0
has body: This is incorrect. You don't append() opening and closing tags like that. Instead, append() the whole tag. Or even better, create the a element and append() it: $a = $('&lt;a&gt;').attr('href', yourHref).html(yourText); $('#lastViewed').append($a);
has comment: http://stackoverflow.com/comment/39518954
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25347341
has comment: http://stackoverflow.com/comment/39521911
answers question: http://stackoverflow.com/q/25347341
type: Answer

http://stackoverflow.com/comment/39530251
has text: Can you tidy up your grammar? It's really hard to understand what your saying. Edited grammar, visible after peer review.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25353892
type: Comment

http://stackoverflow.com/comment/39415921
score: 1
comment on: http://stackoverflow.com/q/25291681
type: Comment
type: QuestionComment
has text: Why do they need to visit a different URL? I assume they have to click on something? Why not use click events?

http://stackoverflow.com/comment/39311894
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25235471
score: 4
has text: Maybe it was `var x = x || y, z`...

http://stackoverflow.com/comment/39371188
type: AnswerComment
comment on: http://stackoverflow.com/a/25267247
type: Comment
has text: Ah that must be why it is working. Before when I did not have the jsonp set at all it was throwing the MIME type error. Again thanks!
score: 1

http://stackoverflow.com/comment/39388595
type: Comment
has text: #header { margin: -8px 0 0 0; background-image:url(img/header_bg.jpg); background-repeat:no-repeat; background-position:center; position:relative; background-size: cover; width:100%; height:20%; } Okay added the height and width (tried using px as well) and it's still not working. Can't figure it out - because as you showed it's working fine on yours. Could it be because this isn't the only thing on my web page?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25276055

http://stackoverflow.com/comment/39438401
comment on: http://stackoverflow.com/q/25303735
type: QuestionComment
type: Comment
score: 1
has text: Do you have a copy of your `logs` for this call?

http://stackoverflow.com/q/25364331
tagged with: salesforce
tagged with: javascript
has title: New page not opening with the help of pagereference
has comment: http://stackoverflow.com/comment/39920645
has answer: http://stackoverflow.com/a/25515179
has body: I have a html input button which calls a javascript function in VF page. After execution of javascript function i want to open a detail page of an account in a new apex window. for that i am writing like below . &lt;input type="button" value="Save" onclick="saveImage()"/&gt; &lt;apex:actionFunction name="savefn" action="{!saveData}" rerender=""&gt; &lt;apex:param name="x" value="" assignTo="{!saveImageValue}" /&gt; &lt;/apex:actionFunction&gt; public void saveData() { String accid,accName; for(Account a:[select id,name from Account where id=:account]) { accid=a.Id; accName=a.Name; } //doing my stuff----- openDetailPage(account); } public PageReference openDetailPage(String acc) { /**Acc contains the id of the account in string format**/ pageReference ref = new PageReference('/'+acc); ref.setRedirect(true); return ref; } I am able to debug out opendetailpage logs but i am unable to open the page. could any one point me where i am doing wrong ?
favorite count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
type: Question
tagged with: apex
tagged with: visualforce
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/39562889
type: QuestionComment
comment on: http://stackoverflow.com/q/25371008
score: 0
type: Comment
has text: let me implement but u can post ur solution too

http://stackoverflow.com/comment/39342786
comment on: http://stackoverflow.com/a/25251870
type: AnswerComment
has text: in your JSFIDDLE you should load the jquery library.
score: 0
type: Comment

http://stackoverflow.com/comment/39376910
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25269758
has text: That is just my guess, I can't tell unless seeing enough code. May be you could setup a plunker to reproduce a problem and we can took a look.

header
type: Tag
tags question: http://stackoverflow.com/q/25350561
tag name: header

http://stackoverflow.com/comment/39474622
type: AnswerComment
type: Comment
has text: Yeah, you are right, it is working on a slower machine I have, but won't work on other places, forwarder how does that work?
comment on: http://stackoverflow.com/a/25323146
score: 0

http://stackoverflow.com/comment/39563190
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25371243
has text: This is a straight translation, and as such, it's probably the *worst* jQuery implementation of this.
score: 1

http://stackoverflow.com/comment/56613370
type: Comment
has text: Does not work with `autoFocus` set to `true`, because then always the first item is selected regardless of what you actually click on. Otherwise good workaround.
type: AnswerComment
comment on: http://stackoverflow.com/a/27622899
score: 3

http://stackoverflow.com/q/25278568
has comment: http://stackoverflow.com/comment/39391565
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39393041
tagged with: caching
type: Question
tagged with: browser
has body: I am using ajax jquery to submit a form, it works fine but when i submit the form for more than 5 times it makes the browser very slow, i have looked to inspect element it shows me that the more than 5MB data transferred while this amount is 22KB for firs time. the form and the result area is located in same page there is no refresh on the page. if i refresh the page it work normal but after submitting more than 5 times same thing happens again. the code is here: $(".btn_search").click(function(){ if($('#org option:selected' &amp;&amp; '#dept option:selected')) { $.ajax({ type: "POST", url: "showReports", data: $('#search_form').serialize(), cache:false, success : function(response){ $("#payroll-assign-rights").html(response); $('#payroll-assign-rights div.box #assign-head-1').next().remove(); $('#payroll-assign-rights div.box #assign-head-1').remove(); $('#payroll-assign-rights div.box #assign-head-2').remove(); $('#payroll-assign-rights div.box #payroll-assign-rights').hide(); $("#emp-report").show(); } }); } });
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has title: how can i clean the cached data from browser using javascript

http://stackoverflow.com/a/25372595
has body: The keys in an object literal are not evaluated and must be valid identifiers. You would get the same error just from the object literal: { test[i]: 1 }. You can use the new keyword in conjunction with an anonymous function to create the object instead: productObj.push( new function () { this[test[i]] = items[test[i]]; } ); If you find that the above is less readable, then you should create the object in advance: var temp = {}; temp[test[i]] = items[test[i]]; productObj.push( temp );
answers question: http://stackoverflow.com/q/25372522
downvote count: 0
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/q/25328916
tagged with: javascript
score: 0
has body: I'm trying to run a plugin on CS Cart site which only allows jQuery 1.7+ http://owlgraphic.com/owlcarousel/ is the plugin i'm using. I've found a snippet of code on another ticket, which allows to run two version of jQuery using the noConflict method. All of the original code is running fine. But this plugin is not running and it keeps throwing the error Uncaught TypeError: undefined is not a function on this line: $j("#wrapper").owlCarousel({ However if I add the following lin inside my document on load function it seems to run, then breaks when it gets to the .owlCarousel function. - $j('body').css('background-color', 'red'); Here is a breakdown of my code: //Loaded n at the top of the page {script src="lib/js/jquery/jquery.min.js"} {script src="lib/js/jquery/jquery.min.1.8.js"} //Loaded in lower down the page, after most of the existing JS The strange thing is, if i replace the old version of jQuery with the new one, it works, but breaks all the old code that relies on the old version. I hope I've provided enough info. Thanks in advance.
answer count: 1
tagged with: jquery
has title: Loading a plugin with a different version of jQuery
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25656228
tagged with: cs-cart

http://stackoverflow.com/comment/39489813
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25330987
type: QuestionComment
has text: have you tried anything so far?

http://stackoverflow.com/a/25312394
type: Answer
has body: Yes, anything that could result in a charge requires server-side code (for security purposes). But if you want to give the appearance of being a client-side-only solution, you could use Ajax to pass the token to your PHP script where the server-side request is made. Hope that helps! Larry PS I work on Support at Stripe.
answers question: http://stackoverflow.com/q/25308385
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25308385
score: 5
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25273677
answers question: http://stackoverflow.com/q/25270780
downvote count: 0
has comment: http://stackoverflow.com/comment/39384764
type: Answer
score: 5
has body: When you fire tick, the previous positions of nodes are used to determine the new positions, and are stored in the px and py attributes. If you change these attributes, running tick will update the x and y attributes to these values. Fiddle. Essentially, your nodes will magically fix to the new values when you redraw, rather than magically fix back to their old values.
upvote count: 5

http://stackoverflow.com/comment/39421399
comment on: http://stackoverflow.com/q/25293913
has text: @morespace54 OK thanks for the advice, yes I can modify it, its only a learning exercise. I was trying to find a way to avoid that but perhaps the most direct way is best.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39441940
comment on: http://stackoverflow.com/q/25305378
has text: There are alot of these questions on here but this isnt working for me, so I am asking if there is anything wrong with my code...
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39451073
type: AnswerComment
comment on: http://stackoverflow.com/a/25307268
score: 0
type: Comment
has text: Hmm, sorry to come back to this - I've discovered a slight flaw! I'm sure it's something I've misunderstood but have updated my question

http://stackoverflow.com/a/25310498
upvote count: 4
has body: You can use event delegation ... To select only the second and third checkboxes (as these seem to be the ones in question): $(document).on("change", "#resources div &gt; span:nth-child(2) &gt; input[type=checkbox], #resources div &gt; span:nth-child(3) &gt; input[type=checkbox]", function() { $(this).addClass("edited"); }); This will append the class to only the second and third checkboxes inside your spans when receiving the change event.
has comment: http://stackoverflow.com/comment/39450906
has comment: http://stackoverflow.com/comment/39451087
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39451230
accepted answer of: http://stackoverflow.com/q/25310370
answers question: http://stackoverflow.com/q/25310370
type: Answer
has comment: http://stackoverflow.com/comment/39450788
downvote count: 1
score: 3

http://stackoverflow.com/comment/39576843
comment on: http://stackoverflow.com/a/25377923
score: 0
type: Comment
type: AnswerComment
has text: No there isn't a conflict possibility between js and css.

http://stackoverflow.com/q/25286488
has comment: http://stackoverflow.com/comment/39407293
has answer: http://stackoverflow.com/a/25288073
has body: And before someone says: document.querySelector('.myElem').getAttribute('data-*') No, is not what I'm looking for. jQuery's data() has dual functions. 1) It queries an HTML5 data attribute which can be seen in the HTML code like this: &lt;div data-role="page" data-last-value="43" data-hidden="true" data-options='{"name":"John"}'&gt;&lt;/div&gt; $( "div" ).data( "role" ) === "page"; $( "div" ).data( "lastValue" ) === 43; $( "div" ).data( "hidden" ) === true; $( "div" ).data( "options" ).name === "John"; and 2) the ones that are set by .data(name, value) which are hidden in a jQuery internal Object, to which the documentation only says "to save information under the names 'events' and 'handle'", yet I haven't figured out a way to access them or what actually creates them. So, my question stands, how can I access the jQuery data values from plain JavaScript? Just so it's absolutely clear... let me put more emphasis: I don't want the data- HTML attributes, but the jQuery object data.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39407784
has comment: http://stackoverflow.com/comment/39408384
has comment: http://stackoverflow.com/comment/39407183
has answer: http://stackoverflow.com/a/25287345
score: 17
favorite count: 0
has comment: http://stackoverflow.com/comment/39407518
type: Question
has comment: http://stackoverflow.com/comment/39406088
has comment: http://stackoverflow.com/comment/39406907
answer count: 2
linked to: http://stackoverflow.com/q/7200722
downvote count: 1
accepted answer: http://stackoverflow.com/a/25287345
has comment: http://stackoverflow.com/comment/39406766
has comment: http://stackoverflow.com/comment/39408455
upvote count: 18
has comment: http://stackoverflow.com/comment/39406321
has title: With vanilla JavaScript, how can I access data stored by jQuery's .data() method?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39407067
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25288073
has comment: http://stackoverflow.com/comment/39406447

http://stackoverflow.com/comment/39594570
score: 0
comment on: http://stackoverflow.com/q/25387897
type: Comment
type: QuestionComment
has text: It's not clear what you are trying to do.

http://stackoverflow.com/q/25255587
has title: HTML/CSS How to make menu slide up when menu item is clicked?
score: 2
type: AnsweredQuestion
tagged with: css-transitions
has body: Like the title says, I have a sidebar menu that I'm trying to get to completely slide up and out of sight when one of the menu items, blog, is clicked. Similar to this jsfiddle I found (preferrably without js simply bc I hardly know it, but if that's the only way no big): fiddle ; except my menu is already open and you will be clicking an item inside the menu to slide it up. I'm trying to get the menu to slide up slowly. The menu looks like this: Logo home blog instagram about store portfolio contact Everything I try changes the whole layout of the sidebar, which I don't want. Here's some of my code: Home Blog Instagram About Store Portfolio Contact I have some other code in there like a search bar, etc. but this is basically what I'm trying to get to roll up slowly when 'blog' is clicked. Any guidance is appreciated!
has answer: http://stackoverflow.com/a/25255625
type: Question
tagged with: javascript
upvote count: 2
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
tagged with: menu
possible better answer: http://stackoverflow.com/a/25255625
favorite count: 0
has answer: http://stackoverflow.com/a/25255694
accepted answer: http://stackoverflow.com/a/25255694
tagged with: css
has answer: http://stackoverflow.com/a/25255828

http://stackoverflow.com/q/25381446
upvote count: 4
answer count: 2
has body: Google maps is changing the url with an 'at' @ (not %40) instead of the 'hash' # without a page reload. All the newest browsers are supporting it. I haven't see this before and I couldn't find any information on this topic (probably because 'at' is a common word). What is the browser support for the `@ sign? Why use an @ instead of #? Is there a default Javascript/JQuery function like window.location.hash? Example: https://www.google.nl/maps/@52.4989114,5.2799319,11z When you move the map around the url will changes without a reload.
possible better answer: http://stackoverflow.com/a/25381502
has comment: http://stackoverflow.com/comment/39582059
tagged with: url
tagged with: javascript
has answer: http://stackoverflow.com/a/25381502
favorite count: 0
linked to: http://stackoverflow.com/q/9041872
has answer: http://stackoverflow.com/a/25381497
score: 3
has comment: http://stackoverflow.com/comment/39582089
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39581879
has comment: http://stackoverflow.com/comment/39581875
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39581901
has comment: http://stackoverflow.com/comment/39582090
has comment: http://stackoverflow.com/comment/39582010
has title: Why use an 'at' (@) sign in a url instead of 'hash' (#)
has comment: http://stackoverflow.com/comment/39582100
accepted answer: http://stackoverflow.com/a/25381497
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39581973
linked to: http://stackoverflow.com/q/19509028
tagged with: hashtag
has comment: http://stackoverflow.com/comment/39581921
has comment: http://stackoverflow.com/comment/39581900
has comment: http://stackoverflow.com/comment/39581874

http://stackoverflow.com/q/25319702
has title: jQuery animate, hide to a certain position
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25320219
has answer: http://stackoverflow.com/a/25320219
has body: I'm kinda new to jQuery and have a question about the hide() function. Is it possible to hide a box to a certain position? I created a quick jsfiddle, which I hope it demonstrates what I mean. I placed a green box in a random position, behind the big red box, and want to make it look like the big red box scales down and vanishes in the green box. I tried googling it, but I'm a little lost on words for it, so I hope someone in here could give me a hint. This is what I tried so far // jQuery $('.close_this').click(function () { $('#hide_box').hide(1000); }); // CSS #hide_to_this { background:green; width:100px; height:100px; position:absolute; top:300px; left:500px; } #hide_box { background:red; width:1000px; height:1000px; position:absolute; top:0; } // HTML Close jsFiddle
has answer: http://stackoverflow.com/a/25320080
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25320080
tagged with: animation

http://stackoverflow.com/comment/39396798
has text: Check answer below please @Pablo Flores
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25281327

http://stackoverflow.com/comment/39417093
type: Comment
has text: That's called entity and you will also need `&gt;`.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25291878

http://stackoverflow.com/q/25331512
answer count: 4
tagged with: popup
type: UnansweredQuestion
has body: I have code that sets: top.location.href = [someurl] But I want it to open up in a new tab. Is there anyway to have the above code include: target="_blank"?
type: Question
tagged with: anchor
has answer: http://stackoverflow.com/a/25331568
has title: Redirect to a new tab within javascript file
upvote count: 60
has answer: http://stackoverflow.com/a/47036703
score: 60
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25331557
favorite count: 0
has answer: http://stackoverflow.com/a/63928371

http://stackoverflow.com/q/25316858
has comment: http://stackoverflow.com/comment/39463123
tagged with: javascript
has comment: http://stackoverflow.com/comment/39462927
accepted answer: http://stackoverflow.com/a/25317016
has comment: http://stackoverflow.com/comment/39462940
possible better answer: http://stackoverflow.com/a/25318011
score: 0
has comment: http://stackoverflow.com/comment/39462946
has answer: http://stackoverflow.com/a/25318011
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: url
has answer: http://stackoverflow.com/a/25317016
has comment: http://stackoverflow.com/comment/39463037
has comment: http://stackoverflow.com/comment/39462965
has body: I'm looking for a way to search the URL of the page, looking for a specific keyword in the has. For example, if the hash "/three" exists, I want to run a JavaScript function. The problem though, is that I have eight hashes, and they can be triggered in any specific order. This means that I can't just do something like this - &lt;script&gt; window.onhashchange = function(){ switch(location.hash) { case '#hide': javascript:alert("Find a valid NFC tag to continue!") break; case '#hide/one': javascript:alert("You found piece number one!") break; case '#hide/two': javascript:alert("You found piece number two!") break; case '#hide/three': javascript:alert("You found piece number three!") break; case '#hide/four': javascript:alert("You found piece number four!") break; case '#hide/five': javascript:alert("You found piece number five!") break; case '#hide/six': javascript:alert("You found piece number six!") break; case '#hide/seven': javascript:alert("You found piece number seven") break; case '#hide/eight': javascript:alert("You found piece number eight!") break; } } &lt;/script&gt; because the URL might end up being "example.com/index.html#hide/one/five/three/etc..". The way that it's configured right now, is that it'll specifically search for "#hide/one", "#hide/two", etc. But "#hide" isn't inserted with every hash, only with the first. So there will never be a "#hide/one/#hide/two, etc". I need to figure out how I can search for "one", "two", "three", etc, in the URL and perform functions accordingly. Thanks in advance, looking forward to learning more on this! EDIT - Just read through my post and I feel like I should clarify something. You know the JavaScript function "hash.length"? Something like "hash.length" but for contents, like "hash.content" or something would be great. I don't think that exists though. -Mitchyl
tagged with: hash
has answer: http://stackoverflow.com/a/25317072
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39462991
type: Question
has comment: http://stackoverflow.com/comment/39462997
tagged with: if-statement
has title: Using JavaScript to search the URL for hash, not a specific string though
has comment: http://stackoverflow.com/comment/39463006
has comment: http://stackoverflow.com/comment/39463164

http://stackoverflow.com/q/25378765
has answer: http://stackoverflow.com/a/25378908
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I found out, that range input supports only strings in "min" and "max" properties, and more than that, it requires that during it's initialization. Therefore, the following code doesnt work: &lt;ion-item ng-repeat="axis in csCtrl.backupConfig.yaxes" ng-init="csCtrl.initAxisValues()"&gt; &lt;div class="item range range-positive"&gt; &lt;input type="range" min="{{axis.min}}" max="{{axis.max}}" ng-model="csCtrl.rangesMin[$index]"/&gt; &lt;/div&gt; &lt;/ion-item&gt; The element will initialize, but if axis.max and the value in mg-model equals, for example, 1200, the pointer of the slider will stop at the start, at the value of 100. I think this problem arises, because input element initializes faster than angular assigns a value to min and max. Here is similar codepen, notice how first range is stopped at the beginning, but the second with explicit string in "max" parameter is working correctly: http://codepen.io/anon/pen/kqAlv Is there any solution? I thought of manually constructing input elements through jQuery, but i'm afraid that this will break angular expressions inside.
favorite count: 0
tagged with: angularjs
has title: AngularJS expressions in "range" input definition
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1

http://stackoverflow.com/comment/39465411
score: 0
type: Comment
has text: Notable here is the fact that there exist numerous ways to "instantiate" a "class" in JS. `x.constructor === ReferenceError` only holds true for a limited set of those ways. Any exact syntax is only going to hold true for some JS instance/class-esque relationships.
type: QuestionComment
comment on: http://stackoverflow.com/q/25318129

http://stackoverflow.com/q/25322163
answer count: 1
favorite count: 0
has title: Login with angularjs and php
has answer: http://stackoverflow.com/a/25322233
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25322233
tagged with: php
type: AnsweredQuestion
score: 3
type: Question
has body: Im going to try to build an login system with angularjs and php. However, I don't know how Im going to handle the sessions and the redirection when the user has successfully logged in? Should I start a session in the backend with PHP, and then return it to back to angular? Should I use window.location.href when Im going to redirect the user?
downvote count: 0
tagged with: javascript
upvote count: 3

http://stackoverflow.com/a/25237150
answers question: http://stackoverflow.com/q/25237006
score: 3
downvote count: 0
has body: In your JSFiddle you are using the wrong attributes. RadialGradient does not have x1, x2, etc. It has cx, cy and so on. On your &lt;radialGradient&gt; tag, add an attribute called gradientUnits and set its value to "userSpaceOnUse". This means that the gradient attribute percentages (cx, cy, etc.) will be considered for the entire SVG instead of just for a particular shape. Then adjust the values as needed. Here is the working solution: http://jsfiddle.net/kqfnuavq/
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39315059
has comment: http://stackoverflow.com/comment/39315091
accepted answer of: http://stackoverflow.com/q/25237006
type: Answer

phonegap-build
tags question: http://stackoverflow.com/q/25237608
tags question: http://stackoverflow.com/q/25291325
type: Tag
tag name: phonegap-build

http://stackoverflow.com/q/25235688
has comment: http://stackoverflow.com/comment/39312332
type: Question
has body: Objective: To be able to capture just before a page in a frame Below are a stripped down versions of what I have been working on. If trap just trap onload event using javascript the event is captured when the page is loaded when I add a handler for onunload it also executed when the page is loaded .This seems to work fine when the page in question is not in a frame, but when it is frame I get this behavior. Any help you might be able to give would be appreciated. index.htm ----- &lt;HTML&gt; &lt;HEAD&gt; &lt;TITLE&gt;New Hampshire&lt;/TITLE&gt; &lt;/HEAD&gt; &lt;!-- You may make other changes, but do not change the names --&gt; &lt;!-- of the frames (treeframe and basefrm). --&gt; &lt;FRAMESET cols="220,*" onResize="if (navigator.family == 'nn4') window.location.reload()"&gt; &lt;FRAME src="./tree.htm" name="treeframe"&gt; &lt;FRAME src="./test.htm" name="mainframe"&gt; &lt;/FRAMESET&gt; &lt;/HTML&gt; tree.htm &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Tree&lt;/title&gt; &lt;/head&gt; &lt;/body&gt; &lt;p&gt;&lt;a target="mainframe" href="test.htm"&gt;test.htm&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a target="mainframe" href="test2.htm"&gt;test2.htm&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a target="mainframe" href="test3.htm"&gt;test3.htm&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;/html&gt; test.htm, test2.htm, test3.htm -- basically the same file just the text in teh body is different to reflect the different file/ &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Language" content="en-us"&gt; &lt;/head&gt; &lt;script&gt; window.onload=alert('Page is loaded') window.onresize=alert('Page is unloaded') &lt;/script&gt; &lt;body&gt; &lt;p&gt;Page 1,&lt;/p&gt; &lt;/body&gt; &lt;/html&gt;
has comment: http://stackoverflow.com/comment/39336681
tagged with: javascript
has comment: http://stackoverflow.com/comment/39339586
score: 0
has comment: http://stackoverflow.com/comment/39341463
tagged with: frame
has comment: http://stackoverflow.com/comment/39312687
type: UnansweredQuestion
has title: How to catch the event when a page is about to replaced in a frame
tagged with: http://stackoverflow.com/tag/html
answer count: 0

http://stackoverflow.com/comment/39500837
type: Comment
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/25336793
has text: change to SendAMessageToPerson();you might also need to pass the parameters if there is any

http://stackoverflow.com/a/25351077
score: 2
has body: The getElementsByClassName() function returns a live list of DOM nodes. That it's "live" means that as you change the elements involved, the list changes. When you change the class of an element, it's no longer in the list! You can deal with that issue by either copying the node list into a plain array before you alter any elements, or simply iterate with a while loop until the list is empty, just looking at the first element on each iteration: var before = document.getElementsByClassName(from); while (before.length) before[0].className = to; You'd also probably want to add a test to make sure that "to" isn't a string that includes the class "from", or else the loop will never terminate. In fact, because in the general case of a function like yours it'd be hard to figure out whether there'd be an infinite loop, it might be easier to do the array copy approach: var before = document.getElementsByClassName(from); before = [].slice.call(before, 0); for (var i = 0; i &lt; before.length; ++i) before[i].className = to;
upvote count: 2
has comment: http://stackoverflow.com/comment/39525594
type: Answer
answers question: http://stackoverflow.com/q/25351043
has comment: http://stackoverflow.com/comment/39525304
downvote count: 0

http://stackoverflow.com/q/25243701
has comment: http://stackoverflow.com/comment/39328157
type: UnansweredQuestion
score: 5
tagged with: php
tagged with: laravel
type: Question
tagged with: foreach
upvote count: 5
has comment: http://stackoverflow.com/comment/39328349
has answer: http://stackoverflow.com/a/25244710
tagged with: laravel-4
has title: Laravel and google maps : foreach latitude/longitude show marker or map
has body: I have a table locations with a latitude and longitude field. For each location I want a new map (or better a new marker) that uses the latitude and longitude from the table locations to display a city on the map. index action of controller : public function index() { $locations = Location::all(); $locations-&gt;location_latitude = Input::get('location_latitude'); $locations-&gt;location_longitude = Input::get('location_longitude'); return View::make('forecasts.index') -&gt;with('locations', $locations); } google map with marker : function initialize() { var map_canvas = document.getElementById('map_canvas'); var location = new google.maps.LatLng({{ $location-&gt;location_latitude }}, {{ $location-&gt;location_longitude }}); var map_options = { center: location, zoom: 10, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(map_canvas, map_options) var marker = new google.maps.Marker({ position: location, map: map, }); marker.setMap(map); } google.maps.event.addDomListener(window, 'load', initialize); When I do this it only displays the city from the last inserted latitude/longitude : @foreach($locations as $location) var location = new google.maps.LatLng({{ $location-&gt;location_latitude }}, {{ $location-&gt;location_longitude }}); @endforeach
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39328434
favorite count: 0
has comment: http://stackoverflow.com/comment/39328405

http://stackoverflow.com/a/25386136
score: 1
has comment: http://stackoverflow.com/comment/39591137
has comment: http://stackoverflow.com/comment/39591226
has body: Why don't you make getStuff take an array and make the AJAX calls in a loop? Also, something to consider: AJAX is asynchronous (as implied by the name), so there's no guarantee that these calls will return in the same order you make them. If you need them to happen sequentially, you should make the calls recursively--make each subsequent call from the SUCCESS function of the previous call. That way you guarantee that the previous call has finished before you make the next call.
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/39591845
has comment: http://stackoverflow.com/comment/39591288
downvote count: 0
answers question: http://stackoverflow.com/q/25386043

http://stackoverflow.com/a/25243241
score: 1
has comment: http://stackoverflow.com/comment/39326823
answers question: http://stackoverflow.com/q/25243058
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39326495
has body: You can write your own addClass method, something like: function addClass(element, classname){ var currentClassList = (element.className || '').split(/\s+/); currentClassList .push(currentClassList.indexOf(classname) &gt; -1 ? '' : classname); element.className = currentClassList.join(' ').trim(); } Here's a jsfiddle demo using this function /*Note*/ A polyfill for Array.indexOf can be found here /*Note 2*/ A polyfill for String.trim can be found here
type: Answer
has comment: http://stackoverflow.com/comment/39326088
accepted answer of: http://stackoverflow.com/q/25243058
upvote count: 2
has comment: http://stackoverflow.com/comment/39325993
downvote count: 1

http://stackoverflow.com/a/25306700
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25302410
has body: You can use bootstrap's class as shown in given link http://getbootstrap.com/2.3.2/scaffolding.html#responsive

http://stackoverflow.com/q/25336136
type: AnsweredQuestion
has body: I just had this really dumb bug that took 20m to find simply because I forgot the var keyword somewhere. I figured it out, but it just got me thinking... "Is there an easy way to see if any properties were added to the global object?" Edit: Sorry, forgot to mention the context is in Node.js.
accepted answer: http://stackoverflow.com/a/25336159
type: Question
has title: How do I check if the Javascript global object has been tampered with?
has comment: http://stackoverflow.com/comment/39499808
tagged with: javascript
has comment: http://stackoverflow.com/comment/39499681
has comment: http://stackoverflow.com/comment/39499820
answer count: 1
has comment: http://stackoverflow.com/comment/39499678
has answer: http://stackoverflow.com/a/25336159
score: 0
tagged with: node.js

http://stackoverflow.com/q/25303917
has answer: http://stackoverflow.com/a/25343421
score: 2
tagged with: d3.js
has answer: http://stackoverflow.com/a/25312760
type: Question
tagged with: http://stackoverflow.com/tag/json
has title: Converting a flat JSON Object to a Tree Data Structure
upvote count: 3
has body: I need to represent Neo4j nodes in a graph view using d3.js. However the output from Neo4j is a flat Json Structure as follows Parent|Child ______|_____ A |B A |C A |D B |E B |F C |G D |H D |I However I need a Tree data structure in order to visualize the data using the d3.js Library. How can i convert it to a structure as follows { "name": "A", "children": [ { "name": "B", "children": [ { "name": "E", "children": [] }, { "name": "F", "children": [] } ] "name": "C", "children":[ { "name":"G" "children":[] } ] } and so on.....
answer count: 2
downvote count: 1
has comment: http://stackoverflow.com/comment/39442591
tagged with: javascript
tagged with: neo4j
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39443547

http://stackoverflow.com/a/25318133
has body: This isn't at all documented, but RangeBar has a method .addRange(range, data). The data parameter is stored with the range. You can create the range manually using something like bar.addRange(model.getRangeValue(), {model: model}) and, provided your model has a method changed which can tell you if the value is different to what it was before (Backbone's changedAttributes for example): bar.on('change', function(ev, values) { values.forEach(function(value, i) { var range = bar.ranges[i]; if(range.data('model').changed(value)) {...} }); }); Yep, this is horrible, but it's actually how I do it in my application that uses Elessar. It makes much more sense to send the range along with change events (currently only the value and DOM element are passed). I'll be adding this in a future release.
score: 1
has comment: http://stackoverflow.com/comment/47942845
has comment: http://stackoverflow.com/comment/39466299
has comment: http://stackoverflow.com/comment/39465400
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25317494
has comment: http://stackoverflow.com/comment/44317873
answers question: http://stackoverflow.com/q/25317494
type: Answer
has comment: http://stackoverflow.com/comment/39474672
has comment: http://stackoverflow.com/comment/44304317
upvote count: 1
has comment: http://stackoverflow.com/comment/48088126

http://stackoverflow.com/a/25360096
has body: &lt;table id="tableid"&gt; not &lt;table id=`tableid`&gt; Not sure what is not working for you http://jsfiddle.net/76d1gj0L/
has comment: http://stackoverflow.com/comment/39542333
has comment: http://stackoverflow.com/comment/39542010
has comment: http://stackoverflow.com/comment/39541834
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25359955

http://stackoverflow.com/comment/39550580
comment on: http://stackoverflow.com/a/25364265
score: 0
type: Comment
has text: @Ja͢ck How have you got an arrow under your name?
type: AnswerComment

http://stackoverflow.com/q/25270848
tagged with: wordpress
possible better answer: http://stackoverflow.com/a/25271202
type: Question
has answer: http://stackoverflow.com/a/25271202
has answer: http://stackoverflow.com/a/25271183
tagged with: javascript
tagged with: forms
answer count: 2
accepted answer: http://stackoverflow.com/a/25271183
has title: Use JavaScript to redirect form plugin on submit
has body: I need help trying to redirect a wordpress form plugin when the user clicks submit. I can add javascript to the form in where I check the value of a radio button and redirect based on that. Below is the code I am trying to add. Below that is the error I am seeing in firebug. Javascript: on_sent_ok: "if (document.getElementByName('review_stars').value=='4')||(document.getElementByName('review_stars').value=='5') {location = 'http://74.208.11.118:8085/review-submission/'} else { location = 'http://74.208.11.118:8085/review-thank-you/'};" Error: SyntaxError: unterminated string literal "if (document.getElementByName('review_stars').value=='4')||
tagged with: http-redirect
type: AnsweredQuestion
score: 0

http://stackoverflow.com/a/25296083
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25295872
has body: I've solved this in the past by doing the following: Then the variable is accessible from your script.
downvote count: 0
score: 1

http://stackoverflow.com/comment/39479339
comment on: http://stackoverflow.com/a/25306038
type: Comment
has text: @Dr.Molle Interesting solution indeed! The polyline (geodesic mode off) will point right at the marker. Good catch!
score: 0
type: AnswerComment

http://stackoverflow.com/q/25303016
type: UnansweredQuestion
has title: Firefox incorrect file type in Save as type - Save as dialog
tagged with: http://stackoverflow.com/tag/jpeg
has body: I'm trying with FileSaver.js (https://github.com/eligrey/FileSaver.js/) When I save an image of type jpg, the save as dialog displaying in Firefox gives incorrect value at Save as type dropdown (It says "PNG Image (.jpg), but what I expect is JPEG Image (.jpg)). Could anyone tell me how to fix this?
has answer: http://stackoverflow.com/a/25436268
type: Question
tagged with: javascript
score: 0
answer count: 2
tagged with: firefox
has answer: http://stackoverflow.com/a/25322666

http://stackoverflow.com/comment/39348994
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25248562
has text: This approach (with yui3-nodes as endpoints) is motivated by need to use tabview for drawing several graph in some project (controlflow and dataflow if it is useful for you). When I change tabs after modification graph in tab1 (tab2) I have problem with drawing standard endpoints on tab2 (tab1) which was created by jsPlumb endpoint constructor. I know about demos of jsPlumb and use them =)
type: AnswerComment

http://stackoverflow.com/comment/39462317
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25315854
has text: Thank you very much for your input this works great. I am curious to know why do you do .closest('.projectHeader') and also why you select the projectWrapper as well? is "this" in those lines the button? Thank you very much!

http://stackoverflow.com/comment/39393662
has text: `count += 0`? Have a think about what that line does!
comment on: http://stackoverflow.com/q/25279625
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25303876
has body: Your code is not correct. return integerValidation(this) Use this instead. return integerValidation(event) and your logic seems wrong if (charCode &gt; 100 &amp;&amp; (charCode &lt; 58 || charCode &gt; 90))
type: Answer
answers question: http://stackoverflow.com/q/25303480
score: 0

http://stackoverflow.com/a/25233370
score: 0
has body: Are you preventing the default submit action of a html form submit? I would think you need something like this: function checkDatas(e) { e.preventDefault(); //the rest of your code
type: Answer
answers question: http://stackoverflow.com/q/25233324

http://stackoverflow.com/comment/39593203
score: 0
type: AnswerComment
type: Comment
has text: This answer works as well. You should add that this path requires the original code to be modified to use setVisible(true) when re-enabling the markers.
comment on: http://stackoverflow.com/a/25387128

http://stackoverflow.com/comment/39452880
type: QuestionComment
comment on: http://stackoverflow.com/q/25311349
has text: `for..in` loops over an object's *keys*, not its *values*.
score: 0
type: Comment

http://stackoverflow.com/a/25287413
upvote count: 1
has comment: http://stackoverflow.com/comment/39409432
answers question: http://stackoverflow.com/q/25287174
has comment: http://stackoverflow.com/comment/39432195
has comment: http://stackoverflow.com/comment/39408668
has body: Try this : // get all tr from second table with class="tableSeconday:eq" var rows = $(".tableSeconday:eq(1) tr"); // slice after 4th row as first row include header part and hide them all $(rows).slice(4,rows.length).each(function(index, element) { $(this).hide(); }); // toggle rows $( ".viewSection a" ).click(function() { // show all tr from table $(".tableSeconday:eq(1) tr").show(); }); Demo EDIT - to work same for multiple table with class="tableSeconday" and toggle show / hide rows, use below query : var showingLess = false; var showLess = function(){ $(".tableSeconday").each(function(){ var rows = $(this).find("tr"); $(rows).slice(4,rows.length).each(function(index, element) { $(this).hide(); }); }); showingLess = true; } // call showLess() for first time showLess(); // toggle rows $( ".viewSection a" ).click(function() { if(showingLess) { $(".tableSeconday tr").show(); showingLess = false; } else { showLess(); } }); Demo
downvote count: 0
has comment: http://stackoverflow.com/comment/39407879
has comment: http://stackoverflow.com/comment/39408349
type: Answer
has comment: http://stackoverflow.com/comment/39408187
score: 1

http://stackoverflow.com/comment/39333058
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25245523
has text: @EvanTrimboli So every items of the fieldset should be a panel with an hbox layout, one item of the panel should be the checkbox and the other the field item component ? I just tried that and it seems to do the job.
score: 0

http://stackoverflow.com/a/25281905
score: 0
has body: var cars = new Array(10); // this will create a 10 item long array with all slots containing undefined or var cars = []; read Array
answers question: http://stackoverflow.com/q/25281752
type: Answer

http://stackoverflow.com/comment/39403870
comment on: http://stackoverflow.com/a/25284189
has text: Thanks for the answer. But that communication occurs from php, that is from the server side, not okay. Because the local server is on a private network without port forwarding and is thus not visible. Only can see through a web browser that is localhost itself.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39391252
type: Comment
type: QuestionComment
has text: unfortunately, for each browser - a different way of printing. For ie better use
comment on: http://stackoverflow.com/q/25278215
score: 0

http://stackoverflow.com/comment/39528829
score: 0
has text: @LarsKotthoff and the ids are retrieved asynchronously outside the code in the Q. I know the data is received properly because I see the elements get the proper ID in the browser element inspector
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25325681

http://stackoverflow.com/q/25265393
has title: Surname regular expression
has answer: http://stackoverflow.com/a/25265515
upvote count: 1
has comment: http://stackoverflow.com/comment/39368829
linked to: http://stackoverflow.com/q/888838
favorite count: 0
score: -3
has comment: http://stackoverflow.com/comment/39369307
tagged with: regex
has comment: http://stackoverflow.com/comment/39368866
downvote count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39368739
has comment: http://stackoverflow.com/comment/39368633
possible better answer: http://stackoverflow.com/a/25265515
has comment: http://stackoverflow.com/comment/39368738
has body: I'm trying to create a good regular expression for people's Surname. It should be valid if a Surname is: abcd abcd'efg abcd-efg abcd, .efg etc... I also need to test if symbols do not repeat... so for example: abcd''efg abcd-', Are invalid but the one: abcd, .efg Can be valid. At the moment I just created this: ^[a-z .',-_]+$ And now I'm trying to check for all the double symbols but I cannot go ahead successfully.
has comment: http://stackoverflow.com/comment/39368957
has comment: http://stackoverflow.com/comment/39368790
type: Question
has answer: http://stackoverflow.com/a/25266524
answer count: 2
accepted answer: http://stackoverflow.com/a/25266524
has comment: http://stackoverflow.com/comment/39368242
has comment: http://stackoverflow.com/comment/39368329
has comment: http://stackoverflow.com/comment/39368910
tagged with: javascript

http://stackoverflow.com/comment/39382311
type: AnswerComment
comment on: http://stackoverflow.com/a/25272752
score: 0
type: Comment
has text: @dandavis `ToBoolean` as defined by the spec as I said. It's a function used by the JS interpreter, not a JS function

http://stackoverflow.com/a/25388664
has comment: http://stackoverflow.com/comment/39596826
has comment: http://stackoverflow.com/comment/39596317
has comment: http://stackoverflow.com/comment/39596575
has body: &lt;script type = "text/javascript"&gt; $(document).ready(function(){ $("#submit").click(function(){ $("#contactform").submit(); }); }); &lt;/script&gt; change to $("#contactform").submit(); because you used bad selector and also in button selector
score: 0
has comment: http://stackoverflow.com/comment/39596368
has comment: http://stackoverflow.com/comment/39598621
has comment: http://stackoverflow.com/comment/39597313
type: Answer
has comment: http://stackoverflow.com/comment/39596746
answers question: http://stackoverflow.com/q/25388617
has comment: http://stackoverflow.com/comment/39597694

http://stackoverflow.com/q/25231958
has comment: http://stackoverflow.com/comment/39304799
tagged with: methods
type: Question
has title: How to not use the first parameter of a method call and still pass JSLint?
tagged with: jslint
tagged with: javascript
has comment: http://stackoverflow.com/comment/39304807
has answer: http://stackoverflow.com/a/25232885
has comment: http://stackoverflow.com/comment/39304705
has body: I'm having to call a method with two parameters, but I'm only using the 2nd one. My code looks like this: function trapEvent(resolve, reject) { event_callback = function (evt) { evt.stopPropagation(); if (allowDefault !== true) { evt.preventDefault(); } cancelResolver(); callback_promise = new Promise() .cancellable() .then(function () { return callback(evt); }) .then(null, function (error) { if (!(error instanceof Promise.CancellationError)) { canceller(); reject(error); } }); }; util.startListenTo(target, type, event_callback, useCapture); } return new Promise(trapEvent, canceller); As I'm "locking" my event inside a promise, which can only be rejected or cancelled, I'm never using the resolve method, which JSlint rightfully complains about. However, according to MDN es6 Promise spec, I need to provide both resolve and reject in the Promise callback method. Question: How can I make this method pass while keeping resolve?
has comment: http://stackoverflow.com/comment/39304660
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39305015
has answer: http://stackoverflow.com/a/25232322
tagged with: promise
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39305259
has comment: http://stackoverflow.com/comment/65045350
tagged with: parameters

http://stackoverflow.com/comment/39437958
type: AnswerComment
score: 1
has text: If the loop is TRUE then the scaling effect will be performed automatically as long as the "active" field is TRUE. If you want to bound the effect to a checkbox then you can set the "active" field (TRUE) only when the checkbox is checked. Once you uncheck it, the "active" field is deactivated (FALSE)
type: Comment
comment on: http://stackoverflow.com/a/25281151

http://stackoverflow.com/q/25299094
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: http-request
has title: for http request to google maps API
favorite count: 0
type: UnansweredQuestion
has body: https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&amp;key=(API_KEY) Google API page said the above URL is the http request and a json string is the response. How do I do this in javascript? I tried using the XMLHTTPrequest object at first but later found out it doesn't work between different domains. I then tried using a callback function with where function myCallbackFunction(expectedJSONstring){ alert(expectedJSONstring) } doesn't get called.
upvote count: 1
tagged with: google-geocoding-api
has comment: http://stackoverflow.com/comment/39430139
score: 1
has answer: http://stackoverflow.com/a/25321814
type: Question
tagged with: google-maps

http://stackoverflow.com/a/25365982
type: Answer
answers question: http://stackoverflow.com/q/25365808
upvote count: 1
score: 1
has body: So, something like this? for (var i=0; i &lt; t.length; i++) { var fillColor = t[i].color === 'red' ? "rgba(223, 34, 155, 0.48)" : "rgba(167, 167, 167, 0.64)"; arr.push({ label: t[i].label, data: t[i].values, fillColor: fillColor }); } This still does not answer the concerns raised by Pointy, but I don't understand enough of what you're trying to do to give you any advice on that point.
downvote count: 0

http://stackoverflow.com/comment/39522416
type: QuestionComment
type: Comment
has text: change show to show()
score: 0
comment on: http://stackoverflow.com/q/25349470

http://stackoverflow.com/comment/39439448
score: 0
type: AnswerComment
type: Comment
has text: You have a `Syntax Error`, it should very easy for you to debug. At least, far easier for you than for me. I can't comment lines to see when it stops working, I can't see the lines number...I mean, did you try that at least ? I think it will take you far less time to debug a syntax error than to wait for somebody to do it for you on SO... But what's the `## Heading ##` bit you added to your code ? I don't understand it
comment on: http://stackoverflow.com/a/25267752

http://stackoverflow.com/tag/q
tags question: http://stackoverflow.com/q/25274264
tags question: http://stackoverflow.com/q/25274388
type: Tag
tags question: http://stackoverflow.com/q/25344825
tags question: http://stackoverflow.com/q/25296960
tags question: http://stackoverflow.com/q/25314086
tag name: q
tags question: http://stackoverflow.com/q/25389597
tags question: http://stackoverflow.com/q/25263723
tags question: http://stackoverflow.com/q/25270917
tags question: http://stackoverflow.com/q/25267358

http://stackoverflow.com/a/25298864
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/25298824
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39431079
has body: You can't time out an alert. It's a low-level JavaScript construct that creates a native application dialog that needs to be confirmed by the user before it gets destroyed. If you want to "throw up data" to the user, you'll have to use an actual HTML dialog library (or roll your own). Also, don't use alert(). It was great when we had no alternative, but these days you use console.log(...) to simply log data (any data. numbers and strings, but also entire objects and HTML elements!) to the dev tools console (every browser comes with one baked in), and there are a million and one JS libraries that will generate nice looking modals for users instead (the only legitimate use of an alert these days is to force a halt on the entire page processing thread... And off the top of my head I can't think of a single reason why you'd want to do that). That said, the PHP code you gave makes absolute no sense at all. It's literally a .js file, with a .php extension. Remove those php tags, save it as .js, and just &lt;script src="thatfile.js"&gt;&lt;/script&gt; that thing. Don't make PHP do things that you don't need PHP for in the slightest.

http://stackoverflow.com/a/28873015
score: 2
answers question: http://stackoverflow.com/q/25268158
downvote count: 0
has body: I had the similar problem, I did the same as you have done and was getting 404 error for the PNG. When reviewed the other requests that are made, I came up with, you must pass the "package name" in the parameter logo as well. Just as; $scope.image = { logo: 'system/assets/img/logo.png' }; Than the logo is displayed as desired
type: Answer
upvote count: 2

http://stackoverflow.com/comment/39382632
comment on: http://stackoverflow.com/a/25273040
type: AnswerComment
score: 0
has text: As noted in documentation "The random number generator is seeded from the current time" so perhaps it is the additional time between calls that makes the difference? Also, this doesn't explain why the code only fails in Chrome, highlighing a problem with how it generates random numbers.
type: Comment

http://stackoverflow.com/comment/39570837
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25375030
score: 0
has text: @MarkGabriel Yes, each image (there are over 1000, paginated). See, it is a picture blog, and I want to add a "LIKE" button. When I click the "LIKE" button, it likes it, and the PHP file that AJAX references adds to a MYSQL table...when I refresh the page, and click the "LIKE" image for the same image, it removes the record from the table.

http://stackoverflow.com/q/25298726
has comment: http://stackoverflow.com/comment/39431712
favorite count: 0
has title: Checking by not restricting how many elements
has comment: http://stackoverflow.com/comment/39431320
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25300066
type: Question
accepted answer: http://stackoverflow.com/a/25300066
has body: I want to make it like for example when the word spilt into elements, the checking part will not restrict to only four.(In code comment it as "this part"). I want to be depending on how many the elements split so that it will be correct. if(original[0]==$("#box1").text()&amp;&amp;original[1]==$("#box2").text()&amp;&amp;original[2]==$("#box3").text()&amp;&amp;original[3]==$("#box4").text()) This only restricted to four, then the checking will be correct. How can I do it such as there will be three split elements or more then four elements and the checking will still be correct. &lt;script&gt; js_var = "&lt;?php echo $output ?&gt;"; var c = ['c1','c2','c3','c4','c5','c6','c7','c8','c9','c10']; var div_id = ['id1','id2','id3','id4','id5','id6','id7','id8','id9','id10']; var box_id = ['box1','box2','box3','box4','box5','box6','box7','box8','box9','box10']; var original = js_var.split("#"); var balls90= js_var.split("#"); var x = document.getElementById("demo"); for (var i=0; i &lt; original.length; i++) { var el = document.createElement('div'); el.id = c[i]; el.innerHTML = original[i]; x.appendChild(el); } function getNumbers() { var player1 = new Array(); balls90.sort(function() { return Math.random() - .25; document.getElementById("shuffle").onclick = function(){displayDate()}; }); for (var i = 0; i &lt; balls90.length; i++) { document.writeln('&lt;div id='+box_id[i]+' class=box droppable=true ondrop=drop(event) ondragover=allowDrop(event)&gt;&lt;/div&gt;'); } for (var i = 0; i &lt; balls90.length; i++) { player1.push(balls90[i]); document.writeln('&lt;div id='+div_id[i]+' draggable=true droppable=true ondragstart=drag(event)&gt;'+balls90[i]+'&lt;/div&gt;'); } } getNumbers(); function dragWord(dragEvent){ dragEvent.dataTransfer.setData("text/html", dragEvent.target.textContent+"|"+dragEvent.target.parentNode.id); } function dropWord(dropEvent){ var dropData = dropEvent.dataTransfer.getData("text/html"); var dropItems = dropData.split("|"); var prevElem = document.getE…
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39429652
upvote count: 1
downvote count: 1
answer count: 1

http://stackoverflow.com/a/25325330
has comment: http://stackoverflow.com/comment/39500603
answers question: http://stackoverflow.com/q/25325221
accepted answer of: http://stackoverflow.com/q/25325221
has comment: http://stackoverflow.com/comment/82244715
has comment: http://stackoverflow.com/comment/39500969
has comment: http://stackoverflow.com/comment/39485211
score: 53
upvote count: 53
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/78781261
has comment: http://stackoverflow.com/comment/52423174
has comment: http://stackoverflow.com/comment/39485311
has comment: http://stackoverflow.com/comment/39502909
has comment: http://stackoverflow.com/comment/39501796
type: Answer
has comment: http://stackoverflow.com/comment/39501923
has body: Anyway, this method seems to be quite poorly documented, and In fact, the sources I come across don't even give it a mention [...] Reliance on implicitly-declared global variables aside, the lack of documentation is a great reason not to use it. The apparent promotion of id values into global variables isn't standards compliant (the HTML5 spec for the ID attribute doesn't mention it) and, therefore, you shouldn't assume future browsers will implement it. EDIT: It turns out this behaviour is standards compliant - In HTML5, window should support property access to "Named Elements": Named objects with the name name, for the purposes of the above algorithm, are those that are either: child browsing contexts of the active document whose name is name, a, applet, area, embed, form, frameset, img, or object elements that have a name content attribute whose value is name, or HTML elements that have an id content attribute whose value is name. Source: HTML 5 spec, 'Named access on window object", emphasis mine. Based on this, standards compliance is not a reason to avoid this pattern. However, the spec itself advises against its use: As a general rule, relying on this will lead to brittle code. Which IDs end up mapping to this API can vary over time, as new features are added to the Web platform, for example. Instead of this, use document.getElementById() or document.querySelector().

http://stackoverflow.com/comment/39392058
type: Comment
comment on: http://stackoverflow.com/a/25260168
has text: createdAt is a java date obj ${model.createdAt.time} will return date string and ${model.createdAt} will return time stamp and yes second date is a global date variable of current date,
score: 0
type: AnswerComment

http://stackoverflow.com/q/25280814
has title: Rotating Image on Canvas
tagged with: javascript
tagged with: jquery
score: 0
possible better answer: http://stackoverflow.com/a/25284152
tagged with: html5-canvas
has answer: http://stackoverflow.com/a/25284152
has body: In my web app I am allowing users to choose images. If the height of the image is greater than the width then I rotate the image by 270 degrees. I am confuse about what should be the ideal size for the rotated image as I would be saving that rotated image later on. For example if a user upload a image with low resolution what should be the size there and what if the user uploads an image with a high revolution what would be the size than? I don't want the pixels to be distorted. Any good library to rotate image on the client side? Or any algorithm which can help me?
has answer: http://stackoverflow.com/a/25812693
accepted answer: http://stackoverflow.com/a/25812693
type: AnsweredQuestion
type: Question
answer count: 2

http://stackoverflow.com/comment/39538631
score: 0
comment on: http://stackoverflow.com/q/25357679
type: Comment
type: QuestionComment
has text: Ok, I tried again and checked the network tab. Under .../add_category.php?category=sad, under params tab, it shows category sad

http://stackoverflow.com/q/25255470
score: -1
has answer: http://stackoverflow.com/a/25256171
downvote count: 1
type: Question
upvote count: 0
accepted answer: http://stackoverflow.com/a/25256171
answer count: 1
tagged with: javascript
has title: Multiple Leaflet using Angular ng-repeat
has body: I am trying to make application where different user have different set of map. In order to accomplish this, I intend to use Leaflet and AngularJS. The plan is, using ng-repeat, AngularJS will be able to call multiple Leaflet map, different for each user. This is my html snippet: Asu The javascript code: for ( var i = 0; i < $scope.maps.length; i++ ) { try{ $scope.leaflets[i] = L.map('leaflets[' + i + ']', { maxZoom: 4, minZoom: 1, crs: L.CRS.Simple }).setView([0, 0], 1); // dimensions of the image var w = 1080, h = 855, imageUrl = $scope.maps[i].url; var southWest = $scope.leaflets[i].unproject([0, h], $scope.leaflets[i].getMaxZoom()-1); var northEast = $scope.leaflets[i].unproject([w, 0], $scope.leaflets[i].getMaxZoom()-1); var bounds = new L.LatLngBounds(southWest, northEast); L.imageOverlay(imageUrl, bounds).addTo($scope.leaflets[i]); // tell leaflet that the map is exactly as big as the image $scope.leaflets[i].setMaxBounds(bounds); var dataPoints = $scope.maps[i].dataPoints; var heat = L.heatLayer(dataPoints, { radius: 40, maxZoom: 4 }).addTo($scope.leaflets[i]); } catch(err) { } } When I tried writing the div id manually, e.g. Asu Asu It is displayed perfectly. In both case, when I try to "Inspect Element" in Chrome, P.S. the error in ms javascript when using Anybody have similar problem or have idea to solve this? Thanks!
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: angularjs
tagged with: css
type: AnsweredQuestion
tagged with: leaflet

http://stackoverflow.com/q/25378055
possible better answer: http://stackoverflow.com/a/25378089
has comment: http://stackoverflow.com/comment/39575959
has answer: http://stackoverflow.com/a/25378089
type: Question
tagged with: split
has title: How can we split a string using starts with regular expression (/^myString/g)
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: string
has comment: http://stackoverflow.com/comment/39576037
has body: I am having a case where i need to split given string using starts with regex (/^'searchString'/) which is not working such as "token=123412acascasdaASDFADS".split('token=') Here i want to extract the token value but as there might be some other possible parameters such as "reset_token=SDFDFdsf12313ADADF".split('token=') Here it also split the string with 'token=', Thats why i need to split the string using some regex which states that split the string where it starts with given string. Thanks.. EDITED Guys thanks for your valuable response this issue can be resolve using /\btoken=/ BUT BUT its does not work if 'token=' stored as a string into a variable such as sParam = 'token='; "token=123412acascasdaASDFADS".split(/\bsParam/); This does not works.
favorite count: 0
has comment: http://stackoverflow.com/comment/39576137
accepted answer: http://stackoverflow.com/a/25378087
answer count: 5
linked to: http://stackoverflow.com/q/874709
tagged with: regex
has answer: http://stackoverflow.com/a/25378202
has comment: http://stackoverflow.com/comment/39576042
has answer: http://stackoverflow.com/a/25378500
has answer: http://stackoverflow.com/a/25378131
upvote count: 1
has comment: http://stackoverflow.com/comment/39576060
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25378087
score: 1

http://stackoverflow.com/q/25387092
tagged with: validation
tagged with: javascript
has answer: http://stackoverflow.com/a/25601462
tagged with: client-side-validation
has body: This is my form: &lt;%= form_for [@company,@company_branch], :html =&gt; { :onsubmit =&gt; "return validateName();" }, remote: true do |f| %&gt; &lt;%= f.text_field :name %&gt; ... The "validateName" validation works fine when i don't use a remote call. But if do it remote, the form still gets submitted, even if my validation returns false. This is the .js for validation: function validateName() { var name = document.getElementById('name'); if( name.value == "" ) { highlightError(name, "Please provide a name"); return false; } return ( true ); }
has title: remote: true form avoids js field validation
type: UnansweredQuestion
tagged with: ruby-on-rails
type: Question
has answer: http://stackoverflow.com/a/25579563
score: 0
answer count: 2

http://stackoverflow.com/q/25243371
tagged with: angularjs-ng-repeat
tagged with: ui-select2
tagged with: angularjs
has title: AngularJS ng-repeat filter function not filtering properly
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39326295
type: Question
has body: I have ui-select2 dropdown that depends on the selection of a parent. I have a array of options for the first ui-select2, then when something is selected from that dropdown, the next dropdown will appear. The available options for the 2nd dropdown will depend on what is selected in the first dropdown. The ng-repeat directive is iterating over an array of choices. Here is the html and the js code. HTML: {{tenantApplication.name}} JS: /** Filters the tenant depending on what domain is selected */ $scope.tenantFilter = function(tenantApplication) { $scope.sharedObj.tenantApplications; tenantApplication.name; tenantApplication.id; return true; /* return $scope.vmOrderItem.domain.id == tenantApplication.domainId;*/ } The issue I get is that even if I return true, nothing ever shows up on the dropdown. I did this to test the logic. I don't know why the tenantApplication parameter is always undefined in the function. I used google chrome inspect element to insert a breakpoint and it complains that the argument is undefined. But I don't see why it wouldn't work properly when I return true. I'm a newbie to JavaScript and AngularJS so any help is greatly appreciated. I've worked through all the AngularJS examples and read their docs but I'm still just a beginner.
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39326738
score: 0
has answer: http://stackoverflow.com/a/25243509
accepted answer: http://stackoverflow.com/a/25243509

http://stackoverflow.com/q/25243973
tagged with: http://stackoverflow.com/tag/html
score: 0
has body: In trying to prevent Anti-XRF token failures (when a user assaults the 'login' button after it has already been pressed and the page is already loading) I decided to make the ASP button not visible, and put an HTML button in it's place. The JS attached to the HTML button checks if the page is valid (I have a required field validator for the username textbox as well as the password textbox) and if it is, the HTML button is disabled, and the actual ASP button click is triggered. The main test case that I am having problems with and can't seem to understand is when I type in a WRONG username and password. The Button is disabled properly and the ASP button is clicked, the page reloads with a 'Wrong username and password' message from the Login_Click function in the behind code, but then at this point regardless of if something is typed into either texbox or not, after one 'login click' the button is disabled (meaning it passed the if(Page_isValid) line) and the alert ("asp button has been clicked") is shown which I have directly after the line that triggers the asp button, but it seems that the asp button is in fact never triggered as the page does not load and the breakpoint which I have at the login_click function in the behind code is never reached. Am I mis-using the RequiredField Validators or the Page_IsValid functionality? Or is there a better way to accomplish this? All relevent code is below. I hope that I provided enough information for assistance, if you need me to clarify or add anything at all please let me know. Validators: &lt;asp:TextBox ID="tbUserName" runat="server" Width="250px"&gt;&lt;/asp:TextBox&gt; &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" onpropertychange ="reEnable()" ControlToValidate="tbUserName" CssClass="field-validation-error" ErrorMessage="The user name field is required." EnableClientScript="true" /&gt; &lt;br&gt; &lt;asp:Label ID="lblPassword" runat="server" AssociatedControlID="tbPassword"&gt;Password:&l…
tagged with: c#
has comment: http://stackoverflow.com/comment/39327925
type: UnansweredQuestion
answer count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39329553
has title: Trying to understand strange behavior with login button workaround in ASP
tagged with: jquery
tagged with: asp.net
type: Question

http://stackoverflow.com/a/25368477
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Yes but you will need to store maximum value in some temp variable: var max = 0; $( '.myclass' ).each( function() { if( parseInt( $( this ).val(), 10 ) &gt; max ) { max = parseInt( $( this ).val(), 10 ); } } ); console.log( max ); jsFiddle demo
has comment: http://stackoverflow.com/comment/39558521
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39558615
accepted answer of: http://stackoverflow.com/q/25368427
has comment: http://stackoverflow.com/comment/39558621
answers question: http://stackoverflow.com/q/25368427

http://stackoverflow.com/comment/39616818
score: 0
has text: @ZachSaucier thanks but that question is not relevant. You may notice my question contains a method to set Caret position already, which works. The issue is I need to first determine the position, from the current scroll position of my content editable div
comment on: http://stackoverflow.com/q/25304858
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25313167
has body: I made a form using this link https://github.com/nimbly/angular-formly and this http://nimbly.github.io/angular-formly/#!/.I I need to validate form .But most of the validation done but angular .But it validate form is not user friendly.I need to validate form using this $pristine and $dirty and change some text as given in default string. Plunker http://plnkr.co/edit/7IU7WNKjS6NgTus537K5?p=preview // Code goes here angular.module('test', ['formly']); angular.module('test') .controller('TestCtrl', function ($scope) { $scope.formFields = [ { "key": "firstName", "type": "text", "label": "First Name", "placeholder": "Jane", "required":true },{ "key": "email", "type": "email", "placeholder": "janedoe@gmail.com", "required":true }, { "key": "triedEmberSelect", "type": "select", "label": "Have you tried EmberJs yet?", "default": "no", "options": [ { "name": "Yes, and I love it!", "value": "yesyes" }, { "name": "Yes, but I'm not a fan...", "value": "yesno" }, { "name": "Nope", "value": "no" } ] }, { "key": "triedEmberRadio", "type": "radio", "label": "Have you tried EmberJs yet?", "default": "no", "options": [ { "name": "Yes, and I love it!", "value": "yesyes" }, { "name": "Yes, but I'm not a fan...", "value": "yesno" }, { "name": "Nope", "value": "no" } ] } ]; $scope.formOptions = { //Set the id of the form uniqueFormId: 'myFormId', //Hide the submit button that is added automaticaly //default: false hideSubmit: false, //Set the text on the default submit button //default: Submit submitCopy: 'Login' }; $scope.onSubmit = function() { console.log('form submitted:', $scope.result); }; $scope.result = {}; $scope.okbuttonClick=function () { // body... console.log($scope.result) } }); is there any way to validate like that ? You name is required. can we validate this form like that http://scotch.io/tutorials/javascript/angularjs-form-validation http://code.realcrowd.com/on-the-bleeding-edge-advanced-angularjs-form-validation/ i need to validate like that http://angular-js.in/ta…
has answer: http://stackoverflow.com/a/25316726
has comment: http://stackoverflow.com/comment/47011394
has title: how to validate form using $pristine and $dirty in angular?
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/47042865
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: validation
has comment: http://stackoverflow.com/comment/47042450
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/39453055
type: Comment
comment on: http://stackoverflow.com/a/25311551
has text: Cheers for the reply! I'm using a pair of child themes of Duena and it all sounds good except it seems as though I am going to have to hard-code my colour schemes in because they seem to be drawing them from the options of the parent theme. Aside from that I see no real problems with what you are suggesting. I previously didn't realise that different menus can be set for different themes. Does the WordPress Loop work with static pages though? I thought it was for posts?
score: 0
type: AnswerComment

http://stackoverflow.com/q/25332537
accepted answer: http://stackoverflow.com/a/25332914
tagged with: javascript
has comment: http://stackoverflow.com/comment/39493004
possible better answer: http://stackoverflow.com/a/25332579
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25332914
tagged with: jquery
has title: Making a div appear after certain point AND disappear after other certain point
has comment: http://stackoverflow.com/comment/39492802
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25332579
type: AnsweredQuestion
has body: :) I having some trouble hiding a DIV. Scrolling donw, I can make it appear when a certain point is reached, BUT, I want to make it disappear when OTHER point is reached -- and, scrolling down, making it appear again. I tried adding another var (with the name of the 3rd point) and I even made it disappear, BUT, when scrolling up again, it started blinking. :( What is wrong? What should I do? :( $(document).ready(function() { $("#DIV1").hide(); //hide your div initially var topOfOthDiv = $("#DIV2").offset().top; $(window).scroll(function() { if($(window).scrollTop() &gt; topOfOthDiv) { //scrolled past the other div? $("#DIV1").fadeIn(200); //reached the desired point -- show div } }); $(window).scroll(function() { if($(window).scrollTop() &lt; topOfOthDiv) { //scrolled past the other div? $("#DIV1").fadeOut(200); //reached the desired point -- show div } }); });
type: Question

http://stackoverflow.com/comment/62191617
type: Comment
has text: No @ovi, the question may have been titled "concat versus push" but the actual question was "Can someone explain this ?"
comment on: http://stackoverflow.com/a/35882138
type: AnswerComment
score: 5

toolbar
tags question: http://stackoverflow.com/q/25317912
tags question: http://stackoverflow.com/q/25255730
tag name: toolbar
type: Tag

http://stackoverflow.com/comment/39512445
type: AnswerComment
has text: what's document.programs exactly?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25343553

http://stackoverflow.com/a/25364592
answers question: http://stackoverflow.com/q/25364537
upvote count: 5
downvote count: 0
has body: You can use setHours method: var d = new Date("2014-06-05T10:27:47Z"); var d2 = new Date("2014-06-05T10:27:47Z"); d2.setHours ( d .getHours() + 2 );
score: 5
type: Answer

google-api-java-client
tags question: http://stackoverflow.com/q/25271201
tag name: google-api-java-client
type: Tag

http://stackoverflow.com/comment/39438248
type: Comment
type: QuestionComment
has text: ...and your then clause is returning the same query as triggers it. That probably isn't going to crash but it is redundant.
score: 0
comment on: http://stackoverflow.com/q/25276408

http://stackoverflow.com/q/25384661
has comment: http://stackoverflow.com/comment/39588644
has answer: http://stackoverflow.com/a/25384852
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25384817
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39588363
type: Question
has body: I have a dropdownmenu BBC News Business News Which has css attached to it : .NBSCustomDropDownParent select { text-indent: 1px; width: 244px; -webkit-appearance: none; -moz-appearance: none; margin-bottom : 5px; border: none; background: transparent url("/Style%20Library/NBSImages/NBSCustomDropDownArrow.png") no-repeat 205px center; font-family: NBS; font-size: 2.3em; color: rgb(0, 41, 121); } .NBSCustomDropDownParent select option { color: rgb(0, 41, 121); font-family: NBS; font-size: 2.3em; } However I have one problem, once I have selected an option from the dropdown and the dropdown goes away only showing the option I have selected, It stays highlighted until I click away. Is there anyway to change it being highlighted automatically
has title: unhighlighting dropdown menu after selecting an option
has answer: http://stackoverflow.com/a/25384817
tagged with: javascript
tagged with: jquery
answer count: 2
has comment: http://stackoverflow.com/comment/39588242
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
possible better answer: http://stackoverflow.com/a/25384852
tagged with: drop-down-menu
favorite count: 0

http://stackoverflow.com/comment/39413906
score: 0
type: AnswerComment
has text: @JeanYang: You can't select what doesn't exist. You could hide an existing *ancestor* of the rows though, which would have a similar effect.
type: Comment
comment on: http://stackoverflow.com/a/25290594

http://stackoverflow.com/q/25262824
score: 0
answer count: 2
has title: addEventListener to an article element in Javascript
possible better answer: http://stackoverflow.com/a/25262906
tagged with: html5-draggable
has answer: http://stackoverflow.com/a/25262906
has comment: http://stackoverflow.com/comment/39362507
tagged with: draggable
type: AnsweredQuestion
has body: I am trying to addEventListener to all article elements so when they are clicked it turns them into a draggable element. I'm not using jQuery on this task. Attempt 1: document.getElementsByTagName("ARTICLE").addEventListener('click', function(){ document.getElementsByTagName("ARTICLE").setAttribute('draggable', true);}); Attempt 2: function draggableTrue() { var addDrag = document.getElementsByTagName("article"); addDrag.setAttribute('draggable', true); } //add event listener to articles var draggableArticles = document.getElementsByTagName("article"); draggableArticles.addEventListener('onclick', draggableTrue); In both I am getting a "Uncaught TypeError: undefined is not a function" which usually points out I am missing something, but after reading up I can't figure out what.
has answer: http://stackoverflow.com/a/25262918
linked to: http://stackoverflow.com/q/2291061
has comment: http://stackoverflow.com/comment/39362435
type: Question
accepted answer: http://stackoverflow.com/a/25262918
tagged with: getelementsbytagname
has comment: http://stackoverflow.com/comment/39362560
has comment: http://stackoverflow.com/comment/39362535
tagged with: addeventlistener
tagged with: javascript

http://stackoverflow.com/q/25263081
type: Question
accepted answer: http://stackoverflow.com/a/25263422
tagged with: regex
has title: Regular expression to change Ingredient 1 TO "Ingredient" + counter
score: 0
has body: I am trying to change just the label tag when I clone the div. The current piece of JS changes the product name within the drop down list. var clone = $('#product-1').clone(false)[0].outerHTML.replace(/1/g, counter); Active Ingredient 1 Product 1 http://jsfiddle.net/ehv1xmL6/ Thanks
has answer: http://stackoverflow.com/a/25263422
tagged with: javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39363333
answer count: 1
tagged with: jquery

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/25254350
tags question: http://stackoverflow.com/q/25381131
tags question: http://stackoverflow.com/q/25332233
type: Tag
tags question: http://stackoverflow.com/q/25373889

http://stackoverflow.com/comment/39380661
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25272293
type: Comment
has text: A leading `{}` is always interpreted as a block, not as an object, so your middle two examples are simply `+{}` and `+[]` (an object and an array with a unary plus).

http://stackoverflow.com/a/25289274
score: 0
has comment: http://stackoverflow.com/comment/39411500
answers question: http://stackoverflow.com/q/25287723
type: Answer
has body: Okay, so, after a little messing around with an example I came up with, I came to the conclusion that you probably want to be using _.filter to get your array of checkboxes. filter will always return an array, so you should get a count of 0 when there are no checkboxes checked. $('#serialize').click(function() { var data = $('#testForm').serializeArray(), checkboxes = _.filter(data, function(i) { return i.name === 'xyz'; }); console.log(data, checkboxes); console.log(data.length, checkboxes.length); });

http://stackoverflow.com/comment/39429720
comment on: http://stackoverflow.com/a/25290127
score: 0
type: AnswerComment
type: Comment
has text: I'm thinking the { should be escaped as well. Can anyone confirm that? It should be: /[^\s]*\{[^}]*}, or is that not the case since it follows a * ? Also my earlier comment was in reference to me thinking you were usings the | as or's. I never realized or forget that ^ negates the whole thing: good to know :)

http://stackoverflow.com/comment/39495236
score: 0
type: QuestionComment
type: Comment
has text: using the `onclick` attribute is not the best practice to use. As a beginner it's ok for learning, but as soon as you can, learn about abstracting event listeners from your HTML :) `addEventListener` is a function you'll want to intimately know
comment on: http://stackoverflow.com/q/25333773

http://stackoverflow.com/comment/39553131
score: 0
type: Comment
has text: Well this is a better solution, then the one i intended. Thanks, I am more than satisfied with this one!
type: AnswerComment
comment on: http://stackoverflow.com/a/25365812

http://stackoverflow.com/comment/39469528
type: Comment
has text: tried your answer and for some reason the console now says my function is not defined...?
comment on: http://stackoverflow.com/a/25320320
type: AnswerComment
score: 0

http://stackoverflow.com/a/25298988
has body: I found the issue: In my test_include.js file I was pushing onto the array incorrectly. document.emits.push(Array.prototype.slice.call(arguments)); Not sure why I was just pushing arguments without slicing it, but that wasn't working.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25249915

http://stackoverflow.com/comment/39485452
has text: No. i dont have handleOpenUrl(). let me give you steps: 1) from web app scan 2) in mobile app, i saved the scan reults to an array in js. var URL = 'http.../details.jsp?contents=' + arr + '&format=' + typ; navigator.app.loadurl(URL,{openExternal:true}); that is all no big functionalities.
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25318064
score: 0

http://stackoverflow.com/comment/39307136
has text: Thanks, in your fiddle all working fine! But in my, seems to be some bugs)) http://jsfiddle.net/cpvrj3ut/1/
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25233092

http://stackoverflow.com/a/25352558
type: Answer
has comment: http://stackoverflow.com/comment/39568686
answers question: http://stackoverflow.com/q/25352468
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25352468
has comment: http://stackoverflow.com/comment/39528387
score: 1
has comment: http://stackoverflow.com/comment/39572978
has comment: http://stackoverflow.com/comment/39572770
has body: You have an error in jQuery selector: $( '#info #job_costs #job_assignment' ).hide(); To hide several elements you need to put comma in between selectors like this: $( '#info, #job_costs, #job_assignment' ).hide(); Solution in your case: you just need to hide two of the tabs so that one would be visible at the beginning. This is what you need to use in your code: $( '#job_costs, #job_assignment' ).hide(); There is some room for improvement here but this will work. Here is updated fiddle
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39528873

http://stackoverflow.com/q/25313545
tagged with: shapes
has body: I'm trying to work out the best approach to split a circle shape in canvas into horizontal strips. I have an image as an example: My first idea was to draw a set of rectangles and clip/crop it with a circle shape. But I need to animate/scale each individual strip. So really, I need to try and do it without clipping. So I then thought about creating a curve/path, but the edges need to follow a perfect circle. Is there some basic math I could use to approach this? I've done various bits of searching, however most resources point to pie charts, which is not what I'm after. I'll continue the search, but if you have an recommendations or resources I could look into I'd really appreciate it! Thanks
upvote count: 1
has title: Canvas: Split circle into horizontal strips
tagged with: math
has comment: http://stackoverflow.com/comment/39456678
has comment: http://stackoverflow.com/comment/39476071
type: Question
tagged with: canvas
downvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25314027
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/39564914
has text: possible duplicate of [Android Calling JavaScript functions in WebView](http://stackoverflow.com/questions/4325639/android-calling-javascript-functions-in-webview)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25371949
score: 0

http://stackoverflow.com/q/25358272
tagged with: javascript
score: -1
has body: I used to embed an svg file to my webpage: &lt;object id="svgmap" width="100%" height="100%" data="&lt;%=path %&gt;/svg/map.svg" type="image/svg+xml" style=""&gt; &lt;/object&gt; and then I added some images tags into this svg file using an external javascript file called "support.js": var marker = document.createElementNS(xmlns, 'image'); marker.setAttributeNS(null, 'id', "img_0123"); marker.setAttributeNS('http://www.w3.org/1999/xlink', 'href', iconurl); marker.setAttributeNS(null, 'x', posX); marker.setAttributeNS(null, 'y', posY); marker.setAttributeNS(null, 'visibility', 'visible'); marker.setAttribute("onclick", "onsel('0123')"); This "onsel" function is defined in support.js as well, so when I clicked on the image, it changes to another image. Now when i viewed this page in browsers (Opera, Mozilla and Chrome), it didn't swap to another image when i clicked on the image, and in the developer tool's console, it said "referenceerror: onsel is not defined svgmap:1". Does that mean the svg files cannot use functions defined in other javascript files? How to do that?
has title: How to call functions defined in parent document from an svg referenced by an element?
downvote count: 3
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25359730
accepted answer: http://stackoverflow.com/a/25359730
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
type: AnsweredQuestion
type: Question
upvote count: 2

http://stackoverflow.com/q/25361096
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
tagged with: data-visualization
accepted answer: http://stackoverflow.com/a/25362696
type: AnsweredQuestion
score: 2
upvote count: 2
has title: Why selectAll("element") is important in d3js while generating a chart
type: Question
tagged with: charts
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
has body: I'm learning d3js these days, Following is an example I have tried with the help of d3js documentation. &lt;script&gt; var data = [4, 8, 15, 16, 23, 42]; d3.select(".chart").selectAll("div").data(data).enter().append("div").style("width", function(d){return d * 10 + "px"; }).text(function(d){return d;}).attr("class", "bar"); &lt;/script&gt; I'm not clear in why selectAll() is important in this code snippet. Without selectAll() also we can generate the chart, but it's creating outside of the body tag. Can any one help me to understand this. What is the role of selectAll() in here. Thanks.
has answer: http://stackoverflow.com/a/25362696

http://stackoverflow.com/q/25355714
score: 0
has answer: http://stackoverflow.com/a/25369694
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has body: I am using the ckeditor with the jquery adapter plugin and im wondering how I can simplify my process and select a different toolbar dynamically from an attribute within a textarea tag. &lt;textarea class="form-control ckeditor" data-toolbar="web"&gt;&lt;/textarea&gt; &lt;script&gt; $('textarea.ckeditor').ckeditor({ height : '100px', width : '100%', toolbar : $(this).attr('data-toolbar'), allowedContent : true }); &lt;/script&gt; In this case i have a toolbar called "web" and its configured in the config file and I figure it would nicer code if I had control over the toolbars by using a data- attribute. this way i Can have different toolbars on multiple editors on my page. Any ideas on how I can do this via the extra attribute without having to write additional code ?
tagged with: http://stackoverflow.com/tag/html
has title: change ckeditor toolbar from attribute in textarea?
type: Question
tagged with: javascript
tagged with: ckeditor

http://stackoverflow.com/q/25255185
has title: need clearly explanation about error in angularjs
type: Question
has answer: http://stackoverflow.com/a/25255424
tagged with: javascript
has comment: http://stackoverflow.com/comment/39349290
has answer: http://stackoverflow.com/a/25255444
score: 0
accepted answer: http://stackoverflow.com/a/25255444
answer count: 2
has body: I am a newbie to Angularjs. I often get this error when I try to push an object to an array. I try many ways but I don't know what's wrong with it. It repeatedly gets error: $scope.todo is undefined. Here is my code (link at http:// plnkr.co/edit/rvhLhuwlR7UsYtaLhKjh) When I add $scope.todo = {}; it can't get the title I enter and it push blank title. Please explain in detail and clearly for me so that I can understand more about $scope and form input in controller. Thanks this is my module code angular.module('todoApp',['ionic']) .controller('todoCtrl', function($scope){ $scope.todos = [ {title: "Go to the cinema"}, {title: "Take some books"}, {title: "Check out booking room"} ]; $scope.addTodo = function(){ $scope.todos.push({title: $scope.todo.title}); $scope.todo.title = ''; }; });
upvote count: 1
downvote count: 1
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25255424
type: AnsweredQuestion

http://stackoverflow.com/comment/39341377
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25251070
has text: I do already use IE dev tools and Firefox/Firebug for other debug purposes. The VS breakpoint system was just really effective at quickly writing/testing/editing. I suppose the short answer though is I don't know and I'll probably have to give it a try. It will still be frustrating not being able to use a facility that was working fine due to some unknown reason though!

http://stackoverflow.com/comment/39503505
comment on: http://stackoverflow.com/a/25338047
score: 1
has text: @JoeSmith Added table
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25280806
answers question: http://stackoverflow.com/q/25279221
upvote count: 3
type: Answer
has comment: http://stackoverflow.com/comment/39398374
score: 3
downvote count: 0
has body: For that you should have to use the Datasource as:: .DataSource(dataSource =&gt; dataSource .Ajax() .Model(model =&gt; { model.Id(p =&gt; p.ID); model.Field(p =&gt; p.Total).Editable(false); }) .PageSize(15) ) Here in the above code, I have set Editable mode to 'false' which will disable the cell.

http://stackoverflow.com/comment/39501193
score: 0
type: AnswerComment
has text: Thanks for your response Ken. Originally I had been setting the content instead of building the template. However I found that attachPoints and attachEvents weren't being wired at all. If I bundle the stuff that I want in the containerNode into another widget and then set the content of the dialog to that widget, will the declarative attach points and events be parsed and attached correctly to my widget?
type: Comment
comment on: http://stackoverflow.com/a/25335551

http://stackoverflow.com/comment/39513933
comment on: http://stackoverflow.com/q/25344432
type: QuestionComment
has text: Is it possible to construct a jsfiddle from this?
score: 0
type: Comment

http://stackoverflow.com/q/25376917
has title: The subject content is undefined
tagged with: node.js
type: AnsweredQuestion
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25377412
score: 0
answer count: 1
tagged with: email
has body: I have a small problem using mailparser. When I'm trying to see the subject content it says that is undefined. My code looks something like this : var fs = require("fs"); var socket = fs.createWriteStream('./outputmail.eml'); socket.on("end",function() { connection.loginfo("end-------&gt;"); }); connection.transaction.message_stream.pipe(socket, {}); // haraka related var mailparser = new MailParser(); mailparser.on("end", function(mail_object){ connection.loginfo("----------SUBJECT--------------------&gt;:", mail_object.subject); }); fs.createReadStream("./outputmail.eml").pipe(mailparser); I'm using mailparser in Haraka (http://haraka.github.io) . The whole point doing this, is that I want to parse every mail I receive and add a banner/image/whatever into the mail's body. If you have any idea why this message appears , please let me know.
has answer: http://stackoverflow.com/a/25377412
tagged with: parsing

reserved-words
tag name: reserved-words
type: Tag
tags question: http://stackoverflow.com/q/25383574

http://stackoverflow.com/comment/39575136
score: 0
type: QuestionComment
type: Comment
has text: I provide an example here: https://github.com/apneadiving/Google-Maps-for-Rails
comment on: http://stackoverflow.com/q/25377600

http://stackoverflow.com/comment/39354182
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25245144
has text: This might be of interest to you. I've used this mrgames's project in the past to kickstart a small prototype. Hes got a (very) cool login mechanism, using the ui-router addon. He also explains his login flow very well. https://github.com/mrgamer/angular-login-example
score: 0

http://stackoverflow.com/comment/39359884
comment on: http://stackoverflow.com/q/25261078
has text: `$(document).one("click", ".del-but", remove);` should be outside the `addCategory()`
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/40026369
score: 0
type: AnswerComment
has text: It definitely means that the var idElement contains a null value, or that there is no dom element in the page with the id value inside idElement. Try executing document.getElementById('<id of the element>') in the browser console, and check the output.
type: Comment
comment on: http://stackoverflow.com/a/25582362

http://stackoverflow.com/comment/39382277
type: QuestionComment
has text: Can you make the ids on the grid not correspond to the database ids? You could just add the database ids in a hidden input field on the grid.
comment on: http://stackoverflow.com/q/25273315
score: 0
type: Comment

http://stackoverflow.com/q/25346660
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/39517826
accepted answer: http://stackoverflow.com/a/25346738
score: -2
has title: Javascript/Jquery: Number nested list
tagged with: javascript
has body: I have a nested list: first second second nested first element second nested secondelement second nested thirdelement Other third fourth Each element has an id that indicates the position within the list. How do I generate it automatically? Thank you. UPDATE: html is generated by Apache velocity without ID. I'm trying to create a method for updating the id if you move elements with jquery sortable. The structure of the id must be "1" for the first item "1-1" for the first element of the first "li". I tried using index () but I can't generate the id in the form that I need
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39517682
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25346738
type: AnsweredQuestion

http://stackoverflow.com/comment/39344430
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25252367
score: 1
has text: Thanks, that gave me the prompt that I needed. Turns out the trigger I was using was wrong, so that the function was only running once when the extension loaded, and not running correctly when the page was loading. I'll answer my own question with the fix.

http://stackoverflow.com/comment/39446891
score: 0
type: QuestionComment
has text: Not sure what you're trying to do here. The D3 approach would be to use nested data, see http://bost.ocks.org/mike/nest/
type: Comment
comment on: http://stackoverflow.com/q/25307177

http://stackoverflow.com/q/25340450
has body: I want to write a JavaScript code that load HTML contents of a given URL and place the loaded HTML code exactly where the script is placed. (maybe this looks like functionality of the iframe tag, but i dont want "iframe tag" become a medium. i just want to load the html code and place it there without adding any container or extra parent) something like this: var url = "http://example.com/"; var html = loadhtmlcontents(url); // something like simplexml_load_file($url) for php and xml document.write(html); // somthing like saveHTML() in DOMDocument class of php I've tried AJAX approach but it doesn't work: var xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200) { document.wirte( xmlhttp.responseText); } } xmlhttp.open("GET", Url, false ); xmlhttp.send(); could you please give me an equivalent or correction to these? (pure JS approach is preferred to JQuery for me in this situation)
favorite count: 0
tagged with: ajax
has title: Load html contents of a given url and place exactly there (like document.write()) in JavaScript
has comment: http://stackoverflow.com/comment/39521452
has answer: http://stackoverflow.com/a/25340572
has answer: http://stackoverflow.com/a/25340597
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/10299846
has comment: http://stackoverflow.com/comment/39507351
score: 1
tagged with: iframe
upvote count: 1
type: Question
tagged with: javascript
tagged with: document.write
has comment: http://stackoverflow.com/comment/39507380
linked to: http://stackoverflow.com/q/10642289
answer count: 2
downvote count: 0

http://stackoverflow.com/a/25230652
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25230632
answers question: http://stackoverflow.com/q/25230632
has body: You should remove the url attribute in this case: .state('error404', { template: ' 404 NOT FOUND ' })
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39301964

http://stackoverflow.com/comment/39464539
comment on: http://stackoverflow.com/q/25317524
has text: i find window.URL.createObjectURL() much faster and easier since i don't need the silly onload callback that FileReader does. https://developer.mozilla.org/en-US/docs/Using_files_from_web_applications#Example.3A_Using_object_URLs_to_display_images
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39487129
comment on: http://stackoverflow.com/a/25329643
score: 0
type: AnswerComment
has text: thanks working …can we give different message .."required :true" ."these field is required" and when user enter invalid email "please enter the valid email "
type: Comment

http://stackoverflow.com/comment/39503613
type: AnswerComment
comment on: http://stackoverflow.com/a/25338368
score: 0
type: Comment
has text: Interesting that Firefox raises a completely different exception for this: `TypeError: Argument 1 of Node.appendChild is not an object`.

http://stackoverflow.com/comment/76830634
has text: you need to get the js class name:if ("Date".equalst(value.getClassName())
type: Comment
comment on: http://stackoverflow.com/a/44927526
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39499759
type: QuestionComment
comment on: http://stackoverflow.com/q/25335718
has text: Again, what did you type exactly, and what exactly was the result. What you are saying is the equivalent of "I tried to get to Rome but didn't get there. Why?".
score: 0
type: Comment

restful-url
tags question: http://stackoverflow.com/q/25270539
tag name: restful-url
type: Tag

http://stackoverflow.com/comment/39419365
type: Comment
type: QuestionComment
has text: What's wrong with keeping the keys as given? Is it necessary to remove them? In my opinion, it would be best to keep them, as they add description.
score: 0
comment on: http://stackoverflow.com/q/25293505

http://stackoverflow.com/comment/113416237
comment on: http://stackoverflow.com/q/25331087
score: 0
type: Comment
type: QuestionComment
has text: How did you ever solve this? If you're still looking, check out https://stackoverflow.com/questions/64130847/get-json-from-a-google-apps-script-web-app-from-another-web-app-without-anonymou.

http://stackoverflow.com/comment/39597696
type: QuestionComment
comment on: http://stackoverflow.com/q/25389114
has text: what you use for creating bundle?
score: 0
type: Comment

http://stackoverflow.com/comment/39424632
comment on: http://stackoverflow.com/a/25296114
type: AnswerComment
type: Comment
has text: `.woo-vou-voucher-code-submit-wrap` is a div not an input, you want `.html` or `.text`
score: 1

http://stackoverflow.com/comment/39521231
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25348842
score: 0
has text: The `trigger` method returns the current jQuery collection not the returned value of the event handler., ie. you are passing the `$element` object to `$.when` not the deferred object.

http://stackoverflow.com/a/25288908
has comment: http://stackoverflow.com/comment/39411596
has body: You have to cancel the previous interval and call the function that updates the HTML immediately. See http://jsfiddle.net/xozL96fj/ $(document).ready(function(){ var intervalTimer = null; $('#mercury .infos').hover( function () { if($("a.active").is('.mercury')){ $("#descriptionls").fadeIn("2000"); } if (intervalTimer !== null) { clearInterval(intervalTimer); } var quotes = [ "Who’s the one who’s always there when that keeps happening?", "Learn to dismantle self-defeating behaviors", "JOIN THE FLOW TODAY", ]; var i = 0; function update() { $("#lstextslide").html(quotes[i]); i = (i + 1) % quotes.length; } // Call it immediately, don't wait until the interval update(); intervalTimer = setInterval(update, 4000); }); });
answers question: http://stackoverflow.com/q/25288639
type: Answer
accepted answer of: http://stackoverflow.com/q/25288639
has comment: http://stackoverflow.com/comment/39412282
upvote count: 1
score: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39411085
downvote count: 0

http://stackoverflow.com/q/25246304
accepted answer: http://stackoverflow.com/a/25247460
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/25246456
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25246456
has answer: http://stackoverflow.com/a/25247460
tagged with: knockout.js
has body: Are there any available tweak to make Knockout support routed events? In my perticular case I want to handle context-menu-events in the root-vm of my view and let any nested vm to set up a context-menu trigger like this: event: { contextmenu: OnContextMenu } If the OnContextMenu-handler is not defined on the current vm it should route the event to it's parent-vm and so on until a handler is found. Currently I have to do like this (which is kind of error prone) event: { contextmenu: $parents[3].OnContextMenu } Or are there other ways of doing this allready?
type: Question
answer count: 2
tagged with: routedevent
score: 2
downvote count: 0
tagged with: javascript
has title: Routed events in Knockout?

http://stackoverflow.com/comment/39438233
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25303394
score: 0
has text: What does the entire ajax-call look like?

http://stackoverflow.com/comment/39423261
type: QuestionComment
comment on: http://stackoverflow.com/q/25294899
has text: It does not find undefined :( I've also closed the and added the <!doctype etc...
score: 0
type: Comment

http://stackoverflow.com/q/25322864
answer count: 1
accepted answer: http://stackoverflow.com/a/25322951
tagged with: d3.js
has answer: http://stackoverflow.com/a/25322951
has body: I have the following JSON { "users": { "gender": { "tot": [ {"label":"female", "value":6038}, {"label":"male", "value":45228}, {"label":"unknown", "value":32932} ] } } } I can load the file with d3.json() and visualise it via console.log() but I can't access the inner values and labels Please consider the following script d3.json("../data/m5s/sumStats.json", function(data) { console.log(data) x.domain(data.map(function(d) { return d[0].users[0].gender[0].comment[0].label; })); }); which returns at the third line Uncaught TypeError: undefined is not a function
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39474263
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
has title: Access nested JSON with d3.json()
score: 0
has comment: http://stackoverflow.com/comment/39474018

http://stackoverflow.com/comment/39384038
score: 1
type: Comment
type: QuestionComment
has text: possible duplicate of [Benefits vs. Pitfalls of hosting jQuery locally](http://stackoverflow.com/questions/3832446/benefits-vs-pitfalls-of-hosting-jquery-locally)
comment on: http://stackoverflow.com/q/25272390

http://stackoverflow.com/q/25239640
tagged with: javascript
has body: I am trying to pass a parameter to a function through another function call. function cursorViaFun(b){ map.off('click'); map.on('click', funcToBeCalled); } In the map.on method i need to be able to call a function that would be named funcToBeCalled+(value of b) or through which i can pass b as a parameter map.on('click', funcToBeCalled(b));
has answer: http://stackoverflow.com/a/25239686
score: 0
accepted answer: http://stackoverflow.com/a/25239686
type: AnsweredQuestion
has title: Pass parameter to function frmo another function call
tagged with: leaflet
type: Question
answer count: 1

http://stackoverflow.com/q/25267375
downvote count: 0
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/14737212
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25269143
has title: Text from knockout.js viewmodel not showing in html
favorite count: 0
has answer: http://stackoverflow.com/a/25267500
possible better answer: http://stackoverflow.com/a/25269143
upvote count: 1
type: AnsweredQuestion
score: 1
tagged with: knockout.js
accepted answer: http://stackoverflow.com/a/25267500
type: Question
answer count: 2
has body: I'm woking with MVC 4 playing around with Knockout for the front end architecture. I currently have the following script on my front end... Merchant name: The problem is that the data for the merchantName attribute isn't showing in the HTML. I run the same code on in the Knockout tutorial page http://learn.knockoutjs.com/#/?tutorial=intro and everything works fine. What do you think could be the issue. Also, I'm relatively new at front end development. What is the best way to debug knockout problems other than chrome debugger? Thanks!

http://stackoverflow.com/comment/39482375
type: QuestionComment
has text: I have worked on this and just used the FacebbokUtils, but know I am running into a small issue, If you can help with me that would be appreciated http://stackoverflow.com/questions/25327316/parse-facebookutils-login-doesnt-connect-after-getting-authdata-from-a-plugin
comment on: http://stackoverflow.com/q/25318305
score: 0
type: Comment

http://stackoverflow.com/comment/39488704
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25305812
has text: @TurnerHayes: Thank you. I wonder how tired I was when I wrote that. :-)

telerik
tags question: http://stackoverflow.com/q/25332106
tag name: telerik
type: Tag
tags question: http://stackoverflow.com/q/25283837

http://stackoverflow.com/comment/39575458
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25377381
type: QuestionComment
has text: Maybe file permissions not in order?

http://stackoverflow.com/comment/39355436
comment on: http://stackoverflow.com/q/25258576
type: QuestionComment
has text: with(new XMLHttpRequest){open("POST", "/"); send(formWithFileInput);}
score: 0
type: Comment

http://stackoverflow.com/comment/39510196
type: QuestionComment
comment on: http://stackoverflow.com/q/25342098
score: 0
has text: Don't use the JavaScript method for testing then. Also better look into `$_SERVER`, which provides more conclusive answers than an empty `$_POST`.
type: Comment

http://stackoverflow.com/comment/39371371
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25267182
type: AnswerComment
has text: Took me quite a while :)

http://stackoverflow.com/q/25361135
favorite count: 0
has comment: http://stackoverflow.com/comment/39543930
type: AnsweredQuestion
score: 1
upvote count: 1
has body: I'm very new to Javascript and trying to replicate something I do on a spreadsheet, but in javascript on a webpage, I've got it to work in a long winded way, looking for ways to simplify it. The script is embedded within the HTML The code checks 8 conditions to set the font colour and add a player's name and time taken off in brackets. The above works, but is long winded and need to look at writting a function to replace it as its used 18 x 46 times on the page. I also need to add another if statement to add when (Game2Player4Yellow == "n")
has answer: http://stackoverflow.com/a/25361688
type: Question
has comment: http://stackoverflow.com/comment/39544160
tagged with: if-statement
tagged with: function
tagged with: javascript
tagged with: image
has title: Javascript if statement to insert an image
accepted answer: http://stackoverflow.com/a/25361688
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/39435678
type: Comment
comment on: http://stackoverflow.com/a/25287190
has text: I cannot "try it" out, since I don't have your environment. Perhaps you could prepare a [fiddle](jsfiddle.net) and tell exactly the sequence of actions you are expecting to have. Like: Page loads > alert pops up > click on link >etc.. or Page loads > click on link > alert pops up > etc... Because it is not quite clear what you wish to achieve. But your modified code will not work, because you only listen to `document.ready` after you click on tha `a`. Which most possibly will not be triggered (the listener for `document.ready`)
type: AnswerComment
score: 0

http://stackoverflow.com/q/25333384
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
linked to: http://stackoverflow.com/q/21901921
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/41053046
has title: Jquery DataTables, highlight cell based on value
has comment: http://stackoverflow.com/comment/39494858
has comment: http://stackoverflow.com/comment/39495334
has comment: http://stackoverflow.com/comment/39494556
duplicate of: http://stackoverflow.com/q/41053046
has answer: http://stackoverflow.com/a/25333865
has body: I'm trying to use DataTables to show a matrix of values pulled from a db with ajax. Now I want to highlight the cells in each row with the highest values: 10 | 12 | 54 | 1 4 | 92 | 11 | 40 9 | 12 | 99 | 98 In the above example, in row 1, 54 and 12, in row 2, 92 and 40 should be highlighted (background-color/class). I'm trying to mimick the conditional formatting of Excel. Any ideas of how to approach the problem?
type: Question
has answer: http://stackoverflow.com/a/25333669

http://stackoverflow.com/comment/39323103
comment on: http://stackoverflow.com/q/25239934
has text: @somethinghere Sad to say, either im stupid(highly possible), or it's not working. thanks for your time anyway :)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39423256
has text: Tell about your project more...so that we can help you out..
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25295269
type: Comment

http://stackoverflow.com/q/25306125
has comment: http://stackoverflow.com/comment/39443118
tagged with: css
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: dom
has body: I am trying to create a button in javascript and make that button positioned below a canvas, the same width as the canvas, however, I don't seem to be able to set the top and width as a variable (the code is ignored). Here is my code: (problem lines commented) var myButton = document.createElement('button'); myButton.style.position = 'absolute'; myButton.style.left = '0px'; myButton.style.top = canvasHeight; // myButton.style.width = canvasWidth; // myButton.style.height = '100px'; myButton.innerHTML = 'Restart!'; document.body.appendChild(myButton); Note that the canvas is resizable, so I can't just type in a px value.
type: Question
has answer: http://stackoverflow.com/a/25306377
accepted answer: http://stackoverflow.com/a/25306377
tagged with: javascript
has title: How do I set width and positioning of an object with javascript from a variable?
has comment: http://stackoverflow.com/comment/39442862
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/39340281
has text: same as ~~ (new Date/1000) or Math.floor(new Date/1000)
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25250596

http://stackoverflow.com/q/25299871
tagged with: javascript
has answer: http://stackoverflow.com/a/25300180
score: 0
answer count: 2
has body: I am working on developing a web site that dynamically creates a table and highlights prime numbers for the user at http://www.primenumbertable.com. I thought I had the computational flow mapped out properly, but after I included the ability for the user to include a starting point, something fell apart. Instead of computing tables to the range specified, tables sometimes get cut short. For instance, if the user specifies that they want to check 100 numbers, and have a starting point of 1, the table will only generate numbers 1-9, instead of 1-100. I even broke out a pen and pad and tried to do the computations step-by-step myself, to see where the error was coming, but my pen and pad calculations had no computational anomalies. It seemed to me that the value that was being input was somehow getting the last "0" cut off before going into the table, but i couldn't find how that was happening. Then, I thought that this could not be the problem, because when i try to check 99 numbers, I get a table that goes all the way up to 102! So, I really have two questions: 1 - How do I trace where the computational error is being made, and 2 - Can anyone see a fix for what is going wrong? The following is my source code: &lt;!DOCTYPE HTML&gt; &lt;html lang="en"&gt; &lt;!-- This page asks the user to input a number to search for primes and returns a base-6 table with primes highlighted --&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;meta name="keywords" content="prime numbers, prime, primes, prime twins"&gt; &lt;title&gt;Prime Numbers&lt;/title&gt; &lt;script type="text/javascript"&gt; /* This function determines if a number is prime or not */ function isPrime(n) { if (isNaN(n) || !isFinite(n) || n%1 || n&lt;2) return false; if (n%2==0) return (n==2); if (n%3==0) return (n==3); var m=Math.sqrt(n); for (var i=5;i&lt;=m;i+=6) { if (n%i==0) return false; if (n%(i+2)==0) return false; } return true; } /* This function creates the table and color codes the cells of prime numbers …
has title: How to trace a computational error in JavaScript
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39431528
has answer: http://stackoverflow.com/a/25300041
has comment: http://stackoverflow.com/comment/39431583
type: Question

http://stackoverflow.com/a/25344225
has comment: http://stackoverflow.com/comment/39513543
score: 3
has comment: http://stackoverflow.com/comment/39513458
has body: Try these examples out in your console Number is a function. typeof Number "function" confirms that. As such, Number does inherit from Function Number instanceOf Function "true" And Function, like all other JavaScript objects, inherits from Object Function instanceof Object true
has comment: http://stackoverflow.com/comment/39513743
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39513529
has comment: http://stackoverflow.com/comment/39513508
upvote count: 3
type: Answer
accepted answer of: http://stackoverflow.com/q/25344144
answers question: http://stackoverflow.com/q/25344144
has comment: http://stackoverflow.com/comment/39513472

http://stackoverflow.com/a/25375460
has body: When you say "k inside and outside" do you mean inside and outside ofuser.getUserInfo(function(err2, info){})? I am not sure of your context however i can think of two things Since the function "function(err2, info)" is a callback and is executed asynchronously the context/stack in which k is used within getUserInfo is completely different. So try to pass k while calling i.e. user.getUserInfo(function(err2, info, k){}). This should work Try to declare k i.e var k in the closure that you want it to be used Updating for another part of question "But I got another issue.. it sends a response to client before it adds the "foo" element. So in the response to client, it only sends the object from "match" without the "foo" element." That is again because ur code inside get user info gets executed asynchronously. For this you need to keep a global flag or try to send the response from within getUserInfo i.e. var mathLen = match.length; user.getUserInfo(function(err2, info,k,mathLen) { console.log('k here: ' + k); if(info){ match[k].foo = info[0].foo; } if(k==mathLen) { var response = { data : match }; res.json(response); } });
type: Answer
has comment: http://stackoverflow.com/comment/39614818
answers question: http://stackoverflow.com/q/25375379
score: 0

http://stackoverflow.com/comment/39376818
type: QuestionComment
comment on: http://stackoverflow.com/q/25269758
score: 0
has text: @runTarm Doesn't each child have its own scope? In my directive I have several scope variables (not shown above) that appear to have different values for each directive instance. If this is what is going on, is there some way to force `element.remove()` to destroy the child scope unique to each directive, instead of the parent's?
type: Comment

http://stackoverflow.com/comment/63780780
comment on: http://stackoverflow.com/q/25379340
type: Comment
has text: That stray `var` on a line by itself is strange. Is there supposed to be a comma after the definition of `_equals` instead of a semicolon?
type: QuestionComment
score: 1

http://stackoverflow.com/q/25236883
type: Question
tagged with: c#
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25236966
score: 0
answer count: 1
has title: how paging Gridview with jquery?
tagged with: asp.net
tagged with: gridview
type: UnansweredQuestion
has body: I want use jquery for my GridView control like this demo : Here I'm beginner in jquery, how can i use paging to my GridView like Demo? Here is my html: &lt;asp:GridView PageSize="5" OnPreRender="gvListCash_PreRender" CssClass="footable" AllowPaging="true" Width="100%" DataSourceID="SqlDataSource3" ID="gvListCash" RowStyle-Wrap="false" runat="server" AutoGenerateColumns="False" DataKeyNames="id" &gt; &lt;Columns&gt; &lt;asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" ReadOnly="True" SortExpression="id" /&gt; &lt;asp:BoundField DataField="name" HeaderText="name" SortExpression="name" /&gt; &lt;asp:BoundField DataField="type" HeaderText="type" SortExpression="type" /&gt; &lt;asp:BoundField DataField="price" HeaderText="price" SortExpression="price" /&gt; &lt;/Columns&gt; &lt;/asp:GridView&gt; &lt;script type="text/javascript"&gt; $(function () { $('table').footable(); $('.colour-switch a').click(function (e) { e.preventDefault(); $('.colour-switch a').each(function () { $('table').removeClass($(this).data('class')); }); $('table').addClass($(this).data('class')); }); }); &lt;/script&gt; Here is my project demo image: i set PagerStyle-CssClass="pagination pagination-centered" for my gridview but it doesn't work true !

http://stackoverflow.com/comment/39407252
has text: Yes anything..Its made the menu backround on hover bigger -_- Thats why I dont want to put in there Better like this
comment on: http://stackoverflow.com/q/25286897
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39470632
score: 0
type: Comment
has text: sorry, I think you've misunderstood the requirement, maybe I wasn't clear. the 'default sample rate' drop-down needs to include all sample rates that are currently selected in however many forms are displayed. so for example, if you have one form with '192000' selected as the sample rate and one form with '176400' as the selected sample rate, the default sample rate drop-down needs to include those 2 values. also I think there is something wrong with the code now, it is not rendering properly in the right-hand div.
type: AnswerComment
comment on: http://stackoverflow.com/a/25300783

http://stackoverflow.com/comment/39543487
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25360073
type: Comment
has text: For some reason this doesn't work. what JQUERY references are you using in your script?

http://stackoverflow.com/a/25235222
type: Answer
accepted answer of: http://stackoverflow.com/q/25235083
upvote count: 2
score: 2
has body: The easiest thing to do is to convert your 12 hour (AM/PM) to 24 hour time integer. For example (from: convert 12-hour hh:mm AM/PM to 24-hour hh:mm): function convertTo24Hour(time) { var hours = parseInt(time.substr(0, 2)); if(time.indexOf('am') != -1 &amp;&amp; hours == 12) { time = time.replace('12', '0'); } if(time.indexOf('pm') != -1 &amp;&amp; hours &lt; 12) { time = time.replace(hours, (hours + 12)); } time = time.replace(':','').trim(); return parseInt(time.replace(/(am|pm)/, '')); } Thus 1:00pm is now 1300 and 2:00pm is 1400pm etc... That way you can sort correctly without the cost of more complex date functions. You can convert back for display or create a third property for your object as time_24. This is not a complete soultion but a starting point. For more details, see Descending order by date filter in AngularJs
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25235083

http://stackoverflow.com/comment/39523893
type: Comment
comment on: http://stackoverflow.com/q/25349848
score: 0
has text: @Bernice did you see first comment (and response to it) in docs' page? Response for comment actually answers your question.
type: QuestionComment

http://stackoverflow.com/q/25362014
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/25284124
has title: Chartjs line graph dataset with offset
type: Question
tagged with: chart.js
has answer: http://stackoverflow.com/a/25384258
accepted answer: http://stackoverflow.com/a/25384258
tagged with: javascript
score: 4
upvote count: 4
has body: How would one enter datasets with an offset into Chart.js, so first x values will not get drawn? e.g I cannot seem to wrap my head around it :/
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/39499678
has text: @MikeCheel Are you referring to [jslint](http://jslint.com)?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25336136

http://stackoverflow.com/q/25343013
type: Question
downvote count: 0
tagged with: javascript
tagged with: google-chrome-extension
answer count: 1
has answer: http://stackoverflow.com/a/25343964
favorite count: 0
has title: DeclarativeContent - wait to show page action
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25343964
upvote count: 1
has body: I'm brand new to Chrome Extensions, but I'm trying to figure out how to delay showing a page action icon until I'm ready for it to. I have a content script (which waits to execute until the DOM is ready) and all is does is grab a URL from the page. chrome.runtime.sendMessage({"url": getUrl()}); function getUrl() { var url = $('meta[itemprop=contentURL]').attr('content'); return url; } In my background.js page I use declarativeContent to see if the page action should be displayed. This is very similar, if not identical to the Google example. chrome.runtime.onInstalled.addListener(function(details) { chrome.declarativeContent.onPageChanged.removeRules(undefined, function() { chrome.declarativeContent.onPageChanged.addRules([rule1]); }); }); var rule1 = { conditions: [ new chrome.declarativeContent.PageStateMatcher({ pageUrl: { urlContains: 'www.example.com', schemes: ['http', 'https'] } }) ], actions: [ new chrome.declarativeContent.ShowPageAction() ] }; I have a listener set up to get the message sent from the content_script chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { url =request.url; //set global variable in background.js so I have it sendResponse({}); }); And finally, I have the action when the page action is clicked. chrome.pageAction.onClicked.addListener(function(tab) { alert(url); }); This code works. However, if I press the page_action button too early during the page load, I'll get an undefined alert because the page action is displayed/available before the content script is executed and the message is passed. How can I delay showing the page action icon until the content script has been executed and the url is set? Thanks!

http://stackoverflow.com/comment/39470188
type: Comment
comment on: http://stackoverflow.com/q/25319711
type: QuestionComment
has text: @TrazeK, even using a directive, the `data-ng-click` attribute doesn't work. When I try to inspect the element, it shows me `browseCategories([Object] object, 'children-1')` and the `click` method is not fired.
score: 0

http://stackoverflow.com/a/25381766
type: Answer
has comment: http://stackoverflow.com/comment/39585029
answers question: http://stackoverflow.com/q/25379912
score: 0
has comment: http://stackoverflow.com/comment/39584659
has comment: http://stackoverflow.com/comment/39584880
has body: If the user gives permission, and is using a supported browser, etc, you can get their location using navigator.geolocation.getCurrentPosition(). See developer.mozilla.org/en-US/docs/Web/API/Geolocation.getCurrentPosition for parameters and more info. You can then use a service such as provided by geonames.org. Eg, http://api.geonames.org/timezone?lat=47.01&amp;lng=10.2&amp;username=demo . This returns the time at the given coords. Update as per first comment: Of course you can never trust any data coming in from outside. But you can do things to raise levels of confidence. This wasn't meant to be a full stand-alone solution.

http://stackoverflow.com/comment/39506852
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/25340186
has text: add `)` after `.is(':checked')` its a major error. than proceed forward
type: Comment

http://stackoverflow.com/comment/39461305
type: QuestionComment
has text: Why dont you want to use the annotation approach?
score: 1
comment on: http://stackoverflow.com/q/25316018
type: Comment

http://stackoverflow.com/comment/58575484
has text: @user3470929 please create a new question instead of asking one in a comment.
type: Comment
comment on: http://stackoverflow.com/a/25255743
score: 0
type: AnswerComment

http://stackoverflow.com/q/25283583
answer count: 1
has title: jQuery.backgroundPosition plug in - TypeError: $.curCSS is not a function
has body: I use jQuery JavaScript Library v1.10.2 + jQuery UI 1.10.4 + Alexander Farkas BackgroundPosition v. 1.22. It cause an error in firebug: TypeError: $.curCSS is not a function Any help? As far as I checked this plug in, there is this function declared. I have no idea, what's wrong. Thank you guys!
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/28007687
favorite count: 0
type: Question
tagged with: background-position
upvote count: 1

http://stackoverflow.com/comment/39391745
has text: see [this](http://www.jquery2dotnet.com/2013/05/convert-numbers-to-words.html), it may help you. Actually you should do some try first and then come to SO.
score: 2
comment on: http://stackoverflow.com/q/25278768
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25369013
type: Answer
has body: Updated Fiddle Added the following CSS .navbar .nav li.dropdown.open&gt;.dropdown-toggle .caret { border-top-color: transparent; border-bottom: 4px solid #000000; position: relative; top: -3px; }
answers question: http://stackoverflow.com/q/25368802
upvote count: 4
downvote count: 0
score: 4

http://stackoverflow.com/comment/39562968
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25370775
has text: If so, you can keep track of the $state in the $rootScope, and assign a controller to each child state: `controller: function($rootScope, $scope) { $rootScope.state = $scope.$state; }`

http://stackoverflow.com/q/25232676
has comment: http://stackoverflow.com/comment/39306175
answer count: 3
has comment: http://stackoverflow.com/comment/39306306
has body: Seems like a bit of a dumb question but looking over all the MDN documentation I cannot tell why this is happening. My match returns not only the words in a sentence but also empty strings, one of each match it appears. var input = "This is a something"; input.match(/[a-z0-9]*/gi); # ["This", "", "is", "", "a", "", "something", ""] It happens even for a single word. var input = "This"; input.match(/[a-z0-9]*/gi); # ["This", ""] I have also tried adding a word boundary (\b) but it does not help at all. Can anybody tell me what is going on here? I just want to match all the words out of a sentence. Thanks in advance for the help.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39306135
tagged with: regex
has title: JavaScript match returns matches plus empty strings
has answer: http://stackoverflow.com/a/25232970
has comment: http://stackoverflow.com/comment/39306200
has answer: http://stackoverflow.com/a/25232743
score: 0
has answer: http://stackoverflow.com/a/25232830
has comment: http://stackoverflow.com/comment/39306102
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39382436
has text: I tried that but unfortunately no luck, the object isnt even showing on the screen let alone the light.
score: 0
comment on: http://stackoverflow.com/q/25273356
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25287524
type: Question
has answer: http://stackoverflow.com/a/25287670
has answer: http://stackoverflow.com/a/25288182
has body: In Parallax JS: I have a menu that will change what is being 'parallaxed', I do not know how to change the components within the &lt;li&gt; tags. I think I need to stop the plugin and then start it again but cannot find the destroy command. I am using the JQuery version. Thank yooou The link to the GitHub: https://github.com/wagerfield/parallax ^components to this! Edit. I had to retype this as for some reason it lost the important but which was that I wanted to add/remove components to Parallax JS
tagged with: javascript
tagged with: parallax.js
score: 0
answer count: 2
tagged with: jquery
tagged with: parallax
favorite count: 0
accepted answer: http://stackoverflow.com/a/25288182
upvote count: 2
has comment: http://stackoverflow.com/comment/39408166
type: AnsweredQuestion
has title: How do I add and remove components? (Parallax JS)
downvote count: 2
possible better answer: http://stackoverflow.com/a/25287670

http://stackoverflow.com/comment/39538500
type: QuestionComment
comment on: http://stackoverflow.com/q/25358183
has text: I think you mean how to pass two value with one result,right? if you want to do that you need to return back the result as JSON.
score: 0
type: Comment

http://stackoverflow.com/a/25341455
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25289662
score: 1
answers question: http://stackoverflow.com/q/25289662
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You must set skipModuleInsertion: false in the RequireJS config, or remove the config option altogether as false is the default value. https://github.com/gfranko/amdclean/issues/54#issuecomment-52392856

http://stackoverflow.com/comment/39536255
has text: I made this CW since this is probably a duplicate. Feel free to edit.
type: Comment
comment on: http://stackoverflow.com/a/25357249
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39587628
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25383249
type: Comment
has text: $("#btApplist").click(function(){ $.getJSON('H:\\STATUSALL\\app.json', function(data){ $.each(data.apps, function() { $.each(this, function(appNumber, appName) { $('#apps').append(new Option(appName, appNumber)); } } } }); Still not working... I wonder why...

http://stackoverflow.com/comment/40435930
score: 0
type: Comment
has text: If your problem is to do with Android Tab (possibly the actionbar) then I'd suggest you at least use the [tag:android] tag (to get the right audience), have updated your question.
type: QuestionComment
comment on: http://stackoverflow.com/q/25308025

http://stackoverflow.com/a/25304307
downvote count: 1
score: 1
type: Answer
has body: Save element id in localStorage. OnLoad get element id from localStorage and set focus to element.
upvote count: 2
answers question: http://stackoverflow.com/q/25303584

http://stackoverflow.com/q/25371262
accepted answer: http://stackoverflow.com/a/25371968
type: Question
has comment: http://stackoverflow.com/comment/40041960
tagged with: canvas
tagged with: javascript
has comment: http://stackoverflow.com/comment/39565571
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: HTML5 canvas game won't pause rendering when browser is not in focus
has comment: http://stackoverflow.com/comment/39563275
has body: My friends and I are making a game, and from some earlier tests, requestAnimationFrame() would make sure that the game would pause when it wasn't in focus. In our current game, here, you can see that it keeps rendering everything even when not in focus. This is what we use to deal with the rendering: //main game loop, updates and renders the game var main = function(){ var now = Date.now(); var delta = now - then; update(delta / 1000); render(); then = now; requestAnimationFrame(main); }; //updates the positions of the target and enemy var update = function(delta){ target.update(delta, gamecanvas); planet.update(delta); enemies.forEach(function(enemy){ enemy.update(delta, gamecanvas) }); defenders.forEach(function(enemy){ enemy.update(delta, gamecanvas) }); }; //clears the screen var clearScreen = function(){ gamectx.clearRect(0,0,gamecanvas.width, gamecanvas.height); }; //clears the screen, and redraws the objects var render = function(){ clearScreen(); planet.draw(gamectx); enemies.forEach(function(enemy){ enemy.draw(gamectx) }); defenders.forEach(function(enemy){ enemy.draw(gamectx) }); target.draw(gamectx); }; //updates the time, runs the main loop var then = Date.now(); main(); Anyone have an idea what's going wrong?
has answer: http://stackoverflow.com/a/25371968
has comment: http://stackoverflow.com/comment/40041799
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39563526

http://stackoverflow.com/q/25277496
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25284031
has title: Creating Rails 4 Form with Join Table Metadata
has comment: http://stackoverflow.com/comment/39390196
has comment: http://stackoverflow.com/comment/39390126
has comment: http://stackoverflow.com/comment/39403013
score: 2
tagged with: ruby
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/39390009
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/39390582
type: Question
has answer: http://stackoverflow.com/a/25284031
has body: Very new Rails 4 developer here. I've got a form where a user is creating Exercises. Exercises can have many Equipment, and Equipment can be optional( think push-up stands for doing push-ups ). I store this "optional" field on the join table exercise_equipment. I cannot get the parameters to actually send through the values of the collection element that I pick. See below for the model, view, controller, and parameters. Here are the attributes/relationships of my models: # id :integer # name :string # is_public :boolean Exercise has_many :exercise_equipment has_many :equipment, :through =&gt; :exercise_equipment accepts_nested_attributes_for :exercise_equipment # id :integer # exercise_id :integer # equipment_id :integer # optional :boolean ExerciseEquipment belongs_to :exercise belongs_to :equipment accepts_nested_attributes_for :equipment # id :integer # name :string Equipment has_many :exercise_equipment has_many :exercises, :through =&gt; :exercise_equipment Here are some (maybe) relevant controller methods: def new @exercise = Exercise.new @exercise.exercise_equipment.build end def create @exercise = Exercise.new( exercise_params ) if @exercise.save redirect_to @exercises else render 'new' end end def edit @exercise = Exercise.find( params[:id] ) end def update @exercise = Exercise.find( params[:id] ) if @exercise.update_attributes( exercise_params ) redirect_to @exercises else render 'edit' end end def exercise_params params.require( :exercise ).permit( :name, :is_public, exercise_equipment_attributes: [ :id, :optional, equipment_attributes: [ :id, :name ], ] ) end This is my shot at creating a view to do what I want: exercises/new.html.erb &lt;%= form_for @exercise do |f| %&gt; &lt;%= render 'form', f: f %&gt; &lt;%= f.submit "New Exercise" %&gt; &lt;% end %&gt; exercises/_form.html.erb &lt;%= f.label :name %&gt;&lt;br /&gt; &lt;%= f.text_field :name %&gt; &lt;%= f.check_box :is_public %&gt; Public &lt;%= f.fields_for( :exercise_equipment ) do |eef| &lt;%= ee…
tagged with: forms
has comment: http://stackoverflow.com/comment/39389899
has comment: http://stackoverflow.com/comment/39392664
has comment: http://stackoverflow.com/comment/39390208
tagged with: ruby-on-rails-4
has comment: http://stackoverflow.com/comment/39390127
has comment: http://stackoverflow.com/comment/39390166

http://stackoverflow.com/a/25316310
has body: It looks like you're trying to use node here, so you should run this from the command line with the command: node &lt;name_of_file&gt; This won't work on Chrome because node is a server-side platform but the Chrome console is for client-side stuff.
downvote count: 0
has comment: http://stackoverflow.com/comment/39461932
score: 1
answers question: http://stackoverflow.com/q/25316254
accepted answer of: http://stackoverflow.com/q/25316254
has comment: http://stackoverflow.com/comment/39462151
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/39503117
has text: Also @JoeSmith, flexbox does work with IE10 I just didn't bother with the vendor prefixes. It most certainly won't work in IE *NEIN* and below. http://caniuse.com/#search=flexbox
type: Comment
comment on: http://stackoverflow.com/a/25338047
score: 2
type: AnswerComment

http://stackoverflow.com/comment/39346494
comment on: http://stackoverflow.com/q/25253702
has text: have you made sure ".order-btn" is correctly tagged on the image? For example, if in IE, the easy way to check is press F12 and use the Developer tools DOM explorer to locate the image and click on it. You can then easily examine and understand what is tagged with the image and the update your code as necessary
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39561274
has text: Ah okay, I'll have a play with it tomorrow. Thanks for the help so far.
type: Comment
comment on: http://stackoverflow.com/a/25368859
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39548214
has text: Yes, I should have looked more carefully at the implementation. The function is stateless, so you have no other choice. I guess I would have to add the same kind of safety valve in my own answer then. The easiest way to avoid this issue seems to be cloning the list and splice it as you select random items. However, if you want to avoid returning the same item twice in a row (through cycles), it gets a bit more tricky (if you do not allow to mutate the items like you did), considering that the same object could be in the array multiple times. It seems every solution has it's downsides.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25350697

http://stackoverflow.com/comment/39395214
score: 0
type: Comment
type: QuestionComment
has text: Yes, the text appears in the div after I click the submit button but the div itself disappears and in order to see the change you have to click on the Register button again(to show the div containing the registration form).
comment on: http://stackoverflow.com/q/25280556

http://stackoverflow.com/comment/39525494
type: Comment
has text: Write your code in jsfiddle
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25351205

http://stackoverflow.com/comment/39589087
has text: @user3218114: I want to remove $ as well.
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25385025
type: QuestionComment

http://stackoverflow.com/q/25253930
type: Question
has comment: http://stackoverflow.com/comment/39347031
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25254026
answer count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/39346867
favorite count: 0
accepted answer: http://stackoverflow.com/a/25254021
has body: I have a script like this (JS) function Quick () { this.getById = function (id) { return document.getElementById(id); } this.doSomethingElse = function () { return Quick.getById('test').nodeName; } } How can I call .getById() within the same function 'Quick' (within another this.x function)? From the outside I would call it like this var x = new Quick(); x.getById('someid'); but don't think I should declare a new instance of a function within the same function.
has comment: http://stackoverflow.com/comment/39346870
has title: Call a function, that is within a function, within a function
has answer: http://stackoverflow.com/a/25254021
has answer: http://stackoverflow.com/a/25254026
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/comment/39423780
type: Comment
type: QuestionComment
has text: Have you tried https://github.com/allaud/quick-ng-repeat. At least before angular 1.2 and track by, it made a difference.
comment on: http://stackoverflow.com/q/25294411
score: 0

http://stackoverflow.com/a/25249469
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25248941
score: 2
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25248941
has body: Use the ng-hide or show directive on the div wrapping the select statement. The problem you're probably running into is that each ng-repeat iteration creates it's own scope, this means that each ng-model you create is completely independent. You can see this here: http://jsfiddle.net/v2r9y6x2/, when each select radio is clicked it prints a different value underneath itself, in both cases this is the value of ng-Model being set: You can fix this by referring to the parent scope with $parent.property instead of just the property name. This will assign the value to the parent controllers scope and work as you expect. http://jsfiddle.net/djwruftr/ {{key}} myColor: {{myColor}} mySize: {{mySize}}

http://stackoverflow.com/a/25232122
has body: You can set some parameters to the post like: $('form').submit(function (e) { e.preventDefault(); $.ajax({ type: 'POST', url: 'seocond.php', data: { a: 'a', functionName: 'abc' }, success: function (msg) { alert(msg); } }); }); And in the PHP file: if ( isset( $_POST['functionName'] ) &amp;&amp; function_exists( $_POST['functionName'] ) ) { $funcName = $_POST['functionName']; $funcName(); } I hope this makes sense to you.
answers question: http://stackoverflow.com/q/25232066
type: Answer
score: 0

http://stackoverflow.com/a/25388861
accepted answer of: http://stackoverflow.com/q/25387729
type: Answer
has body: Depending on what you are actually trying to achieve, the carousel might not be suitable for your requirement. In that case, like @donnanicolas has said, it would be better to roll your own implementation. But regardless of whether it is suitable for your requirement or not, here is a super basic example that you have asked for: Name: Password: Next and in the controller: $scope.activeState = [true, false]; $scope.nextSlide = function () { var activeIndex = $scope.activeState.indexOf(true); if (activeIndex >= $scope.activeState.length - 1) { return; // already reached the last slide } $scope.activeState[activeIndex] = false; $scope.activeState[activeIndex + 1] = true; }; Example Plunker: http://plnkr.co/edit/44TMU4I9Di3vQKjkexBf?p=preview Hope this helps.
upvote count: 2
has comment: http://stackoverflow.com/comment/39599828
score: 2
answers question: http://stackoverflow.com/q/25387729
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25294067
answers question: http://stackoverflow.com/q/25293465
score: 0
type: Answer
has body: It should be as simple as this. d3.text('spreadsheet.csv', function(error, _data){ var table = d3.csv.parseRows(_data); }); Or here's an alternative using jquery-csv if you want: &lt;script src="jquery-csv.js"&gt;&lt;/script&gt; var table = $.csv.toArrays("spreadsheet.csv");

http://stackoverflow.com/q/25233938
linked to: http://stackoverflow.com/q/18323994
tagged with: javascript
tagged with: icons
possible better answer: http://stackoverflow.com/a/25234174
score: 0
tagged with: css
favorite count: 0
has comment: http://stackoverflow.com/comment/39309419
has title: Is it possible to fill an icon to a percentage?
has body: I was wondering if there is a way to fill a specific icon or sprite to a designated percentage - i.e. 20% or something like that. I am trying to create a responsive shape or image that will serve as fluid chart, of sorts. I know the below is not a great example - the svg is also in font form. I want to dynamically fill this image to a specified % in my code. So let's say a data point reads 20%, I want the heart to fill with another color (e.g. color:#DA1C5C) up to 20%, leaving the rest the original color. The code I'm working with is using a straight icon font and not the image svg, but it's not hosted yet. &lt;div class="icon"&gt; &lt;i class="icon-doubleheart"&gt; &lt;img src="https://s3.amazonaws.com/yourcareassets/doubleheart.svg"&gt; &lt;/i&gt;
has answer: http://stackoverflow.com/a/25234174
upvote count: 4
downvote count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25234126
tagged with: image
accepted answer: http://stackoverflow.com/a/25234126
type: Question
answer count: 2

http://stackoverflow.com/comment/39374546
score: 0
has text: @Leeft, thanks for the answer! I tried that and succeeded loading the model. Problem is I'm not able to attach my .mtl file to it. Do you know a way?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25259609

http://stackoverflow.com/a/25353361
type: Answer
has body: function setMovieName(name){ var vid = document.getElementById('mm'); var src = vid.getElementsByTagName('source')[0]; src.setAttribute('src',name); } The getElementsByTagName('source')[0] will get the first element which is what you're looking for. The setAttribute('src',name); will change the src="" of the first to what you pass to the function.
has comment: http://stackoverflow.com/comment/39533460
has comment: http://stackoverflow.com/comment/39530433
score: 0
has comment: http://stackoverflow.com/comment/39533342
answers question: http://stackoverflow.com/q/25353135

http://stackoverflow.com/a/25370968
has body: Here' a great example of how to use RequireJS and AngularJS together. It's a fork of the Angular Seed project and it should hopefully point you in the right direction. It comes with RequireJS baked right in. I definitely recommend learning RequireJS!
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/39564344
score: 1
answers question: http://stackoverflow.com/q/25370594
upvote count: 1

http://stackoverflow.com/a/25273884
upvote count: 1
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/25273784
has body: From your code above it looks like you need to call your function name instead of assigning a value something like: var b = new Book(13); b.addTest(function () { console.log("executing"); return true; }); b.name(); //&lt;-- Before b.name = 15
has comment: http://stackoverflow.com/comment/39383483
type: Answer

http://stackoverflow.com/q/25248601
has answer: http://stackoverflow.com/a/25357777
type: AnsweredQuestion
has title: How to store and type last word of the displayed text using Selenium IDE?
has body: How to store last word of the security question displayed on the screen and type it into the text field using Selenium IDE. Question: What was the name of your first pet? Answer will be: Pet Question: What was your childhood nickname that most people do not know? Answer will be: know Question: What was the first and last name of your first manager? Answer will be: manager
accepted answer: http://stackoverflow.com/a/25279682
upvote count: 1
type: Question
tagged with: javascript
answer count: 2
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25279682
favorite count: 0
tagged with: selenium-ide
possible better answer: http://stackoverflow.com/a/25357777

http://stackoverflow.com/q/25272236
answer count: 2
possible better answer: http://stackoverflow.com/a/25272317
has body: I have two controllers, one controller being for a form, which is called when the form's button is clicked, and one controller being for a div, which is interpollated using scope and {{}}. The problem is that I need to pass the data collected after the form is submitted to the other controller. How can I call that second controller's function within the first controller's function: //FIRST CONTROLLER, CALLED BY CLICKING BUTTON app.controller('FormController', function ($scope) { $scope.IdSubmitted = function () { $scope.datatokens = json_datatokens; //WHERE I NEED TO CALL THE SECOND CONTROLLER, AND PASS IT "json_datatokens" } }); //SECOND CONTROLLER app.controller('#10Controller', function ($scope) { $scope.datatokens = json_datatokens; }); HTML: #FORM Submit Info #DIV Your payment is {{datatokens["DB.PMT"]}}
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25272440
has title: Use Angular ngClick to call function assigned to a different controller
linked to: http://stackoverflow.com/q/9293423
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
has answer: http://stackoverflow.com/a/25272440
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39380330
has answer: http://stackoverflow.com/a/25272317
type: Question

http://stackoverflow.com/comment/39563585
type: Comment
has text: @RyanS How can multiple intervals be trying to increment it when only one interval is set?
comment on: http://stackoverflow.com/a/25370566
type: AnswerComment
score: 0

http://stackoverflow.com/q/25234767
upvote count: 1
tagged with: php
type: Question
score: 1
has body: Yep, it may sound confusing so I thought i'll explain the problem more detailed. Now I'm not asking for a solution of what, I just need to know if it is possible. I tried searching the net for answer but it seems that those sites I visited does not fulfill the answer I need to see. Is it possible to display year using php/html without writing the years in the code behind like the below Year Choose Year 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 What I want to know if is it possible to show the year without the above code like for example display 2004 to 2024. Now today is 2014. When year changes to 2015 then year range will be 2005 to 2025. Is this possible? Thanks for the answer.
accepted answer: http://stackoverflow.com/a/25234774
has title: Autogenerate of years within a span of numbers
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25234774
type: AnsweredQuestion

http://stackoverflow.com/comment/39516475
has text: @jfriend00 you are right, they are in fact not chained! I should've seen that, thanks for clarifying!
score: 0
comment on: http://stackoverflow.com/q/25345520
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39455555
has text: Have you searched for anything yet? This is one of the most common questions. It is really simple. Good luck!
comment on: http://stackoverflow.com/q/25312970
type: Comment
type: QuestionComment
score: 3

http://stackoverflow.com/comment/39502450
type: QuestionComment
has text: I don't understand your suggestion. If the div.sibling is clicked and held down it is then active. no?
type: Comment
score: 2
comment on: http://stackoverflow.com/q/25337701

http://stackoverflow.com/q/25281517
has title: What's the best way to use back references?
tagged with: regex
upvote count: 3
has body: In some \1 will work and in some $1 in online regex builder. Does both way works in every javascript engine?
downvote count: 1
has answer: http://stackoverflow.com/a/25281584
has answer: http://stackoverflow.com/a/25281660
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25281584
possible better answer: http://stackoverflow.com/a/25281660
type: AnsweredQuestion
score: 2
favorite count: 0
type: Question
answer count: 2

http://stackoverflow.com/comment/39441189
comment on: http://stackoverflow.com/a/25304674
has text: Every thing is working fine till the return part. I have a list with some data. Only thing is how pass that data to view? The call is going to db and i am getting the result as a list.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25365546
score: 0
answer count: 2
tagged with: javascript
has title: On dropdown menu option selection show some cells in the table
has answer: http://stackoverflow.com/a/25365631
accepted answer: http://stackoverflow.com/a/25365631
tagged with: http://stackoverflow.com/tag/html
has body: I would like to create a web page, where are 2 dropdown menus, and a table. For better understanding I would like to create something like this. So the first dropdown menu would display the years, the second the country names. When I select one of the years or one of the country names, in the table should be shown just those coins which were issued in that year or by that country. I was looking for this question on the Internet, and I have found this: Click here to toggle visibility of element #foo This is foo I thought, that I will give more "id" to the same tag in the table to be able to select both dropdown menus and the other cells somehow to hide, but I found out, that I can't add more "id". So now I do not know, how to achive that when I select any of the options, just the selected group of coins would be shown in the table. Any suggestions, how should I solve this problem? Thanks in advance.
has answer: http://stackoverflow.com/a/25365892
has comment: http://stackoverflow.com/comment/39551920
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25365892
has comment: http://stackoverflow.com/comment/39551999
type: Question

http://stackoverflow.com/comment/39465003
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25316562
has text: glad to be of help :) please be sure to check/accept the answer above
type: AnswerComment

http://stackoverflow.com/comment/39550493
type: AnswerComment
comment on: http://stackoverflow.com/a/25364854
score: 0
type: Comment
has text: This works fairly well! Thanks for the response! The only caveat is that it seems to squish everything to fit the current viewport instead of extending beyond it. Also, would you happen to know if this invokes any sort of overhead when switching to this kind of display? Our current page uses tables and render time is ludicrous.

http://stackoverflow.com/q/25301085
favorite count: 0
has answer: http://stackoverflow.com/a/25301709
type: AnsweredQuestion
score: 2
upvote count: 2
type: Question
tagged with: javascript
has title: Raty Js Star Rating to give Float Values
accepted answer: http://stackoverflow.com/a/25301709
tagged with: jquery
has body: In my app Admin can enter a rating for each user. Im using raty js to show and also to input the star rating.. Thing is I can get an integer value through this. IM trying to set float values through this like half star and all This is what i did.. But still the output is all fullstars.. not half stars.. $('#expert_star').raty({ &lt;% expert_score = (@expert_rating &amp;&amp; @expert_rating.score.present?) ? @expert_rating.score : 0 %&gt; showHalf: true, score: &lt;%= expert_score %&gt;, readOnly: &lt;%= expert_score &gt; 0 ? true : false %&gt;, mouseover: function(score) { console.log("Score: "+score); } }); Ignore the ruby codes in side jquery script
tagged with: ruby-on-rails-4
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/39378281
type: AnswerComment
type: Comment
has text: how do I do AND -like.. with href and class OR href and id OR href,class and id, the class and id works- $("a#country.save")
comment on: http://stackoverflow.com/a/25270339
score: 0

http://stackoverflow.com/comment/39679197
has text: Yeah i thought so. Maybe you can upvote my question then if you see it worthy. I will accept this / upvote since it seems to be only solution anyway.
type: AnswerComment
comment on: http://stackoverflow.com/a/25388943
score: 0
type: Comment

http://stackoverflow.com/comment/39368873
type: QuestionComment
comment on: http://stackoverflow.com/q/25265771
has text: @BenjaminGruenbaum I'm only throwing an error here because it's a test script to understand how promises work. Normally I'd return the error back up to where the method in question is called.
score: 0
type: Comment

http://stackoverflow.com/a/25305833
upvote count: 6
type: Answer
score: 6
downvote count: 0
answers question: http://stackoverflow.com/q/25305640
has body: Here about two things you have to be careful. 1) Operator precedence When you are saying var middle = m.length - 1 / 2; It is same as var middle = m.length - 0.5; //Because / has much precedence than - So you should say var middle = (m.length - 1) / 2; Same problem with m.length - 1 % 2 2) You are not rounding middle so it's looking for decimal indexes in array. Which I think will return undefined.

http://stackoverflow.com/comment/39451969
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25311020
has text: That javascript is pregenerated and I use it as is that is why there is document.write if I understood correctly.

http://stackoverflow.com/comment/39539825
has text: Please show code that you've written so far
comment on: http://stackoverflow.com/q/25358655
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25270310
type: AnsweredQuestion
score: 1
type: Question
has body: I am new to JavaScript and decided to create my own JS quiz. Here's what I have so far: &lt;script type="text/javascript"&gt; score = 0; var questions = [['whats 2 + 2' , '4'] , ['whats 3 * 3' , 9] , ['whats 2 * 7' , 14] ]; function askQ(ans){ var answer =prompt (questions[i] , ''); if(answer == questions[1]){ score++; alert('Yahooo , ur right'); } else{ alert('Brush up ur GK'); } } for (var i = 0; i &lt; questions.length ; i++) { askQ(questions[i]); }; &lt;/script&gt; The problem is when the question "prompted" to the users screen, the answer is also displayed simultaneousl , eg . for the 1st question this is what appears: "what is 2+2,4" .. now you see , "4" is the answer I am sure in order for the 4 not to display I need to do something differently, so I went through a few online snippets of code and it was either too complex for me to understand. Here is a jsfiddle.
possible better answer: http://stackoverflow.com/a/25270483
answer count: 2
has title: Javascript array display
accepted answer: http://stackoverflow.com/a/25270455
tagged with: arrays
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39376633
has answer: http://stackoverflow.com/a/25270455
upvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25270483

http://stackoverflow.com/comment/39311267
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25235166
score: 0
has text: It shouldn't block, that is the best thing in callback, it will be a non-blocking call.

http://stackoverflow.com/comment/39481950
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25327110
has text: I tried it before but didn't work. `TypeError: undefined is not a function`
score: 0

http://stackoverflow.com/comment/39556113
type: Comment
comment on: http://stackoverflow.com/q/25367456
type: QuestionComment
has text: Use cookies to store the URL between page refreshes and page navigation. Or server side scripts would do the trick.
score: 0

http://stackoverflow.com/comment/39513665
comment on: http://stackoverflow.com/q/25344349
score: 0
type: QuestionComment
type: Comment
has text: `<?php echo addslashes($a1);?>`

http://stackoverflow.com/comment/82243062
type: Comment
has text: This is no more legible that "standard" use of routers, I'm looking for a way to visualize the nesting when viewing the code.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25305272

http://stackoverflow.com/a/25320965
answers question: http://stackoverflow.com/q/25320912
has comment: http://stackoverflow.com/comment/39470757
score: 0
type: Answer
has body: When you wrote \'' + blob \'', you entered literal single quotes before and after blob. This makes the part of the string you're making look something like this &lt;button onclick="sendWaveToPost('whateverWasIntheBlob', 5)" /&gt; instead of like this incorrect version &lt;button onclick="sendWaveToPost(whateverWasIntheBlob, 5)" /&gt;
has comment: http://stackoverflow.com/comment/39470617
has comment: http://stackoverflow.com/comment/39470869

http://stackoverflow.com/a/25232405
has body: JavaScript uses + for concatenation, not . Additionally, you should use var name = ... instead of just name = ... to avoid creating a global!
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25232394
type: Answer
score: 10
upvote count: 10
answers question: http://stackoverflow.com/q/25232394

http://stackoverflow.com/q/25378359
tagged with: ui-select2
tagged with: angularjs
tagged with: angularjs-select2
has comment: http://stackoverflow.com/comment/39580592
has body: I want to trigger a callback or event when my ui-select2 directive &lt;input type="hidden" ui-select2="myConstructorObject" ng-model="myModel" required /&gt; has rendered the Select2 DOM elements. How can I achieve this? Is there any constructor atrribute I am not aware of?
has comment: http://stackoverflow.com/comment/39577332
has comment: http://stackoverflow.com/comment/39576896
type: AnsweredQuestion
has title: Select2 directive callback when rendering done
has answer: http://stackoverflow.com/a/25420149
accepted answer: http://stackoverflow.com/a/25420149
type: Question
tagged with: angularjs-directive
tagged with: javascript
has comment: http://stackoverflow.com/comment/39576652
score: 0
answer count: 1

http://stackoverflow.com/q/25383521
has comment: http://stackoverflow.com/comment/39586294
has comment: http://stackoverflow.com/comment/39585892
has comment: http://stackoverflow.com/comment/39586340
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39586141
has comment: http://stackoverflow.com/comment/39586061
tagged with: phpbb
tagged with: phpbb3
has comment: http://stackoverflow.com/comment/39586664
has title: alternative javascript code construction
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39588953
has comment: http://stackoverflow.com/comment/39586039
has body: i'm using this code: The code runs fine in an editor, but on a server it doesn't work the right way (adds padding not to each number but to the whole row). I also tried adding function, but then I cant add any style to a number (like [u][/u]). "1,2,3,4,5".replace(/([0-9]+),?/g , function (el) { return ' ' + el.replace(/,/g,"") + ' '; }); Thanks!
answer count: 0
type: Question

http://stackoverflow.com/q/25372336
has body: I have enabled contentEditable. In Firefox, by default, the tables and images can be manipulated. But in other browsers like Midori, QupZilla and similar WebKit browsers this feature is not enabled by default. How/Can can I enable these two settings enableObjectResizing enableInlineTableEditing in a WebKit based browser's console? I am going to utilize this in a program that I am making, but trying to figure out how to do it in the console first.
upvote count: 6
has comment: http://stackoverflow.com/comment/39606317
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/46045881
score: 6
tagged with: webkit
type: AnsweredQuestion
downvote count: 0
favorite count: 0
type: Question
has title: enableObjectResizing and enableInlineTableEditing in Webkit
accepted answer: http://stackoverflow.com/a/46045881

http://stackoverflow.com/comment/39388919
comment on: http://stackoverflow.com/q/25277023
score: 0
has text: The last sample in your bin seems fine. Are you sure you're not trying to fix a physical artefact of the rendering process?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39569774
score: 0
has text: What doesn't work about what you have above? Looks good to me
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25374623

http://stackoverflow.com/comment/39445383
type: Comment
comment on: http://stackoverflow.com/a/25307466
type: AnswerComment
has text: tried clearing the cache also removing `e.preventDefault();` nothing works
score: 0

http://stackoverflow.com/comment/39576725
comment on: http://stackoverflow.com/a/25378178
type: Comment
score: 0
type: AnswerComment
has text: Should the value be a property, rather than state?

http://stackoverflow.com/comment/60868022
comment on: http://stackoverflow.com/q/25269095
score: 0
type: Comment
type: QuestionComment
has text: 2 years and still this bug...grrrr..

http://stackoverflow.com/comment/73722883
has text: If you want the original ValidationTextBox behaviour, set the `isValid` property to `function() {return this.validator(this.textbox.value, this.get('constraints'));}`
comment on: http://stackoverflow.com/a/25375470
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25237730
type: Answer
has body: If you do not really want to count but just toggle, use a global variable and just toggle: var counter = false; $(document).ready(function() { $("#addMe").click(function(){ counter = !counter; $("#hiddenVal").val(counter); $("#theCount").text(counter); $("#addMe").toggleClass('active'); }); }); You can also drop the hidden element in your form.
has comment: http://stackoverflow.com/comment/39315940
answers question: http://stackoverflow.com/q/25237486
score: 0

http://stackoverflow.com/comment/39566010
has text: Before I added the slideshow, I had the image exactly how i wanted it using `cover`. The problem is that the javascript slideshow is not recognizing that i want the pictures to be `cover` so they remain stretched.
type: QuestionComment
comment on: http://stackoverflow.com/q/25372548
score: 0
type: Comment

http://stackoverflow.com/comment/39341310
type: Comment
type: QuestionComment
has text: If your objective is to optimize for time (and you really _need_ to), then an event-based approach would be best for this case.
comment on: http://stackoverflow.com/q/25250540
score: 1

http://stackoverflow.com/a/25238410
downvote count: 0
has comment: http://stackoverflow.com/comment/39317220
score: 5
has body: You don't use var for defined varables. In this case window is already defined as the Window object. To set a property on this object, simply use window.testing = "hello"; Read more about var here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var
answers question: http://stackoverflow.com/q/25238385
upvote count: 5
type: Answer

http://stackoverflow.com/q/25364662
accepted answer: http://stackoverflow.com/a/25367026
tagged with: web-worker
score: 0
tagged with: tizen-web-app
answer count: 1
has answer: http://stackoverflow.com/a/25367026
tagged with: multithreading
tagged with: tizen
type: AnsweredQuestion
type: Question
has body: I need to create an web application in Tizen that needs to get the user location either the application is open or it's closed. I found that i can run javascript web worker to run code in a diferent thread, but i don't know if with the web worker i can run the code with the application closed. If it can't, there is another way to do it?
has title: In a Tizen web app, can i use javascript web worker to run background code on a closed application?
tagged with: javascript

http://stackoverflow.com/q/25251639
has body: I try to mix websockets, nodejs server and HTML5 API On the front-end I have var formData = new FormData(); formData.append('file', files[0]); formData.append('case', 'test'); so that I can grab an image and send it with using websockets like so mysoc.send(formData) My question is, on nodejs 0.10.12, how can I retrieve the form data, how can I do something like $case=$_POST['case']; Using php I can do it, but using javascript and nodejs I am lost. I am using the pg module but I found no similar example. Any help? Thanks
has comment: http://stackoverflow.com/comment/39342905
has comment: http://stackoverflow.com/comment/39344250
answer count: 0
has comment: http://stackoverflow.com/comment/39343211
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39342361
tagged with: pg
has title: grab form data in websockets - nodejs
has comment: http://stackoverflow.com/comment/39345203
tagged with: websocket
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39343349
tagged with: node.js
has comment: http://stackoverflow.com/comment/39343186

http://stackoverflow.com/comment/39563142
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25362412
type: Comment
has text: ahh... well i figured out how to delete stuff. I just implemented a delete code as the person above did and autogenerated it, connected it with the id, now I can remove the ID of it

http://stackoverflow.com/comment/39567378
has text: What have you tried so far? It would help if you show that you've done some research or work into your problem and ask something more specific to what is blocking you. Please see http://stackoverflow.com/help/how-to-ask
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25373350

http://stackoverflow.com/comment/39333438
type: Comment
comment on: http://stackoverflow.com/q/25247092
type: QuestionComment
has text: use class selector then, and use class, id must be unique of each element
score: 3

http://stackoverflow.com/a/25375767
answers question: http://stackoverflow.com/q/25371908
has body: You cannot call date picker on the body tag. You could at the end of all your code do $(".dtp").each(function() { $(this).datepicker(); } if you give your inputs the class="dtp"
score: 0
type: Answer

http://stackoverflow.com/comment/39337993
has text: Has anyone some idea on how to solve this? I really don't know on how to solve this... Thank you in advance.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25241767

http://stackoverflow.com/comment/39345832
comment on: http://stackoverflow.com/a/25253384
score: 1
type: AnswerComment
has text: In some browsers you can access formName as a part of window. It is a known thing.. But that form is html element.. where as inside the controller you may really want formController
type: Comment

http://stackoverflow.com/comment/39650334
score: 1
has text: Update - fired up a VM and added yammer and adfs into the trusted sites in IE11 and was able to authenticate with no issues. Will now be sharing this with our network admins to compare this with our global policy settings. Will advise if this resolves it.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25353509

http://stackoverflow.com/a/25355550
type: Answer
accepted answer of: http://stackoverflow.com/q/25354840
has comment: http://stackoverflow.com/comment/39534900
has comment: http://stackoverflow.com/comment/39534433
has body: My guess is the object returning from _.merge is no longer a Mongoose model and some information is getting lost in the transform. I would try manually setting all of the fields coming from the request and use events.attending.push() to add to the array, then saving the updated object and see what happens. Your first example with markModified looks wrong. Looking at the documentation it should be the name of the field that is modified and it appears that you've put the source location for it. user.markModified('user.eventsAttending') However that should not be necessary if you use the push method as Mongoose overrides the built-in array function to track changes.
type: AcceptedAnswer
score: 0
answers question: http://stackoverflow.com/q/25354840
has comment: http://stackoverflow.com/comment/39534875

http://stackoverflow.com/q/25310324
possible better answer: http://stackoverflow.com/a/25310380
has comment: http://stackoverflow.com/comment/39450432
has answer: http://stackoverflow.com/a/25310365
has answer: http://stackoverflow.com/a/25310380
has title: Getting the value of an input field in HTML and using it in a link url
accepted answer: http://stackoverflow.com/a/25310365
type: AnsweredQuestion
type: Question
answer count: 2
tagged with: javascript
score: 0
has body: I have a search button in html and I would like it link to /home/search/search_term where the search term is the value entered into the corresponding input element. Something like Search would be ideal. How can I achieve something like this?
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39430610
score: 0
has text: see http://jsfiddle.net/arunpjohny/adbrspqt/1/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25299328

http://stackoverflow.com/q/25240666
has answer: http://stackoverflow.com/a/25240846
has body: I'm just playing around with creating a website, excuse the messy code, quite new to this game. Basically I'm trying to section a website with each sections content either going to the left or right, alternating. As you can see I've managed to do the one to the left (Section2), however I can't seem to do the one on the right (Section3). The nav bar is also fixed but isn't showing on the JSFiddle. I'm also wondering why my text displays fine on my 1920x1080 monitor, but on my 1366x768 laptop, it overflows out of the div, bear in mind that the backgrounds of each section will be will eventually be an image, so I can't repeat it. I've uploaded a JSFiddle as I was getting confused with what I had to do to upload code here, hope it is not a problem. I appreciate your help, and again sorry for the incredible messy code! Title 1 2 3 4 5 6 About Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eros nisi, consequat sit amet sodales vitae, molestie eu elit. Nullam gravida laoreet nulla sit amet pretium. Vivamus nisi est, imperdiet a venenatis vel, porttitor vitae dui. Vivamus laoreet tortor in diam interdum, ac dapibus ante pretium. Vivamus gravida leo sit amet placerat lobortis. Sed odio arcu, tempus non gravida ut, egestas ut velit. Ut vitae enim fringilla, consequat massa quis, interdum sem. Donec vel sollicitudin urna. Suspendisse eget mi neque. Phasellus adipiscing nunc vitae nulla molestie tempor. Curabitur porttitor pretium augue, sit amet ornare metus. About Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eros nisi, consequat sit amet sodales vitae, molestie eu elit. Nullam gravida laoreet nulla sit amet pretium. Vivamus nisi est, imperdiet a venenatis vel, porttitor vitae dui. Vivamus laoreet tortor in diam interdum, ac dapibus ante pretium. Vivamus gravida leo sit amet placerat lobortis. Sed odio arcu, tempus non gravida ut, egestas ut velit. Ut vitae enim fringilla, consequat massa quis, interdum sem. Donec vel sollicitudin ur…
has comment: http://stackoverflow.com/comment/39321310
tagged with: javascript
has title: Content will not float the the right of the page
has comment: http://stackoverflow.com/comment/39321454
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/39321484
has answer: http://stackoverflow.com/a/25240939
favorite count: 0
has answer: http://stackoverflow.com/a/25240876
has comment: http://stackoverflow.com/comment/39321372
upvote count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/39321467
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39321426
accepted answer: http://stackoverflow.com/a/25240876
type: Question
has comment: http://stackoverflow.com/comment/39321331
possible better answer: http://stackoverflow.com/a/25240846

http://stackoverflow.com/comment/39589906
type: Comment
has text: try replacing `data=role "form"` with ` `. Everything must be inside the form tag you are trying to serialize.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25368705

http://stackoverflow.com/a/25294040
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25293991
has body: The left hand side value of "test" in the routes object is a property whos value is a function. try this: &lt;script&gt; var Workspace = Backbone.Router.extend({ routes: { "test": "test", }, test: function() { var elem = document.getElementById("one"); elem.className = "hide"; } }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/39421010
has comment: http://stackoverflow.com/comment/39420388
downvote count: 0
has comment: http://stackoverflow.com/comment/39422947
type: Answer

http://stackoverflow.com/comment/39310667
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25234269
has text: thank you, i was struggling on how to get the array, cause `prin_r($_FILES['fotos'])` didn't work.
score: 0

http://stackoverflow.com/a/25258547
has comment: http://stackoverflow.com/comment/39355691
accepted answer of: http://stackoverflow.com/q/25258435
answers question: http://stackoverflow.com/q/25258435
score: 0
type: AcceptedAnswer
type: Answer
has body: You can have a look at Grunt http://gruntjs.com/. It provides many plugin which can make your life a lot easier with these kind of taks. Plugin for concatenation here : https://github.com/gruntjs/grunt-contrib-concat

http://stackoverflow.com/a/25363933
type: AcceptedAnswer
downvote count: 0
has body: Both JSON.parse and JSON.stringify let you plug into what they're doing, so you can customize the serialization. Also, you can add a toJSON method to your type's prototype objects which is called to serialize them to JSON, letting you completely control the process. JSON.stringify lets you customize the serialized result in two ways: If the object has a toJSON method, JSON.stringify uses that. It lets you specify a "replacer" function that is called for each item being serialized, in order to give you a chance to customize the serialization a bit. You could use that as an opportunity to mark the output object with the type you want it to have when it comes back in. JSON.parse lets you specify a "reviver" function which is essentially the converse. So you could look for your special serialized type property on the raw object, and use that combined with the raw object data to create your typed object. I went looking for an example of using these, and...er...um...happened to find my own answer to another question going into some detail. :-)
has comment: http://stackoverflow.com/comment/39552975
type: Answer
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/25363853
answers question: http://stackoverflow.com/q/25363853

http://stackoverflow.com/a/25372589
answers question: http://stackoverflow.com/q/25372522
type: AcceptedAnswer
type: Answer
has body: Object literal keys need to be constant. test[i] isn't going to work. You'll need to create an empty object and add the key/value pair: var o = {}; o[ test[i] ] = items[test[i]]; productObj.push( o );
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25372522
upvote count: 3

http://stackoverflow.com/q/25235008
has comment: http://stackoverflow.com/comment/39311006
has comment: http://stackoverflow.com/comment/39311009
has comment: http://stackoverflow.com/comment/39310997
has comment: http://stackoverflow.com/comment/39311114
type: AnsweredQuestion
score: 2
upvote count: 2
accepted answer: http://stackoverflow.com/a/25235082
has title: How to sort an array with digital size and occurrences
type: Question
has comment: http://stackoverflow.com/comment/39310989
tagged with: javascript
has comment: http://stackoverflow.com/comment/39311048
has comment: http://stackoverflow.com/comment/39311026
has comment: http://stackoverflow.com/comment/39311021
has body: I have an array of numbers var number = [7,7,6,9,9,9,3,3] and we want to sort it by number of occurrences. In this example the result should be: [6,3,3,7,7,9,9,9] We tried to use sort, but couldn't figure it out. If we only can use sort, how could we solve this problem in one sort? var number = [7,7,6,9,9,9,3,3]; number.sort(function(a,b) { //code here });
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/25235082
favorite count: 0

http://stackoverflow.com/a/25246446
downvote count: 1
score: 3
upvote count: 4
has body: HTML5 finally provides a standard way to interact with local files, via the File API specification. The spec provides several interfaces for accessing files from a 'local' filesystem: File - an individual file; provides readonly information such as name, file size, mimetype, and a reference to the file handle. FileList - an array-like sequence of File objects. (Think or dragging a directory of files from the desktop). Blob - Allows for slicing a file into byte ranges. When used in conjunction with the above data structures, the FileReader interface can be used to asynchronously read a file through familiar JavaScript event handling. Thus, it is possible to monitor the progress of a read, catch errors, and determine when a load is complete. In many ways the APIs resemble XMLHttpRequest's event model. The first thing to do is check that your browser fully supports the File API: // Check for the various File API support. if (window.File &amp;&amp; window.FileReader &amp;&amp; window.FileList &amp;&amp; window.Blob) { // Great success! All the File APIs are supported. } else { alert('The File APIs are not fully supported in this browser.'); } Next, handle file selection: &lt;input type="file" id="files" name="files[]" multiple /&gt; &lt;output id="list"&gt;&lt;/output&gt; &lt;script&gt; function handleFileSelect(evt) { var files = evt.target.files; // FileList object // files is a FileList of File objects. List some properties. var output = []; for (var i = 0, f; f = files[i]; i++) { output.push('&lt;li&gt;&lt;strong&gt;', escape(f.name), '&lt;/strong&gt; (', f.type || 'n/a', ') - ', f.size, ' bytes, last modified: ', f.lastModifiedDate ? f.lastModifiedDate.toLocaleDateString() : 'n/a', '&lt;/li&gt;'); } document.getElementById('list').innerHTML = '&lt;ul&gt;' + output.join('') + '&lt;/ul&gt;'; } document.getElementById('files').addEventListener('change', handleFileSelect, false); To read file, extend handleFileSelect as such: function handleFileSelect(evt) { var files …
answers question: http://stackoverflow.com/q/25246281
type: Answer

http://stackoverflow.com/q/25293176
tagged with: naming-conventions
tagged with: javascript
has body: In C, if a compiler wants to provide implementation-defined identifiers (language extensions, intrinsics, pseudo-functions and pseudo-macros, basically anything that's not a reserved keyword by the language standard but also isn't a regular function) the convention is for the names to be prefixed with an underscore; it is understood that code should not use such names for normal purposes. Is there an equivalent convention in JavaScript? Or, if a JavaScript compiler wants to provide implementation-defined identifiers for special purposes, and avoid collisions with identifiers normally used in code, what is the best way for it to do so?
accepted answer: http://stackoverflow.com/a/25293441
answer count: 1
downvote count: 0
has title: JavaScript conventions for implementation-defined identifiers
favorite count: 0
tagged with: language-implementation
has comment: http://stackoverflow.com/comment/39458990
has comment: http://stackoverflow.com/comment/39419737
type: AnsweredQuestion
score: 2
tagged with: identifier
upvote count: 2
has answer: http://stackoverflow.com/a/25293441
type: Question

http://stackoverflow.com/q/25346729
type: UnansweredQuestion
has body: I have a div in which I added element .I want to scroll to bottom of the div whenever element added in div.I know how to do in in jquery .But I did not know how to scroll using angular js testCaseContainer is id of div . var elem = document.getElementById('testCaseContainer'); // just to // scroll down // the line elem.scrollTop = elem.scrollHeight; I want to know how it is possible using angular ? http://plnkr.co/edit/M8tCL8Szc3h3FatFLycG?p=preview I added css in div container so that it scroll . .heightClass{ height:100px; overflow :auto; } how to move focus below when item is added ..please post your answer..
upvote count: 1
score: 1
linked to: http://stackoverflow.com/q/9666914
type: Question
tagged with: angularjs-directive
has title: how to scroll to bottom or move focus to bottom in angular?
answer count: 2
has answer: http://stackoverflow.com/a/25348926
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25357426
downvote count: 0
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/q/25245162
has body: I am trying to make an identifyer for the jQuery slide.Toggle function. I am running a loop in php to print values, and these all have a button and a div which should be able to slide.Toggle. What i have tried so far, but without luck, in the php: &lt;?php $rooms_array = sizeof($rooms) - 1; for ($i = 0; $i &lt;= $rooms_array; $i++) { ?&gt; &lt;div style="margin-left:6px;" id="show_more&lt;?php echo $i + 1; ?&gt;"&gt;Foo Button&lt;/div&gt; &lt;div id="more_room_info&lt;?php echo $i + 1; ?&gt;" class="meetingroomInfoHide"&gt; &lt;?php echo $rooms[$i]['description'] ?&gt; &lt;/div&gt; &lt;?php } ?&gt; The jQuery: $('#show_more' + 1).click(function(){ $('#more_room_info' + 1).stop().slideToggle('slow'); return false; }); So the above code works, but only for the first div which is created by the loop. This is because of the "+ 1" identifyer. I have tried to run er 'for'-loop, but this will not work, as i need the 'for'-loop to be outside the click function, and then the code won't run the code, as it just runs the for-loop when the page is loaded. Where I am having trouble is in the jQuery. How do i make the "#show_more" be "#show_more1", and "#more_room_info" be "#more_room_info1", with a loop of some sort? I could technically just make the code 50 times, and change the "+ 1", but this won't be nice. Regards, Patrick
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25245771
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25245771
has title: How to make identifyer for jQuery slide.Toggle function

http://stackoverflow.com/comment/39521153
has text: if ($("#container li").data('season') == showseason ) { $("#container li[data-season=]" + showseason).show(); } Something like this, albeit the [data-season=] + showseason isn't quite right?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25348698
type: Comment

http://stackoverflow.com/comment/39496295
has text: I'm thinking it's because this is all technically all one Bootstrap .row and the buttons are actually in columns...
comment on: http://stackoverflow.com/q/25334158
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25318727
downvote count: 0
possible better answer: http://stackoverflow.com/a/25319141
tagged with: javascript
tagged with: callback
upvote count: 3
answer count: 2
tagged with: lodash
favorite count: 0
has answer: http://stackoverflow.com/a/25319141
tagged with: dictionary
tagged with: node.js
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/25319103
type: Question
has answer: http://stackoverflow.com/a/25319103
has body: If I want get an array of strings converted to lowercase, this seems like the normal thing to do: lodash = require('lodash') lodash.map(['A', 'B'], String.prototype.toLowerCase.call) TypeError: object is not a function at Function.map (/Users/alejandro.carrasco/repos/cap-proxy/node_modules/lodash/dist/lodash.js:3508:27) at repl:1:9 at REPLServer.self.eval (repl.js:110:21) at Interface.&lt;anonymous&gt; (repl.js:239:12) at Interface.EventEmitter.emit (events.js:95:17) at Interface._onLine (readline.js:202:10) at Interface._line (readline.js:531:8) at Interface._ttyWrite (readline.js:760:14) at ReadStream.onkeypress (readline.js:99:10) at ReadStream.EventEmitter.emit (events.js:98:17) I've dug a little bit in the code and it seems that the problem is produced by the createCallback wrapping the passed function used inside map: lodash.createCallback(String.prototype.toLowerCase.call)('A') TypeError: object is not a function at repl:1:58 at REPLServer.self.eval (repl.js:110:21) at Interface.&lt;anonymous&gt; (repl.js:239:12) at Interface.EventEmitter.emit (events.js:95:17) at Interface._onLine (readline.js:202:10) at Interface._line (readline.js:531:8) at Interface._ttyWrite (readline.js:760:14) at ReadStream.onkeypress (readline.js:99:10) at ReadStream.EventEmitter.emit (events.js:98:17) at emitKey (readline.js:1095:12) But I don't really understand what's going on there... I know that it works if I pass a callback like this: function(x) {return x.toLowerCase()} but the curiosity is killing me...
has title: why `lodash.map(['A'], String.prototype.toLowerCase.call)` does not work?

http://stackoverflow.com/comment/39558972
comment on: http://stackoverflow.com/a/25368633
score: 0
type: AnswerComment
type: Comment
has text: Which would better handle the problem I encountered, where the ajax call is done but populating the UI SELECT with the data is not yet done. I don't want to bind my record to the UI until all of the SELECTs have been populated, which occurs some time after the data have been fetched.

http://stackoverflow.com/comment/39571720
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25375586
has text: Again, please do not tag your question with PHP when the content has nothing to do with PHP.

http://stackoverflow.com/comment/39598813
type: AnswerComment
comment on: http://stackoverflow.com/a/25389392
has text: Thanks for the ideas! I will take a look at it next week (need to focus on something else next week).
score: 0
type: Comment

http://stackoverflow.com/a/25268337
downvote count: 1
answers question: http://stackoverflow.com/q/25268118
has comment: http://stackoverflow.com/comment/39372856
type: Answer
has body: This should get you started.. you need to get the value of the span you are clicking and then append it into your result field. Lots more to get this calculator to work but this should get you pointed in the right direction. Fiddle Update: http://jsfiddle.net/vb394983/3/ JavaScript (jQuery): $(".keys").on("click","span",function(){ var clickedVal = $(this).text(); $(".display.result").append(clickedVal); });
has comment: http://stackoverflow.com/comment/39372998
has comment: http://stackoverflow.com/comment/39372972
score: 0
upvote count: 1

http://stackoverflow.com/q/25321844
tagged with: javascript
answer count: 2
downvote count: 0
favorite count: 0
has title: How to access properties of an object if it was created using a constructor function
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25321892
score: 2
tagged with: oop
has body: This is my first question on stackoverflow and I am complete beginner in javascript. I was reading about object oriented programming in javascript using this article ,http://javascriptissexy.com/oop-in-javascript-what-you-need-to-know>. In the section named "OOP in javascript", it describes two ways of creating and object: var myObj = {name:"Richard", profession:"Developer"}; I know you can access the propertise of this object by myObj.name // "Richard" The Second way the article describes of creating an object is function People (name, profession) {} var richard = new People (“Richard”, “Developer”) How do I access the name property of this object ?? Also I haven't read the rest of the article past this topic. I am stuck until this concept is cleared.
type: Question
has answer: http://stackoverflow.com/a/25321910

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

http://stackoverflow.com/comment/39536903
comment on: http://stackoverflow.com/q/25357584
has text: Do you really mean for it to be spelled `"templete.html"`.
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39552951
score: 2
type: AnswerComment
type: Comment
has text: @mpet - Your question doesn't mention any of that at all. If that's an important part of the issue, then you should update your question with more detail.
comment on: http://stackoverflow.com/a/25366042

http://stackoverflow.com/comment/39486916
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25320833
has text: didnt even know something existed! Ill try it out^^
score: 0

http://stackoverflow.com/comment/40585217
has text: canvas.toBlob(function(blob){...},"image/jpeg")
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25436268
type: AnswerComment

http://stackoverflow.com/q/25378415
type: Question
tagged with: javascript
has title: :hover css box-shadow display error on jQuery animate
upvote count: 1
has comment: http://stackoverflow.com/comment/39576710
has comment: http://stackoverflow.com/comment/39576636
answer count: 1
has body: So I am animating a div using jQuery. Like so: $('#Reporting').animate({ width: 250, fontSize: 21 }, 750) Then I have a box shadow on this with css box-shadow: 0em 0em 0.5em 0.05em $Black; However as soon as the animate kicks in the box-shadow is removed has anyone any idea as to why this happens? this is also removed from the :hover alternate box-shadow as well. Thanks Tim
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25378475
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25378475
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/39576583
score: 1

http://stackoverflow.com/q/25289675
has comment: http://stackoverflow.com/comment/39430058
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39412514
favorite count: 0
has title: Undefined not a function
has comment: http://stackoverflow.com/comment/39412283
linked to: http://stackoverflow.com/q/16063394
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25289789
score: 1
has body: I tried experimenting with private variables and prototypes that didn't use IIFE (which makes objects global so no unique instances). I tried the following and I'm confused by what I see. I can see it perfectly in the inspector that it's defined but it tells me it's actually not undefined. What exactly is going on that makes it undefined despite seeing it defined in the inspector? var Factory = Factory || {}; Factory.Person = function (aname) { var name = 'default'; function Person() { name = aname; } Person.prototype.getName = function() { return name; } return Person; }; var P = new Factory.Person('test'); alert(P.getName()); //Undefined
upvote count: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25289789

http://stackoverflow.com/q/25266276
tagged with: drawing
has comment: http://stackoverflow.com/comment/39377284
type: UnansweredQuestion
tagged with: web-applications
type: Question
has title: Chosing drawing tools
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25270889
has comment: http://stackoverflow.com/comment/39369080
score: 0
has body: I create drawing application with HTML5 and JavaScript.I write code to draw(pencil and rectangle) if(window.addEventListener) { window.addEventListener('load', function () { var canvas, context, canvaso, contexto; var tool; var tool_default = 'pencil'; function init () { canvaso = document.getElementById('imageView'); if (!canvaso) { alert('Error: I cannot find the canvas element!'); return; } if (!canvaso.getContext) { alert('Error: no canvas.getContext!'); return; } contexto = canvaso.getContext('2d'); if (!contexto) { alert('Error: failed to getContext!'); return; } var container = canvaso.parentNode; canvas = document.createElement('canvas'); if (!canvas) { alert('Error: I cannot create a new canvas element!'); return; } canvas.id = 'imageTemp'; canvas.width = canvaso.width; canvas.height = canvaso.height; container.appendChild(canvas); context = canvas.getContext('2d'); var tool_select = document.getElementById('dtool'); if (!tool_select) { alert('Error: failed to get the dtool element!'); return; } tool_select.addEventListener('change', ev_tool_change, false); if (tools[tool_default]) { tool = new tools[tool_default](); tool_select.value = tool_default; } canvas.addEventListener('mousedown', ev_canvas, false); canvas.addEventListener('mousemove', ev_canvas, false); canvas.addEventListener('mouseup', ev_canvas, false); } function ev_canvas (ev) { if (ev.layerX || ev.layerX == 0) { ev._x = ev.layerX; ev._y = ev.layerY; } else if (ev.offsetX || ev.offsetX == 0) { ev._x = ev.offsetX; ev._y = ev.offsetY; } var func = tool[ev.type]; if (func) { func(ev); } } function ev_tool_change (ev) { if (tools[this.value]) { tool = new tools[this.value](); } } function img_update () { contexto.drawImage(canvas, 0, 0); context.clearRect(0, 0, canvas.width, canvas.height); } var tools = {}; tools.pencil = function () { var tool = this; this.started = false; this.mousedown = function (ev) { context.beginPath(); context.moveTo(ev._x, ev._y); tool.started = true; }; this.mousemove =…
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25303892
type: Question
has body: Is it possible for a named view in ui-router to make a transition to some other named view? For example, in the snippet below, is it possible to move from blue@bar state to orange@foo state? .state('foo', { url: '/', views: { '': { templateUrl: 'partials/a.html' }, 'black@foo': { templateUrl: 'partials/b.html', controller: 'SuperController' }, 'green@foo': { templateUrl: 'partials/c.html', controller: 'SuperController' }, 'orange@foo': { templateUrl: 'partials/d.html', controller: 'SuperController' } } }) .state('bar', { url: '/ping/:x/:y', views: { '': { templateUrl: 'partials/e.html', controller: 'DuperController' }, 'blue@bar': { templateUrl: 'partials/f.html', controller: 'DuperController' } } })
answer count: 1
tagged with: javascript
has title: Named view transition using ui-router
has answer: http://stackoverflow.com/a/25304180
downvote count: 0
tagged with: angular-ui
score: 1
favorite count: 0
tagged with: angularjs
upvote count: 1
linked to: http://stackoverflow.com/q/25279522
type: AnsweredQuestion
tagged with: angular-ui-router
accepted answer: http://stackoverflow.com/a/25304180

http://stackoverflow.com/a/25261061
type: Answer
has body: The component can send an action by using the sendAction function (http://emberjs.com/guides/components/sending-actions-from-components-to-your-application/). So the proper way would be in hbs data="bubbleData" and in js of component this.sendAction("data"); example http://emberjs.jsbin.com/luwixanemunu/1/edit If however it is required to pass the function itself, then care must be taken for the context that calls the function. This is the reason that this.get("data")(); does not work. In the example test2 demonstrates the proper way of calling it, var theController = this.get("parentView.controller"); this.get("data2").apply(theController); The example's code hbs js App.ApplicationController = Ember.ArrayController.extend({ testProp:"test", bubbleData: function(){ var self = this; debugger; return { name: 'tools', children: this.get("data").map(function(t){ return{ name: t.name, size: 300 }; }) }; }, actions:{ bubbleData2:function(){alert("bubbleData in actions");} } }); App.BubbleChartComponent = Em.Component.extend({ draw: function(){ // debugger; }.observes('data').on('didInsertElement'), actions:{ test1:function(){ this.sendAction("data"); }, test2:function(){ var theController = this.get("parentView.controller"); this.get("data2").apply(theController); } } });
score: 0
answers question: http://stackoverflow.com/q/25256793

http://stackoverflow.com/a/25285407
type: Answer
has body: The JSON format is a subset of JavaScript literal syntax json_encode outputs JSON (which, if just dumped in JS, will be treated as a literal) parseJSON takes a string of JSON and converts it to a data structure Therefore: Don't use parseJSON as it will force the object you have into a string ("[Object object]") and then try to parse that as JSON. Just: var videoObject = &lt;?php echo $js_VideoURL ?&gt;;
has comment: http://stackoverflow.com/comment/39404180
upvote count: 2
score: 1
downvote count: 1
answers question: http://stackoverflow.com/q/25285305
has comment: http://stackoverflow.com/comment/39404862

http://stackoverflow.com/q/25276157
has body: [The Problem] I have a URL scheme I'm trying to create a regex for. I have one part of the scheme to be optional, but if a certain string (let's say the string is Apple) is matched anywhere in the string, it should fail. [Examples] Strings that should succeed: http://example.com/en/Parent http://example.com/en/Parent/ http://example.com/en/Parent/ArbitraryWord http://example.com/en/Parent/ArbitraryWord/anythingelse Strings that should fail: http://example.com/en/Parent/Apple http://example.com/en/Parent/Apple/anythingelse [What I've Tried] I started out with /\/Parent\/(?!Apple)([a-zA-Z0-9]+)/gi, but that didn't match http://example.com/en/Parent because the regex expects a trailing slash and another string. Then I tried /\/Parent(\/)?(?!Apple)([a-zA-Z0-9]+)?/gi, which does match the /Parent/ URL, but also does not fail when Apple is present. [jsFiddle] http://jsfiddle.net/Luf9zsw4/1/
type: Question
accepted answer: http://stackoverflow.com/a/25276175
tagged with: javascript
score: 0
has title: Regular expression match optional item unless optional item contains a certain string?
answer count: 1
has comment: http://stackoverflow.com/comment/39387381
has answer: http://stackoverflow.com/a/25276175
tagged with: regex
type: AnsweredQuestion

http://stackoverflow.com/q/25230230
type: AnsweredQuestion
has title: AngularJS limitTo on dynamically expanding array
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25230651
accepted answer: http://stackoverflow.com/a/25230651
tagged with: arrays
downvote count: 0
answer count: 1
tagged with: javascript
score: 1
favorite count: 0
tagged with: angularjs
has body: I have the following directive (sales.jade): div(ng-repeat='product in products') div.col-md-4 button.btn.btn-block.sell-button(id='{{product._id}}' role='button' ng-click='sell()'){{product.name}} div(ng-repeat='p in supp track by $index | limitTo: 3') p {{p.name}} JS: app.directive('sales', ['productServices', 'flash', function(productServices, flash) { var controller = function($scope, $timeout) { productServices.getProducts() .success(function(result) { $scope.products = result.data $scope.supp = [] }) .error(showErrorMessage(flash)) $scope.sell = function() { that = this $scope.supp.push(this.product) $timeout(function() { $('#' + that.product._id).blur() }, 40) } } return { restrict: 'E', templateUrl: '/partials/sales', controller: controller } } ]) As you can see, when a button is clicked (that is tied to a product) I add that product to the supp array and I am displaying the content of the supp array through an ngRepeat directive. My problem is, that the limitTo filter is not applied all the time I add an element the supp array. Thus the ngRepeat displays all the items in supp. How can I display only the last 3 elements of the supp array, even if I add some new items to it?

http://stackoverflow.com/a/25282762
has body: JSfiddle Controller: $scope.inputValue = ""; Html: Your input key count : {{inputValue.length}}
answers question: http://stackoverflow.com/q/25282545
type: Answer
has comment: http://stackoverflow.com/comment/39398988
score: 0

http://stackoverflow.com/a/25328157
has comment: http://stackoverflow.com/comment/39507515
answers question: http://stackoverflow.com/q/25327091
has body: Try this code. the base64_encode allows a url to be safely passed using the GET method. Then you must check if that key exists in your destination page and then redirect back if the user says they don't want to leave the site and redirect forward if the user does want to leave the site. <?php // Place this on your page $currentPage = base64_encode(curPageURL()); $outgoingPage = base64_encode("someurl.com"); // creates a link that passes on the page that it came from and the page to go to if the user chooses to do so echo "Leave Page"; ?> <?php // when the button is clicked to cancel leaving the page if(isset($_GET["return"])) { header("Location: ".base64_decode($_GET["return"])); } else { header("Location: someDefaultPage.php"); } // and if the button to leave the page is clicked if(isset($_GET["go"])) { header("Location: ".base64_decode($_GET["go"])); } else { header("Location: someDefaultPage.php"); } ?>
type: Answer
score: 0

http://stackoverflow.com/comment/39325664
has text: I know but why I should write my code double for browsers which allow classList? I mean I also have to write code for non html5 browsers
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25243093
type: Comment

http://stackoverflow.com/a/25422716
accepted answer of: http://stackoverflow.com/q/25330008
score: 0
type: AcceptedAnswer
type: Answer
has body: Thanks, in code veritas, for your input. I'm in the process of optimizing the code in the way you suggested. However, it seems you do not need the .data() method with lines as you allocate the data via .x() and .y() methods for these (if I understand correctly). Anyway, in the end the solution was to change: .x(function(d,i) {return dataset.t[i];}) to .x(function(d,i) {return x(dataset.t[i]);}) which is mentioned in pretty much every tutorial but which I, wisely ^^, chose to ignore because it seemed pointless to me. If anybody can comment on that and enlighten me, I'd be grateful. Cheers!
has comment: http://stackoverflow.com/comment/40009527
answers question: http://stackoverflow.com/q/25330008

http://stackoverflow.com/comment/39496958
comment on: http://stackoverflow.com/a/25325333
type: Comment
has text: It looks like you're wrong: neither Firefox nor Chromium allows me to *access elements, by ID, that aren't part of the DOM*. At least detached ones.
score: 1
type: AnswerComment

http://stackoverflow.com/q/25363155
has title: Get access to array inside object in javascript
type: AnsweredQuestion
type: Question
has body: I am new to angularjs so I dont know how to push any value to array at particular position. For example : $scope.atparticular.push = [ {questionText: 'queston1',questionId: '1',answerlst:[{answerText:'answer1',answerId: 'a1'},{answerText: 'answer2',answerId: 'a2'},{answerText: 'answer3',answerId: 'a3'}]}, {questionText: 'row2queston1',questionId: 'rq1',answerlst:[{answerText:'row2answer1',answerId: 'row2a1'},{answerText: 'row2answer2',answerId: 'row2a2'},{answerText: 'row2answer3',answerId: 'row2a3'}]} ]; If this is my object containing list and if I want to append answerlst with one more position containing empty values such as : $scope.atparticular.push = [ {questionText: 'queston1',questionId: '1',answerlst:[{answerText:'answer1',answerId: 'a1'},{answerText: 'answer2',answerId: 'a2'},{answerText: 'answer3',answerId: 'a3'},{answerText: '',answerId: ''}]}, {questionText: 'row2queston1',questionId: 'rq1',answerlst:[{answerText:'row2answer1',answerId: 'row2a1'},{answerText: 'row2answer2',answerId: 'row2a2'},{answerText: 'row2answer3',answerId: 'row2a3'},{answerText: '',answerId: ''}]} ]; Please give some suggestion. Thanks in advance.
tagged with: arrays
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25363649
accepted answer: http://stackoverflow.com/a/25363649
answer count: 1

http://stackoverflow.com/comment/39309880
comment on: http://stackoverflow.com/a/25234389
score: 0
type: AnswerComment
has text: You can scroll any div. You just need to set the `height` and `overflow: scroll` styles. You may also need to subtract the `postion().top` of the wrapper from the msg position().top to get the correct `scrollTop` value to scroll to.
type: Comment

http://stackoverflow.com/comment/39475099
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25323146
has text: Thanks Jeremy, but I have to pick another answer as correct, Because it helped solve the issue in my own domain. Thanks none the less.
score: 0

http://stackoverflow.com/q/25344732
tagged with: php
answer count: 0
score: 1
upvote count: 1
has body: I'm trying to get a list of external domains called by a webpage when loading the page by ajax. I can load the page html and scan it for urls but this includes all links to external sites and misses out domains called by things like social widgets. I have looked into api's like pagespeed and webpagetest but they don't return this information, only the number of external domains called. Is there a way to load a page and analyse the headers to record the external domains called either by javascript alone or by calling a php function? Something similar to the live http headers extension for firefox but minus the browser :)
type: Question
has title: List external domains used by webpage using ajax/php
tagged with: javascript
downvote count: 0
has comment: http://stackoverflow.com/comment/39514313
tagged with: jquery
has comment: http://stackoverflow.com/comment/39514418
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40130048

http://stackoverflow.com/comment/39453609
has text: I don't know which informations could be important. A dump of my phpinfo() doesn't seem to make sense. I'll elaborate some more and will get back to this post with more infos. Sounds ok?
type: QuestionComment
comment on: http://stackoverflow.com/q/25310363
score: 0
type: Comment

http://stackoverflow.com/q/25369848
tagged with: javascript
has comment: http://stackoverflow.com/comment/39563392
favorite count: 0
has answer: http://stackoverflow.com/a/25369970
has comment: http://stackoverflow.com/comment/39560542
answer count: 4
has answer: http://stackoverflow.com/a/35303351
upvote count: 5
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39560576
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39560475
downvote count: 0
has title: Loading Module in AngularJS Service
has body: I'm learning AngularJS. Currently, I'm trying to load a third-party module in my service. Specifically, I'm trying to load angular-moment. My service is defined like this: myApp.factory('myService', ['angularMoment', function(angularMoment) { return { getLocale: function() { return angularMoment.locale(); } } }]); If I replace return angularMoment.locale() with return 'someLocale'; my code runs. However, as soon as I reference angularMoment, I get errors. I know it has something to do with the fact that I'm not loading the module correctly. However, I do not know what I'm doing wrong. I just see this error when I run my unit tests: Error: [$injector:unpr] http://errors.angularjs.org/1.2.22/$injector/unpr?p0=angularMomentProvider%20%3C-%20angularMoment%20%3C-myService (line 36) (1) What am I doing wrong?
has comment: http://stackoverflow.com/comment/53901472
has answer: http://stackoverflow.com/a/25370046
type: Question
has answer: http://stackoverflow.com/a/25369975
score: 5

http://stackoverflow.com/q/25326316
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39480477
has comment: http://stackoverflow.com/comment/39480481
downvote count: 0
has comment: http://stackoverflow.com/comment/39480464
has comment: http://stackoverflow.com/comment/39480513
answer count: 6
linked to: http://stackoverflow.com/q/16997929
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/25326383
possible better answer: http://stackoverflow.com/a/25326373
has title: HTML hidden input shouldn't be editable
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25326483
has answer: http://stackoverflow.com/a/25326381
has body: I just discovered a bug which I couldn't find any solution of, I would like your advise on that. Issue is there are a few hidden input types, which are there to store ID's of already saved data such as per person id if it is already saved etc. etc. I just tried and change the value of that hidden variable manually, using google chrome and submit the form and surprisingly i did not get the id that should be there but instead i received the Id that I changed. for instance there was an value of 22 I change it 263 I received 263, whereas I should have be receiving 22. I want that 22 to come not that 263. Its hard to explain I know but I have tried my level best to convey my issue please help and advise my on that how should I store some hidden value that are un-editable. Any Idea?
favorite count: 0
has answer: http://stackoverflow.com/a/25326376
has comment: http://stackoverflow.com/comment/39480500
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25326408
accepted answer: http://stackoverflow.com/a/25326408
has answer: http://stackoverflow.com/a/25326373
has comment: http://stackoverflow.com/comment/39480735
has comment: http://stackoverflow.com/comment/39480567
has comment: http://stackoverflow.com/comment/39480602
tagged with: php

http://stackoverflow.com/comment/39507509
comment on: http://stackoverflow.com/q/25340513
has text: new Date().getTime() onmousemove and offset() onmousemove as your starting point.....get new Date().getTime() once scroll position intercepts container or element of known offset()
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39576549
type: Comment
comment on: http://stackoverflow.com/a/25377701
has text: i have done it but not working
score: 0
type: AnswerComment

http://stackoverflow.com/q/25244335
favorite count: 0
has body: The other day, I was trying to figure out how to select all items in select2 v3.5.1 JavaScript multiselect control. I tried a few things, but I was having a difficult time figuring out how to do it. I just wanted to select every option in the box, but apparently select2 does not have a built-in option to select all of the items for you.
has title: How to select all options in select2 JavaScript multiselect
upvote count: 7
has answer: http://stackoverflow.com/a/47339441
has answer: http://stackoverflow.com/a/71568153
answer count: 4
downvote count: 0
type: AnsweredQuestion
score: 7
possible better answer: http://stackoverflow.com/a/40035821
has answer: http://stackoverflow.com/a/40035821
type: Question
has answer: http://stackoverflow.com/a/25244564
accepted answer: http://stackoverflow.com/a/25244564
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25319657
answer count: 4
has comment: http://stackoverflow.com/comment/39620689
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39634687
type: UnansweredQuestion
tagged with: requirejs
has title: Getting Jasmine to Work with Angular JS
has answer: http://stackoverflow.com/a/25440564
score: 3
has comment: http://stackoverflow.com/comment/39754992
upvote count: 3
has comment: http://stackoverflow.com/comment/39713984
has answer: http://stackoverflow.com/a/25353998
has body: I am trying to get Jasmine to work with my Angular JS Project But I always keep getting the following error. I am trying to get it to run a very very simple test. Also I have setup the angular js project using RequireJS. I have given my code below. The Error I get is : My Very Simple TestSpec is as given below : describe('Controller:UserController', function () { var scope,controller; beforeEach(function () { module('app'); inject(function ($controller,$rootScope) { scope = $rootScope.$new(); controller = $controller('UserController', { '$scope': scope }); }); }); it('checks the troller name', function () { expect(scope.name).toBe('Superhero'); }); }); And My Controller code is as given below : define(['app','WebCallManager'], function (app) { app.controller('UserController', function ($scope,$location,webcallService) { $scope.name = 'Superhero'; $scope.loginUser = function(){ console.log("Login User Called..."); $location.path('/login').replace(); console.log("View Navigated..."); }; $scope.slidePanel = function(){ f7.openPanel('left'); }; $scope.doWebCall = function(){ console.log("Doing the Web Call..."); webcallService.sendGetRequest(); }; }); }); And the TestRunner.html is : Jasmine Test Runner v2.0.1 and my main.js file used to load the requirejs dependencies is : (function() { require.config({ baseUrl: "../www/scripts", // alias libraries paths paths: { 'angular': '../libs/angular', 'angular-route': '../libs/angular-route', 'angular-animate':'../libs/angular-animate', 'angular-mocks':'../libs/angular-mocks', 'angularAMD': '../libs/angularAMD.min', 'Framework7':'../libs/framework7', 'UserController':'controller/UserCtrl', 'WebCallManager':'services/WebCallManager' }, // Add angular modules that does not support AMD out of the box, put it in a shim shim: { 'angularAMD': ['angular'], 'angular-route': ['angular'], 'angular-animate':['angular'], 'angular-mocks':['angular'], 'Framework7':{exports: 'Framework7'} }, //kick start application deps: ['app'] }); require(…
has answer: http://stackoverflow.com/a/25354191
type: Question
tagged with: angularjs-routing
downvote count: 0
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/19240302
linked to: http://stackoverflow.com/q/16423156
has answer: http://stackoverflow.com/a/25454191
tagged with: jasmine

http://stackoverflow.com/comment/39475160
comment on: http://stackoverflow.com/q/25311747
type: Comment
type: QuestionComment
score: 0
has text: @Archer I knew that he asekd for a div element, because he mentiond the word 'facebook'. I just wanted to mention the abuse of word 'popup'.

django
tags question: http://stackoverflow.com/q/25318743
tags question: http://stackoverflow.com/q/25357996
tags question: http://stackoverflow.com/q/25232448
type: Tag
tags question: http://stackoverflow.com/q/25377762
tags question: http://stackoverflow.com/q/25306239
tags question: http://stackoverflow.com/q/25329508
tags question: http://stackoverflow.com/q/25273159
tag name: django
tags question: http://stackoverflow.com/q/25304688
tags question: http://stackoverflow.com/q/25231375
tags question: http://stackoverflow.com/q/25349725
tags question: http://stackoverflow.com/q/25318198
tags question: http://stackoverflow.com/q/25347441
tags question: http://stackoverflow.com/q/25315798
tags question: http://stackoverflow.com/q/25316577
tags question: http://stackoverflow.com/q/25304641
tags question: http://stackoverflow.com/q/25320864

http://stackoverflow.com/comment/39474715
comment on: http://stackoverflow.com/q/25323254
score: 0
type: Comment
type: QuestionComment
has text: Read up on HEREDOC strings in PHP.

http://stackoverflow.com/q/25278662
upvote count: 1
has comment: http://stackoverflow.com/comment/39395892
score: 1
type: Question
tagged with: yandex
tagged with: javascript
has title: Yandex.Browser QuickLinks
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: seo
downvote count: 0
has answer: http://stackoverflow.com/a/25278921
favorite count: 0
has comment: http://stackoverflow.com/comment/39396125
has body: We have already have a web site. Let's say www.mysite.com. When you open this site at yandex.browser at right hand side there are some quicklinks. (screenshot below) Now we are developing a new website and we are in testing phase. We informed some of our customers and say come to new site and test it. Its web address is beta.mysite.com. Our problem is that when they come to new site (beta.mysite.com) by yandex.browser at right hand side quicklinks appears automatically but their targets are wrong! Their targets show old site.(www.mysite.com) Can we change their targets by modifying our beta.mysite.com headers or html? How? OR Can we disable quicklinks at yandex.browser by modifying our beta.mysite.com html code? I don't want to affect www.mysite.com. My purpose is to fix for beta.mysite.com
has comment: http://stackoverflow.com/comment/39395594
type: UnansweredQuestion

http://stackoverflow.com/comment/39500239
score: 0
type: Comment
type: AnswerComment
has text: Thank you! Can you explain to me why match returns two values in the array and why the value I am looking for is not the zeroth one? I didn't know match returns an array, when does it? Why does it?
comment on: http://stackoverflow.com/a/25336095

http://stackoverflow.com/comment/39330582
type: QuestionComment
comment on: http://stackoverflow.com/q/25245523
has text: where is the code , fiddle ??
score: 0
type: Comment

http://stackoverflow.com/comment/39442519
score: 0
has text: @Quentin I'm showing you a var_dump, which suggests that the variable is indeed set. That's the server side part.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25305843

http://stackoverflow.com/a/25356163
type: Answer
answers question: http://stackoverflow.com/q/25355829
has body: You could add a data attribute to your table with post count, and perhaps a class to only listen on certain pages. Something like: # view body class=controller_name table data-posts-count=@posts.length . # js $("body.posts").load(function() { count = $(this).data("posts-count") if count &gt; 2 alert("exist"); else alert("no posts"); });
score: 0

http://stackoverflow.com/comment/39460004
type: Comment
has text: You may want to try removing the "tbody tr" and see what happens, are they really necessary?
comment on: http://stackoverflow.com/a/25315285
type: AnswerComment
score: 0

dynamics-crm-2013
tags question: http://stackoverflow.com/q/25236969
tag name: dynamics-crm-2013
tags question: http://stackoverflow.com/q/25289243
type: Tag
tags question: http://stackoverflow.com/q/25361548

http://stackoverflow.com/a/25370245
score: 1
accepted answer of: http://stackoverflow.com/q/25370128
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25370128
has comment: http://stackoverflow.com/comment/39561345
has comment: http://stackoverflow.com/comment/39561601
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39561724
has body: value = Math.floor(value * 100) / 100; That should do the trick, works also with Math.round and Math.ceil. (I don't guaranty that works for all 100% numbers, sometimes decimal values are strangely stored in computer memory, I don't know how javascript does in these cases.)

http://stackoverflow.com/comment/39347271
has text: The return is a normal string. If I change the script so that instead of `bool = this.responseText` it reads `document.getElementFromId('some_element').innerHTML= this.responseText`, the element displays the correct text. I just can't get it to store the return in the bool variable ?!
comment on: http://stackoverflow.com/a/25254194
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25356199
has comment: http://stackoverflow.com/comment/39538615
has answer: http://stackoverflow.com/a/25364739
has body: -- select country -- Malaysia Philippines -- select city/town -- Kuala Lumpur Manila back</> It is not working IE11, the city option is missing. When I select a county the city automatically loads. When I click the back button the country option shows up fine, but the city option is missing only in IE, other browsers are working fine.
type: Question
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/39534550
tagged with: javascript
has comment: http://stackoverflow.com/comment/39571461
has comment: http://stackoverflow.com/comment/39538963
score: 2
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39534504
favorite count: 0
has comment: http://stackoverflow.com/comment/39534500
upvote count: 2
type: UnansweredQuestion
has title: window.history.back();return false;" not working in IE11
has comment: http://stackoverflow.com/comment/39538577

http://stackoverflow.com/a/25289704
has body: Add preloadImages option and set it to either all' orvisible`. All - will load all images and then start slider Visible : load visible image and then start slider. $(document).ready(function () { $('.bxslider').bxSlider({ mode: 'fade', adaptiveHeight: 'true', speed: 3000, easing: 'ease-in-out', auto: true, autoHover: true, preloadImages : 'all', pager: false }); }); Solution 2 : Hide parent div &lt;div id="slider"&gt; and show it after slider is fully loaded.. $(document).ready(function () { $("#slider").hide(); $('.bxslider').bxSlider({ mode: 'fade', adaptiveHeight: 'true', speed: 3000, easing: 'ease-in-out', auto: true, autoHover: true, preloadImages : 'all', pager: false, onSliderLoad : function(){ $("#slider").fadeIn(); } }); });
type: Answer
answers question: http://stackoverflow.com/q/25289409
has comment: http://stackoverflow.com/comment/39412385
score: 0
has comment: http://stackoverflow.com/comment/39413804

http://stackoverflow.com/a/25241797
type: Answer
answers question: http://stackoverflow.com/q/25241734
score: 2
downvote count: 0
has body: From Joe Enos answer you don't need to get server path Some browsers have a security feature that prevents javascript from knowing your file's local full path. It makes sense - as a client, you don't want the server to know your local machine's filesystem. It would be nice if all browsers did this. And to get the name of file, try to use innerText property of span instead of value as value works on form element fields try this, function Copy(copyfrom, copyto) { document.getElementById(copyto).innerText = copyfrom.value; } Working demo
upvote count: 2

http://stackoverflow.com/a/25243832
answers question: http://stackoverflow.com/q/25243569
upvote count: 1
type: Answer
downvote count: 0
has body: 1. Get the Json object. 2. Parse it and fill the the table row by row. $(document).ready(function () { $.getJSON(url, function (json) { var tr; for (var i = 0; i &lt; json.length; i++) { tr = $('&lt;tr/&gt;'); tr.append("&lt;td&gt;" + json[i].User_Name + "&lt;/td&gt;"); tr.append("&lt;td&gt;" + json[i].score + "&lt;/td&gt;"); tr.append("&lt;td&gt;" + json[i].team + "&lt;/td&gt;"); $('table').append(tr); } }); }); Go to: http://jsfiddle.net/8kkg3/
score: 1

linechart
tag name: linechart
tags question: http://stackoverflow.com/q/25249431
tags question: http://stackoverflow.com/q/25322647
type: Tag

http://stackoverflow.com/comment/39534446
type: QuestionComment
comment on: http://stackoverflow.com/q/25356195
score: 0
has text: I think either this line giving problem `data: 'media-select=' dt,` or `url` is not defined.\
type: Comment

http://stackoverflow.com/comment/39550166
has text: Could you make a fiddle
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25364727
type: QuestionComment

http://stackoverflow.com/comment/39540970
has text: xmlhttp.status is 0 and I checked those with this same problem and most occur when status is 0 is cross-site request. But all my files are on the same server, domian, folder.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25359314

http://stackoverflow.com/comment/39528059
has text: Provide jsfiddle for testing purposes. Problem is not clear.
comment on: http://stackoverflow.com/q/25352668
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39303836
has text: The response is not in array format, it's object, so you don't get `length` property of it. Your looping use `length` that make it loop nothing because `arr.length` is undefined. Are you sure you get the right data?
score: 0
comment on: http://stackoverflow.com/q/25231521
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25304109
accepted answer: http://stackoverflow.com/a/25304376
has body: How can I get the most repeated value from an Array in javascript? This is my array var data = [ { values: "Number of pips" }, { values: 4 }, { values: 4 }, { values: 4 }, { values: 5 }, { values: 2 }, { values: 6 }, { values: 6 }, { values: 5 } ]; The result should be 4, how can I get this? I have tried this, taken from Get the element with the highest occurrence in an array function mode(array) { if(array.length == 0) return null; var modeMap = {}; var maxEl = array[0], maxCount = 1; for(var i = 0; i &lt; array.length; i++) { var el = array[i]; if(modeMap[el] == null) modeMap[el] = 1; else modeMap[el]++; if(modeMap[el] &gt; maxCount) { maxEl = el; maxCount = modeMap[el]; } } return maxEl; } but this is return 6, not 4.
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/2440295
upvote count: 2
score: 1
has comment: http://stackoverflow.com/comment/39439215
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25304376
tagged with: javascript
has comment: http://stackoverflow.com/comment/39439208
has title: How can i get most repeated value from Array in javascript
possible better answer: http://stackoverflow.com/a/25304387
has answer: http://stackoverflow.com/a/25304387
answer count: 3
has comment: http://stackoverflow.com/comment/39439352
tagged with: arrays
tagged with: jquery
has answer: http://stackoverflow.com/a/25304182
favorite count: 0

http://stackoverflow.com/comment/39610203
type: QuestionComment
has text: @HMR: I have no idea what your point is. The "forgetting var" part is not silly at all to anyone who comes to JavaScript from any other OOP language, where it would result in a compile-time error. Also, I'm fairly certain I understand the role of prototypes: to define shared members (like methods - what would be called "global properties" or "virtual methods" in other languages), to define inheritance, and to make instances extendable. My solution may not be the best, but it allows all of those things, so what's the problem?
score: 0
comment on: http://stackoverflow.com/q/25373218
type: Comment

http://stackoverflow.com/comment/140152739
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/60424501
has text: I don't agree that this should be the best answer. We should have it as one input field per Design, it's ugly to have 3 inputs, also it's harder to handle validation.

http://stackoverflow.com/comment/39371329
has text: Use .is(':empty') to find out if element is empty.
comment on: http://stackoverflow.com/q/25267468
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39450692
comment on: http://stackoverflow.com/q/25310242
type: Comment
has text: I have not really a clue goat, but it seems to work :| that's point. I'm wondering if I'm missing some essential stuff that I'm not taking into account atm.
score: 0
type: QuestionComment

http://stackoverflow.com/q/25284396
answer count: 1
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25284673
accepted answer: http://stackoverflow.com/a/25284673
type: AnsweredQuestion
has body: I would like to be able to access attributes of an object that was created via a $resource factory service (REST API). services.js: myApp.factory('userService', ['$resource', 'backendUrl', function($resource, backendUrl) { return $resource(backendUrl + '/api/users/:region/:name', {region: '@region', name: '@name'} ); }]); controllers.js: $scope.userInfo = userService.get({region: $routeParams.region, name: $routeParams.name}); In controllers.js, userInfo contains several attributes when displayed via console.log($scope.userInfo), however I am unable to access those attributes using dot or bracket notation. console.log($scope.userInfo) example output: Resource {$promise: Object, $resolved: false, $get: function, $save: function, $query: function…} $promise: Object $resolved: true id: 185 last_update: "2014-08-13T08:56:19.546" name: "test_user" region: "na" Despite getting the above output, I am unable to access, for example, $scope.userInfo.name; it prints undefined when sent to console. I need some of the data in userInfo to craft further requests to the same API. Am I missing something special about this being a Resource type of object?
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
has title: Accessing attributes of $scope elements created by $resource factory service in AngularJS
score: -1

http://stackoverflow.com/q/25282457
has answer: http://stackoverflow.com/a/25282579
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39398486
answer count: 6
has comment: http://stackoverflow.com/comment/39398832
has body: I've got a little autocomplete dropdown which I want to hide when someone clicks outside the textbox. I've been using this so far $("#input-group_ids").on("blur", function () { $(".input-dropdown").hide(); }); However my autocomplete dropdown has an overflow and a scroll bar if there are more than 10 options. When using the above code, clicking on the scroll bar closes the dropdown. I need the dropdown to close only if the click is outside the textbox AND the dropdown itself. How do I do that?
has answer: http://stackoverflow.com/a/25282559
has comment: http://stackoverflow.com/comment/39398500
has answer: http://stackoverflow.com/a/25282606
has answer: http://stackoverflow.com/a/25282797
has comment: http://stackoverflow.com/comment/39399363
downvote count: 0
has answer: http://stackoverflow.com/a/25282675
tagged with: jquery
favorite count: 0
has title: Detecting a click outside either of two elements?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39398550
tagged with: css
accepted answer: http://stackoverflow.com/a/25282606
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/25282533
upvote count: 2
possible better answer: http://stackoverflow.com/a/25282579

http://stackoverflow.com/comment/39578455
type: Comment
comment on: http://stackoverflow.com/q/25379244
score: 0
type: QuestionComment
has text: Also you have to make care about restoring previous selection in the case when user doesn't confirm change

http://stackoverflow.com/q/25268514
has answer: http://stackoverflow.com/a/25268906
has answer: http://stackoverflow.com/a/25268710
has title: Get table TD values from AngularJS $element
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25268827
has answer: http://stackoverflow.com/a/25268724
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/25268668
type: Question
tagged with: angularjs-directive
possible better answer: http://stackoverflow.com/a/25268724
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25268906
has body: I have a table with a directive on it. When I sort the table then my directive is triggered which gives me a property called $elem. This property holds the table DOM elment. Is there a way to iterate through this object and read all the innerHTML of each row? For example in this example: http://plnkr.co/edit/eodM0kMxZukG8y9DIh00?p=preview How can I get all the TD values or each row and store that in a JS array using AngularJS only? So the result is something like: var arr = {['1', 'User 1', 'link 1'], ['2', 'User 2', 'link 2']};
downvote count: 0
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39373197
answer count: 5

http://stackoverflow.com/q/25304399
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: contenteditable
downvote count: 0
has comment: http://stackoverflow.com/comment/39439750
accepted answer: http://stackoverflow.com/a/25305011
type: Question
score: 1
has answer: http://stackoverflow.com/a/25305011
has body: I have an iframe object, and there is a contenteditable body inside. I would like to paste some text, or html element at the caret position. I tried this code, but I've got an error Cannot read property 'createRange' of undefined $('#edit_frame').selection.createRange().pasteHTML($('text'));
linked to: http://stackoverflow.com/q/5643635
upvote count: 1
has title: Insert text at the caret position, inside a contenteditable body of a frame
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39467089
score: 1
has text: Would `this.src`, `obj.src` and `$(obj).attr('src')` work too?
type: AnswerComment
comment on: http://stackoverflow.com/a/25319021
type: Comment

http://stackoverflow.com/comment/39538752
score: 0
has text: @SilviuBurcea Then why not ask about it?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25358510

http://stackoverflow.com/q/25289036
has comment: http://stackoverflow.com/comment/39412342
upvote count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39413830
tagged with: angularjs
has body: Im having trouble getting the Haversine formula for coordinate distance to work inside an angular forEach method. Does anybody know anything about this or why my code won't work. Here is my code: var app = angular.module('app', []); app.controller('firstCtrl', function($scope) { $scope.ASiteLocs = [{ "name": "IL5077 BRUSSELS", "styleUrl": "#waypoint", "Point": { "coordinates": "-90.58543899999999,38.955472,0" } }, { "name": "IL5076 KAMPSVILLE", "styleUrl": "#waypoint", "Point": { "coordinates": "-90.661923,39.29403,0" } }, { "name": "IL5146 CARROLLTON", "styleUrl": "#waypoint", "Point": { "coordinates": "-90.39965700000001,39.309142,0" } }]; //there are more locations, but there are too many put on here. $scope.SSiteLocs = [Same as above, different locations.]; $scope.SiteLocs = $scope.SSiteLocs.concat($scope.ASiteLocs); repoSortOrder = "site.name"; navigator.geolocation.getCurrentPosition(GetLocation); function GetLocation(location) { $scope.myLat = location.coords.latitude; $scope.myLon = location.coords.longitude; } angular.forEach($scope.SSiteLocs, function(object) { object.carrier = 'Sprint'; }); angular.forEach($scope.ASiteLocs, function(object) { object.carrier = 'AT&T'; }); angular.forEach($scope.SiteLocs, function(location) { var clength = location.Point.coordinates.length; if (location.Point.coordinates.substring(clength - 2, clength) === ",0") { location.Point.coordinates = location.Point.coordinates.substring(0, clength - 2).split(","); Lat = location.Point.coordinates[0]; Lon = location.Point.coordinates[1]; $scope.locLat = Lat; $scope.locLon = Lon; Com = ","; location.Point.coordinates = Lon.concat(Com, Lat); } }); function getCoordDistance() { Number.prototype.toRad = function() { return this * Math.PI / 180; } var R = 3959; // Radius in miles //has a problem with the .toRad() method below. var x1 = $scope.myLat - $scope.Lat; var dLat = x1.toRad(); var x2 = $scope.myLon - $scope.Lon; var dLon = x2.toRad(); var a = Math.sin(dLat / 2) * Math.sin(dLat / …
has comment: http://stackoverflow.com/comment/39450110
type: UnansweredQuestion
tagged with: haversine
tagged with: foreach
answer count: 0
score: 1
has title: Haversine Formula in Angular forEach()
tagged with: coordinates
has comment: http://stackoverflow.com/comment/39419579
type: Question
has comment: http://stackoverflow.com/comment/39449703
tagged with: javascript
has comment: http://stackoverflow.com/comment/39447852

http://stackoverflow.com/a/25358670
answers question: http://stackoverflow.com/q/25358544
score: 0
type: Answer
has body: There are several approaches, but "when clicking a button" involves javascript to bind a function to the button to use the data when clicked. If you have the $_SESSION data available when loading the page, you just can store that data in a javascript variable to be used later... something like this echo "var data = " . json_encode($_SESSION["data"]); Other approach is dynamically get that data, if you don't have it available at the start. So you can make an AJAX request, get the data and then use it. Since you are not saying if you are using vanilla javascript, jQuery or any other library I just can help you with the way of do it, which should be enough anyways.

http://stackoverflow.com/comment/39579542
has text: I did that already @ABFORCE. Yes I get the value of the promptbox but the problem is the function or script to reject the entry (UPDATE) was not working anymore..
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25380011
score: 0

http://stackoverflow.com/a/25320451
has body: Almost there. In your css, you are only defining the :active pseudo-class. Try out: .tile-container:active, .tile-container.active {} .tile-container:active &gt; .tile, .tile-container.active &gt; .tile {} Check out https://developer.mozilla.org/en-US/docs/Web/CSS/pseudo-classes for more info on pseudo-classes.
has comment: http://stackoverflow.com/comment/39469926
has comment: http://stackoverflow.com/comment/39469785
has comment: http://stackoverflow.com/comment/39469648
answers question: http://stackoverflow.com/q/25320380
score: 0
type: Answer

http://stackoverflow.com/comment/39470667
type: Comment
type: QuestionComment
has text: @JonathanLonowski Please check this [jsFiddle](http://jsbin.com/ziwomafuzide/1/edit?html,js,output)
comment on: http://stackoverflow.com/q/25320856
score: 0

http://stackoverflow.com/q/25373993
tagged with: node.js
has body: When I type npm outdated it displays something similar to Package Current Wanted Latest Location columnify 1.1.0 1.1.0 1.2.1 /usr/local/lib &gt; npm &gt; columnify cmd-shim 1.1.2 1.1.2 2.0.0 /usr/local/lib &gt; npm &gt; cmd-shim ... I do not care much about cases when "Current" is the same as "Wanted". Is there a way to filter this?
type: AnsweredQuestion
tagged with: npm
type: Question
has answer: http://stackoverflow.com/a/25374510
upvote count: 5
has title: How to show "npm outdated" current != wanted lines only?
tagged with: bash
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25374510
tagged with: console
favorite count: 0
score: 5

http://stackoverflow.com/comment/39599483
comment on: http://stackoverflow.com/a/25390395
type: AnswerComment
has text: I'm a little puzzled. Is the quote meant to indicate that this code is a clever trick that should be avoided?
score: 0
type: Comment

http://stackoverflow.com/comment/39543216
comment on: http://stackoverflow.com/q/25360867
score: 0
type: QuestionComment
type: Comment
has text: @Bergi that is just an example and I'm asking is there anything such !page.match

http://stackoverflow.com/q/25265934
type: Question
has title: How to get apostrophes correct in function call?
has body: I'm trying to get the " characters correct but I'm struggeling currently. I have the bellow code. var text ="";//This variable will be initialized later. table .append( $('&lt;tr&gt;').append( $('&lt;td&gt;').html("Test:") ) .append( $('&lt;td&gt;').append( $('&lt;a&gt;') .attr("title", "Press to change the value").attr("href", "#") .attr( "onclick", "AlertBox(\"Please use this dialog to update comment information.\",null,\"" + data.Id + "\",null);" ) .text(data.Test) ) ) ); but instead of "AlertBox(\"Please use this dialog to update comment information.\",null,\"" + data.Id + "\",null);") I want the following "AlertBox(\"Please use this dialog to update comment information.'," + text + "," + updateComment + "," + data.Id + "," + [data.Username,data.timestamp] That is I want to call a function that takes the following parameters. function AlertBox(question, text, successFunction, params,additionalCommentInfoParams){} Problem is that I can't seem to get the commas correct. Can you perhaps give me a hint on how to print out the " characters in order for it to work, I have not done this in Jquery before. Also is there perhaps a nice tool that can generate this for me for future use? Thanks in advance.
has comment: http://stackoverflow.com/comment/39368343
tagged with: javascript
has comment: http://stackoverflow.com/comment/39368361
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25266106
has comment: http://stackoverflow.com/comment/39368303

http://stackoverflow.com/q/25252969
has title: JavaScript variable.id as button click
has comment: http://stackoverflow.com/comment/39345249
score: 0
has answer: http://stackoverflow.com/a/25253081
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39345091
type: Question
tagged with: web
has body: I have a div definition by variable: var div_btnlft = document.createElement('div'); div_btnlft.className = "shiftbutton shiftbutton-left"; div_btnlft.id=this.id+"_shiftbutton-left"; //this.id carries view id I want to use this unique ID definition as button selector in code $('#'+this.id+"_shiftbutton-left").click(function() { console.log("Left click"); } Doesn't work. Any clues will be appreciated Thanks. UPDATE With users posting about dynamic nodes not working for buttons I beg to differ var div_btnrgt = document.createElement('div'); div_btnrgt.id = "shiftbutton-right"; $("div#shiftbutton-right").click(function(){ } The latter works fine .I was looking for the same ID name with a dynamic name .
has answer: http://stackoverflow.com/a/25253095
has comment: http://stackoverflow.com/comment/39346339
tagged with: frontend
answer count: 2
has comment: http://stackoverflow.com/comment/39346116
has comment: http://stackoverflow.com/comment/39345036

http://stackoverflow.com/comment/39522342
type: Comment
type: QuestionComment
has text: I use firefox 31.0 It is the latest version.
comment on: http://stackoverflow.com/q/25348900
score: 0

apache
tag name: apache
tags question: http://stackoverflow.com/q/25331042
tags question: http://stackoverflow.com/q/25377381
tags question: http://stackoverflow.com/q/25253463
type: Tag

http://stackoverflow.com/comment/39487388
score: 0
type: Comment
type: QuestionComment
has text: Can you show a bit more of the code around this snippet?
comment on: http://stackoverflow.com/q/25329664

http://stackoverflow.com/q/25324180
tagged with: javascript
tagged with: google-maps-api-3
score: 0
answer count: 1
has title: How to get google handle_geolocation_query map to display directions from users location
tagged with: jquery
has body: var endlocation = { 'center': '52.5606064,2.0312582999999904', 'zoom': 10 }; var start = navigator.geolocation.getCurrentPosition(handle_geolocation_query); var themap; var destination = "Wednesbury, WS10 7TB"; $(document).ready(function () { $('#map').gmap({ 'center': endlocation.center, 'zoom': endlocation.zoom, 'disableDefaultUI': true, 'callback': function () { themap = this; $('#submit').click(function () { themap.displayDirections({ 'origin': start, 'destination': destination, 'travelMode': google.maps.DirectionsTravelMode.DRIVING, 'unitSystem': google.maps.UnitSystem.IMPERIAL }, { 'panel': document.getElementById('directions') }, function (response, status) { (status === 'OK') ? $('#results').show() : $('#results').hide(); }); return false; }); } }); navigator.geolocation.getCurrentPosition(handle_geolocation_query); }); function handle_geolocation_query(position) { start = new google.maps.LatLng(lat, lon); themap.get('map').panTo(start); } I cant seem to figure out what I should pass to the handle_geolocation_query to get the map to give directions from the users location to a fixed point. Thanks in advance for any help and sorry I'm a noob to maps. Heres the html: &lt;div id="map" style="height:500px;"&gt;&lt;div&gt;
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25327644
type: Question
tagged with: google-maps
has comment: http://stackoverflow.com/comment/39476952

http://stackoverflow.com/comment/39438713
type: Comment
comment on: http://stackoverflow.com/a/25302984
has text: Just wanted to type that in :)
score: 0
type: AnswerComment

http://stackoverflow.com/q/25377363
has title: Submitting form data with javascript (No page reload)
answer count: 4
has body: I've got a wall/social system (much like facebook) where there's statuses, but I want to be able to like, dislike and comment on a status without the page reloading, with the form below how could I complete this? if(empty($_GET['action'])){ postupdate(); if(isset($_POST['sComment'])){ $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); $comment = mysqli_real_escape_string($dbc, trim($_POST['comment'])); $sid = mysqli_real_escape_string($dbc, trim($_POST['sID'])); $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); $query = "INSERT INTO comments (`user`, `post`, `time`, `content`) VALUES ('".$_SESSION['user_id']."', '$sid', NOW(), '$comment')"; $data = mysqli_query($dbc, $query); } $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); $query = "SELECT posts.*, user.* FROM posts JOIN user ON user.user_id = posts.user_id JOIN friends ON friends.user = ".$userinfo['id']." AND friends.with = posts.user_id ORDER BY posts.post_id DESC"; $data = mysqli_query($dbc, $query); while($row = mysqli_fetch_array($data)){ echo' Posted by '. $row['firstname'] .' '. $row['lastname'] .' On '. date('M j Y g:i A', strtotime($row['postdate'])) .' '; $parsed = $parser->parse($row['post']); echo ' '.$parsed.' '; } echo ' '; } the form can be changed to fit the code. I'm assuming it's JavaScript that I will need to use.
score: 2
has answer: http://stackoverflow.com/a/25377426
has comment: http://stackoverflow.com/comment/39574818
downvote count: 0
tagged with: jquery
favorite count: 0
type: Question
tagged with: php
has answer: http://stackoverflow.com/a/25377562
has answer: http://stackoverflow.com/a/25377466
has comment: http://stackoverflow.com/comment/39574742
upvote count: 2
linked to: http://stackoverflow.com/q/133925
linked to: http://stackoverflow.com/q/2866063
has comment: http://stackoverflow.com/comment/39574873
has answer: http://stackoverflow.com/a/25377450
has comment: http://stackoverflow.com/comment/39574782
has comment: http://stackoverflow.com/comment/39574750
tagged with: javascript
type: UnansweredQuestion
tagged with: forms

http://stackoverflow.com/comment/39639942
has text: Unfortunately the file is required to be overwritten. I rebuild the process so that there can occur the problem of concurrency, it's been some work, but I don't miss data etc.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25378248

http://stackoverflow.com/comment/39479207
type: AnswerComment
has text: I saw this, but can't (don't know how) use on practice.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25320661

http://stackoverflow.com/q/25311714
tagged with: jquery
has answer: http://stackoverflow.com/a/25313536
accepted answer: http://stackoverflow.com/a/25313536
favorite count: 0
has body: In my code so far, I have appended the tick markers and labels to the jQuery UI slider. When I increase/decrease the size of the browser window, these ticks go out of sync with the slider. It is happening because of the following piece of code: $('&lt;span class="ui-slider-tick-mark"&gt; &lt;br/&gt;'+ date[i] +'&lt;/span&gt;') // line # 44 in JS .css('left', (spacing * i - 3.5) + '%') .appendTo($slider); I tried to play around with the static value but it seems that as long as this value is static, its not going to be responsive. I believe that if the first and last tick stays at the start and end of the slider respectively, it will be synchronized. How do I achieve this? jsFiddle
tagged with: css
type: AnsweredQuestion
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39455942
tagged with: jquery-ui
tagged with: javascript
has title: How do I synchronise the slider with the ticks so as to make it responsive?
upvote count: 1
answer count: 1
downvote count: 0

http://stackoverflow.com/a/25235394
downvote count: 0
has comment: http://stackoverflow.com/comment/39311754
has comment: http://stackoverflow.com/comment/39311731
has comment: http://stackoverflow.com/comment/39311706
type: Answer
has body: Don't place the hash in id (#): document.getElementById('iframetest') As per your comment, you can do like this: function select() { document.getElementById('iframetest').style.display = 'block' ? 'none' : 'block'; }
score: 9
has comment: http://stackoverflow.com/comment/39311720
has comment: http://stackoverflow.com/comment/39311809
upvote count: 9
answers question: http://stackoverflow.com/q/25235389

http://stackoverflow.com/comment/39358456
type: QuestionComment
comment on: http://stackoverflow.com/q/25260582
has text: Yup.. Actually I need to create a nested tree list. the scenario is very complex. I am able to render 300 list items. but I need to render at least 100000 list item.
score: 0
type: Comment

http://stackoverflow.com/a/25256034
score: 2
has body: Just to make the code clearer to read. the first syntax isn't usually used with static text, but with variable, so that you never miss the space. var1 + " " + var2 This way you make sure you never miss the space in the end of var1 each time you give it a value
downvote count: 0
answers question: http://stackoverflow.com/q/25255993
upvote count: 2
type: Answer

http://stackoverflow.com/q/25301810
has answer: http://stackoverflow.com/a/25301963
accepted answer: http://stackoverflow.com/a/25302026
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39435154
upvote count: 2
tagged with: requirejs
type: Question
has title: RequireJS - Own module with two ways loading
has comment: http://stackoverflow.com/comment/39435395
tagged with: amd
has body: I'm trying to create a module that can be loaded asynchronously (AMD) and via HTML script tag. I added this construction to my module (I took it from jQuery source code): if ( typeof define === "function" &amp;&amp; define.amd ) { define( "mymodule", ['googlemaps'], function(google) { return myModule; }); } myModule = function() { // here code uses "google" } My module depends on Google Maps API so if I load my module via HTML script tag it works. But if my module was loaded asynchronously variable "google" only available in "define" block. Are there any ways to pass this variable to global scope (for my module file)?
has answer: http://stackoverflow.com/a/25302026
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/25301963

http://stackoverflow.com/q/25367845
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39556423
answer count: 0
has comment: http://stackoverflow.com/comment/39577019
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
type: Question
has title: Angularjs page not loadingon IE11 with routing and JSON
has body: I have an issue with Angular and internet Explorer (it's working on chrome and Safari) I am making a blog with different article from json data, and when you click on the article, a new page is loading with the details of the article from a single json data. I have followed the Angular tuotial https://docs.angularjs.org/tutorial/step_07 Code of the blog page: &lt;li ng-repeat="article in articles.articles"&gt; {{article.titre}} &lt;a href="blog/{{article.id}}"&gt; go &lt;/a&gt; &lt;/li&gt; Code of &lt;div ng-bind-html="articleBlog"&gt;&lt;/div&gt; And the javascript (controller): monitorControllers.controller('DetailCtrl', ['$scope', '$routeParams', '$http', '$sce', function($scope, $routeParams, $http, $sce) { $http.get('data/'+$routeParams.articleId+'.json').success(function(data){ console.log(data); $scope.articleBlog= data.texte; }) }]); And the routing .when('/blog/:articleId', { templateUrl: 'views/article.html', controller: 'DetailCtrl'
tagged with: http://stackoverflow.com/tag/html
tagged with: url-routing
upvote count: 1
has comment: http://stackoverflow.com/comment/39560644
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/39334145
has text: Another solution: Cache the rows as per my example. Create a hidden div below the search box, when the user types hide the table with the 1000 rows, show the div, scour the cache as per my example, add the html or each row that matches, place that in the hidden div. This completely removes any dom iteration, it speeds the loop and removes the need to turn on and off rows. On key press if the entry is empty show the table again and clear the divs innerHTML ready for the next search.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25243379
score: 1

restful-architecture
type: Tag
tags question: http://stackoverflow.com/q/25329001
tags question: http://stackoverflow.com/q/25334354
tag name: restful-architecture

http://stackoverflow.com/comment/39407331
comment on: http://stackoverflow.com/q/25286299
type: Comment
type: QuestionComment
has text: I disagree, I actually tried with res.status also... same thing
score: 0

http://stackoverflow.com/q/25344228
type: AnsweredQuestion
score: -2
tagged with: http://stackoverflow.com/tag/json
tagged with: wikipedia
downvote count: 3
type: Question
accepted answer: http://stackoverflow.com/a/25344271
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: wikipedia-api
has title: Getting Wikipedia Page Titles in Json
has body: So I'm trying to get all the title links from a wikipedia page. I've successfully loaded the page in but I'm having trouble going through the JSON to get the titles. Here's the code I'm using. Can someone help? $.ajax({ url: "http://en.wikipedia.org/w/api.php?action=query&amp;prop=links&amp;format=json&amp;plnamespace=0&amp;pllimit=500&amp;pldir=ascending&amp;titles=The%20Settlers%20of%20Catan", dataType: "jsonp", success: function(data) { $.each(data.query.pages, function(i, item) { console.log(item.links.title); }) } }) When this code runs I know it doesn't work. If I remove the "title" out of it, it'll give me a ton of "Objects" in the console and if I expand them I can see the title that I'm looking for but I'm just not sure how I can get that. Thanks!
has answer: http://stackoverflow.com/a/25344271
upvote count: 1

http://stackoverflow.com/q/25350268
tagged with: http://stackoverflow.com/tag/html
has title: how to find specific html element pattern
has answer: http://stackoverflow.com/a/25350445
type: AnsweredQuestion
has body: A sample of my code: <classified_title check_zone="true" article="start" a_type="advertisement" cid="#P98_001"></classified_title> <dc_title article="start" check_zone="true" a_type="article" cid="#P95_001"></dc_title> <pam_credit rot_ang="90_3021_1470_681_71" check_zone="true" article_con="95.1" cid="#P95_010">ILLUSTRATION BY HECTOR CADEMARTORI</pam_credit> I want to distinguish sets of three, like the following code: The first tag ( ) has an attribute article_con and second tag ( ) has attribute article="start" and again third tag is like first tag, as the article_con attribute has same value. Not like that: The first and third tag's article_con attribute value different, important thing is there must be article="start" attribute in second tag.
has comment: http://stackoverflow.com/comment/39523963
possible better answer: http://stackoverflow.com/a/25350403
has answer: http://stackoverflow.com/a/25350403
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39524067
accepted answer: http://stackoverflow.com/a/25350445
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39524022
score: 0

http://stackoverflow.com/comment/39450942
comment on: http://stackoverflow.com/q/25310571
score: 0
has text: `.find` is not a method available on DOM nodes, so it's `undefined`. I think you meant, `.getElementsByTagName()` or maybe `querySelectorAll()`.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39491696
comment on: http://stackoverflow.com/a/25319951
score: 0
type: AnswerComment
has text: The browser will identify it as the selected option if it has a value associated with it. Make your first option one with an empty value such as: Please select an option
type: Comment

http://stackoverflow.com/a/25294503
has body: Thanks to V31 for giving me the idea, but i worked it out a bit more generic: // In your controller $scope.items = [] // Contains the webservice data $scope.itemsViewState = {} // Map that will contain all the viewstate with the ID as key. The HTML: ID: {{item.id}} Votes: {{item.votes}} Click here to view detail info {{item.detailInformation}} In case you need to save multiple properties per object remember to create an Map for level you go deeper: // In your controller $scope.items = [] // Contains the webservice data $scope.itemsViewState = {} // Map that will contain all the viewstate with the ID as key. $scope.openDetail = function($item) { $scope.itemsViewState[item.id] = {}; $scope.itemsViewState[item.id]['subprop'] = true; } The HTML: ID: {{item.id}} Votes: {{item.votes}} Click here to view detail info {{item.detailInformation}}
type: AcceptedAnswer
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25293061
accepted answer of: http://stackoverflow.com/q/25293061

http://stackoverflow.com/comment/39410464
type: Comment
has text: @dfsq It's not because you remove an element from the DOM that it becomes unreachable. Your example doesn't prove there's a memory leak and in fact, as soon as the code will finish it's execution, the associated entry in the weak map will be destroyed, since `div` will not be reachable anymore. You can think of it this way: if you cannot retrieve the key to query the WeakMap, then the entry will be garbage collected. jQuery cannnot use WeakMap, since it must run in old browsers too and weak references cannot be shimmed.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25288073

http://stackoverflow.com/a/37172595
upvote count: 9
answers question: http://stackoverflow.com/q/25384360
has comment: http://stackoverflow.com/comment/74500254
downvote count: 0
type: Answer
has body: In our project, I include moment like this: import moment from 'moment/src/moment'; and that seems to do the trick. Our usage of moment is very simple though, so I'm not sure if there will be any inconsistencies with the SDK. I think this works because WebPack doesn't know how to find the locale files statically, so you get a warning (that's easy to hide by adding an empty folder at moment/src/lib/locale/locale) but no locale includes.
score: 9

http://stackoverflow.com/comment/39502918
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25337916
has text: @JoeSmith This, indeed, seems to be the case for a table. Do not get confused by whole "table design is bad, you should use divs" - this is not an advice to _always_ follow. In the layouts where you need your view to look like table - use table.
score: 0

http://stackoverflow.com/comment/39388264
comment on: http://stackoverflow.com/a/25235510
has text: I tried something and that helped a lot! Thanks Mr. brooks! http://jsfiddle.net/n01ojnba/1/
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25380164
linked to: http://stackoverflow.com/q/1359018
type: AnsweredQuestion
upvote count: 0
duplicate of: http://stackoverflow.com/q/203198
has title: Attach Event Handler ".on()" on dynamic button
accepted answer: http://stackoverflow.com/a/25380193
type: Question
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25380193
linked to: http://stackoverflow.com/q/203198
has body: I have a button which is dynamically added on the page (via mustache). There is a class on it. But when I click on this button, the JQuery method is not executed. My HTML: My HTML with the dynamically added button: Hello My jQuery: $(function(){ $('.hello').on('click', function(e){ e.preventDefault(); console.log('Hello'); }); });
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39579635
tagged with: jquery
favorite count: 0
duplicate of: http://stackoverflow.com/q/1359018
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25304397
has title: How to prepare grunt to prepare dist folder with app.js?
type: Question
accepted answer: http://stackoverflow.com/a/25304898
answer count: 1
tagged with: javascript
score: 0
tagged with: yeoman
tagged with: angularjs
has answer: http://stackoverflow.com/a/25304898
has body: I'm currently playing around with Yeoman Angular Fullstack Generator. That's pretty cool and works as expected. Since it uses grunt, it's possible to run grunt serve dist so that it starts the server with my uglified and concatenated files... BUT: Last week I found modulus.io (nodejs cloud hosting like heroku) and they were offering a free evaluation phase. Problem: They expect that my project has an app.js so they can start it with node app.js. Question: Do you guys know how can I use grunt to generate a dist folder just for modulus.io, including all contents of the already generated dist folder (currently just frontend code) + all needed server-side javascripts + an appropriate app.js (that uses express and the contents from the dist folders) and the package.json file? Any help would be appreciated. :) I think a similar task must exist somewhere since you might have this problem on any other cloud hosting platform. Unfortunately I couldn't find a proper solution Regards, Sascha
tagged with: node.js
tagged with: heroku
type: AnsweredQuestion

http://stackoverflow.com/comment/39474099
type: Comment
type: QuestionComment
score: 0
has text: Solved by clearing cache.
comment on: http://stackoverflow.com/q/25312290

http://stackoverflow.com/comment/39322670
has text: if you are working with static inputs use `$('#formid').serialize();` , and if you are working with dynamic variables u have to set every key inside the array
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25241478
score: 0

http://stackoverflow.com/a/25274163
upvote count: 1
answers question: http://stackoverflow.com/q/25273911
has body: you can split it to array in controller: $scope.numbersAsList = $scope.submittedNumbers.split(' '); and after iterate over it with ng-repeat: &lt;ul&gt; &lt;li ng-repeat="number in numbersAsList"&gt;{{ number }}&lt;/li&gt; &lt;/ul&gt; after that you can join it again with: var joinedAgain = $scope.numbersAsList.join(' ');
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/39504994
has text: I help you but give me your jsfiddle link
score: 0
comment on: http://stackoverflow.com/q/25334084
type: QuestionComment
type: Comment

vbscript
tags question: http://stackoverflow.com/q/25381605
type: Tag
tag name: vbscript
tags question: http://stackoverflow.com/q/25297276
tags question: http://stackoverflow.com/q/25387250

http://stackoverflow.com/comment/39735393
type: Comment
comment on: http://stackoverflow.com/a/25456763
score: 0
type: AnswerComment
has text: This is a great step forward, but kind of leaves me with an new issue which i cannot resolve. removing functionality (as you suggested) is not something i would like to do. also, the map is re-sizing with the browser, which creates another issue.

http://stackoverflow.com/q/25354988
tagged with: retina-display
has title: Optimizing online photo gallery for retina devices
type: UnansweredQuestion
tagged with: wordpress
type: Question
has body: I have an existing website (a photo blog) that loads the majority of the photos from Flickr. I'd like to enhance the experience for users with high resolution screens and load higher res versions of photos, but I'm not sure what would be the best way to go. Since the images in question are not UI elements, there is no sensible way to solve this problem with CSS. That leaves either client side JavaScript, or a server side find-and-replace for specific image patterns (since they come from Flickr, it's easy to detect and easy enough to figure out the url for a double-sized image). For client side, my concern is that even the regular sized images are 500-800 KB in size, there there can be 10-30 images per gallery, causing lots of excess bandwidth use for retina users. For server side, it's obviously tricky to determine if the request comes from a retina device or not. One idea I had (which I have yet to test out), was to run a JavaScript function that checks window.devicePixelRatio and sets a cookie accordingly, and then on each successive page request the server would know if the device is high res or not. That leaves the entry page with non-retina images, but at least all the next ones will have high res images loaded right away. Are there any pitfalls to this proposed solution? Are there better ways to handle it?
tagged with: javascript
tagged with: image
score: 0
has answer: http://stackoverflow.com/a/25355081
answer count: 1
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39459431
type: QuestionComment
has text: @ajp15243 I would think that using ' ' on the mainMenu.html page would mean that the file is being loaded onto the page. I will look into the network pane dev tool. I have never used it before. I will let you know how it goes.
comment on: http://stackoverflow.com/q/25314611
score: 0
type: Comment

http://stackoverflow.com/q/25283292
has answer: http://stackoverflow.com/a/25284092
has title: How to add next and previous buttons to a light-box using jquery
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39401077
type: UnansweredQuestion
has body: I have the following code to develop my light-box where i need my prev and next buttons work accordingly.I have break down the code till this far. Any help or suggestion would be appreciated. $(function () { $('.thumbnail li').click(function () { var index = $(this).index(); $('.light-box li:eq(' + index + ')').css('display', 'block'); }); }); DEMO

http://stackoverflow.com/a/25233328
type: Answer
has comment: http://stackoverflow.com/comment/39307676
has body: It may be that the external site is using raw java-script on it's form to collect the data and submit it to a server, in which case no amount of posting to the page in any shape would allow you to submit automatically. If the page were using java-script, potentially you could iframe it and talk to it through java-script, but without help from the site owner that may not work. it would be helpful if we could have the URL of the page inquestion
has comment: http://stackoverflow.com/comment/39340339
answers question: http://stackoverflow.com/q/25233046
has comment: http://stackoverflow.com/comment/39307479
score: 0
has comment: http://stackoverflow.com/comment/39308527

http://stackoverflow.com/comment/39557830
type: QuestionComment
score: 0
has text: So the *order* is always correct, but not the *timing*? "Unfortunately", the first fiddle works fine for me even with the `setTimeout` swapped in, what browser are you using to experience this?
comment on: http://stackoverflow.com/q/25367912
type: Comment

http://stackoverflow.com/comment/135781173
has text: @markbernard actually it doesn't work with other characters either like round brackets
type: AnswerComment
comment on: http://stackoverflow.com/a/25298843
type: Comment
score: 1

http://stackoverflow.com/comment/39429475
type: Comment
comment on: http://stackoverflow.com/a/25298657
has text: In that case you could use, `str.replace(/\sabc/," ABC");` (`\s` matches a space before `abc`, and it will only replace one match).
score: 0
type: AnswerComment

http://stackoverflow.com/a/25325861
downvote count: 0
has body: Bind the index as an argument of the function receiving the result: for (var i = 0;i &lt; list.length; i+=1) { Promise.do(action).then((function(index, result) { list[index] }).bind(null, i)); }
type: Answer
answers question: http://stackoverflow.com/q/25325037
upvote count: 3
score: 3

http://stackoverflow.com/comment/39496166
type: AnswerComment
has text: This works with a caveat. Now the default checked 'Vehicle Info' broke again.
comment on: http://stackoverflow.com/a/25333994
type: Comment
score: 0

http://stackoverflow.com/q/25295426
has body: I have a Kendo UI Grid that displays n-child records, that I also have a custom resize function that keeps the grid sized for the browser window height. If I remove that resizeListener, the child records display as appropriate. If I have the resizeListener bound, the child records do not display. This issue is specific to Internet Explorer 8 (sorry, it's a company policy limitation). The grid functions normally in Firefox. I have tried using $(window).off("resize") when I activate the child template, in the databound, and in really a variety of random places that I thought might possibly work - but nothing so far. I'm looking for a solution or a work-around for IE. Here is the function: function resizeGrid() { var gridElement = $("#boxesgrid"); var dataArea = gridElement.find(".k-grid-content"); var newGridHeight = $(document).height() > 850 ? 850 : $(document).height() * .75; var newDataAreaHeight = newGridHeight * .7; dataArea.height(newDataAreaHeight); gridElement.height(newGridHeight); gridElement.data("kendoGrid").refresh(); } var resizeListener = function () { $(window).one("resize", function () { resizeGrid(); setTimeout(resizeListener, 500); }); }; Here is the html: Line of Business Application Filter Here is the rest of the javascript/kendo code: $(document).ready(function () { resizeListener(); var isParent, appId, lobId, boxId; var apiUrl = '@ViewBag.ApiUrl'; var lobDataSource = new kendo.data.DataSource({ transport: { read: { url: apiUrl + "Lob" } }, schema: { model: { id: "LobId", hasChildren: "HasChildren" } } }); var appsDataSource = new kendo.data.DataSource({ transport: { read: { url: apiUrl + "App" }, parameterMap: function (data, action) { if (action === "read") { data.lobid = lobId; data.parent = isParent; return data; } else { return data; } } } }); var filterDataSource = new kendo.data.DataSource({ transport: { read: { url: apiUrl + "Theme" } }, schema: { model: { id: "FilterId" } } }); var boxesDataSource = new kendo.data.DataSource({ transpor…
has title: Kendo UI Grid with custom resize event won't display detail template in Internet Explorer
accepted answer: http://stackoverflow.com/a/25327630
type: AnsweredQuestion
type: Question
tagged with: kendo-grid
tagged with: internet-explorer
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25327630
answer count: 1
tagged with: jquery

http://stackoverflow.com/a/25250652
accepted answer of: http://stackoverflow.com/q/25250595
upvote count: 7
score: 7
has body: JSONP is always asynchronous. The async: false setting is simply ignored. From the documentation: [...] If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Why? JSONP has actually nothing to do with Ajax. jQuery is just providing a single function to deal with both. JSONP is nothing else but appending a &lt;script&gt; element to the document. The browser will load these scripts asynchronously. See How do I return the response from an asynchronous call? for possible (asynchronous) solutions.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25250595
type: Answer

http://stackoverflow.com/a/25277871
answers question: http://stackoverflow.com/q/25277838
accepted answer of: http://stackoverflow.com/q/25277838
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
has body: food is a property that is initialized in the Animal() constructor when it is called with three parameters passed to it. Since you are never calling the constructor that way with those arguments and you are never setting the food property in your Penguin constructor, that property will be undefined (never set). The numLegs property will have a value of 2 because your Penguin constructor always sets it to 2. The name property will be set because you are setting it in your Penguin constructor. There is only one object here. It's not like there's a Penguin part of the object and an Animal part of the object. There's just one object and one set of properties. No matter where the property is set (which constructor or which method), once it is set, it's set on the object. The usual method of inheritance is to create a constructor for Penguin that includes ALL the properties needed to initialize the object (or the subclass manually sets some of the arguments itself) and then in the Penguin constructor, you call the constructor of the base object and pass it the arguments that it expects. Here would be one way to do that where the Penguin constructor calls the Animal constructor and passes the arguments for numLegs and food since they are already known for a Penguin and thus don't need to be passed in with the Penguin constructor. function Animal(name, numLegs, food) { this.name = name; this.numLegs = numLegs; this.food = food; } Animal.prototype.sayName = function() { console.log("Hi my name is " + this.name); }; // define a Penguin class function Penguin(name) { // call parent constructor with this object and all three args it wants // so all the object properties get initialized appropriately Animal.call(this, name, 2, "fish"); } // set its prototype to be a new instance of Animal Penguin.prototype = new Animal(); FYI, the more modern way to set the prototype is: Penguin.prototype = Object.create(Animal.prototype); This avoids any side effects of the constructor and just…

http://stackoverflow.com/q/25239269
tagged with: synchronous
tagged with: javascript
tagged with: forms
has title: Javascript: Upload some files synchronous from a form
score: 0
answer count: 1
tagged with: ajax
has body: I need to upload multiple files from a form. I have an event "submit" that processes the data of the form, uploads the files and then shows a message. I need that this process syncronous to show the message when the files have been uploaded. I have this HTML code in the form: &lt;form method="post" action="files/upload_project_file" id="upload_project_file_form" target="upload_project_file_iframe" enctype="multipart/form-data"&gt; &lt;input type="file" name="uploaded_file[]" class="multi" maxlength="0" accept="" /&gt; &lt;input type="hidden" name="action" value="upload_project_file"&gt; &lt;input type="hidden" name="id_project_files" value="" id="id_project_files"&gt; &lt;/form&gt; And this Javascript code in the javascript Submit event: //processes data //... //Upload files var data = new FormData(); jQuery.each($('input[name^="uploaded_file"]')[0].files, function(i, file) { data.append('uploaded_file'+i, file); }); data.append('id_project_files', $("#id_project_files").val()); $.ajax({ url: 'files/upload_project_file', enctype: 'multipart/form-data', data: data, cache: false, contentType: false, processData: false, async: false, type: 'POST', success: function(data){ //Clear $('.filesToUpload').empty(); } }); //Then show the message and redirect page //... I upload only one file but not all, I can't, I don't know why. I've seen Jquery.each runs only once.
has comment: http://stackoverflow.com/comment/39320938
has answer: http://stackoverflow.com/a/25242710
type: UnansweredQuestion
tagged with: file
type: Question

http://stackoverflow.com/a/25266505
has body: You can use regex to do it, just provide a list of the characters in square brackets and escape if necessary. email.split("[_-\.]"); Is that what you mean?
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25266372
has comment: http://stackoverflow.com/comment/39370599

http://stackoverflow.com/comment/39560912
score: 0
type: Comment
has text: I'm accepting this solution because it provides a specific example, which is what I needed. I do like the 404 suggestion from the other response though.
comment on: http://stackoverflow.com/a/25336019
type: AnswerComment

http://stackoverflow.com/a/25388822
answers question: http://stackoverflow.com/q/25388763
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
has body: Use word boundary(\b) , &gt; "url(foo/bar/u/user/rest/of/stuff)".match(/\bu\b[^)]*/g); [ 'u/user/rest/of/stuff' ] OR Use a look-ahead (?=...) &gt; "url(foo/bar/u/user/rest/of/stuff)".match(/u[^()]*(?=\))/g); [ 'u/user/rest/of/stuff' ]
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25388763

http://stackoverflow.com/q/25270972
possible better answer: http://stackoverflow.com/a/25271730
tagged with: c#
has answer: http://stackoverflow.com/a/25271730
type: AnsweredQuestion
tagged with: asp.net-mvc
tagged with: knockout.js
accepted answer: http://stackoverflow.com/a/25271514
type: Question
score: 0
answer count: 2
tagged with: javascript
has body: I've been working on an ASP.NET MVC4 web application, and I'm trying to keep some persistent data of selected/deselected items on the user side. Essentially, I have an HTML table which I've converted into a Kendo Grid. The table/grid has been populated by accessing Oracle and SQL servers on the back end and strongly typing a model to the view in order to create and populate the table via that model. I'm trying to update a an ObservableArray found in my ViewModel based on whether the select checkbox has been checked or not, but I've been spinning circles for quite a while. Below is a basic framework of what I have implemented. Any help would be greatly appreciated. HTML Table: Select Model Division @foreach (var config in Model.Models) { @config.ModelName @config.Division } JavaScript/Knockout ViewModel: function PRPSSelectViewModel() { // Data var self = this; self.AvailableModels = ko.observableArray([]); self.ModelNames = ko.observableArray([]); // Operations self.addModel = function (name) { self.ModelNames.push(name); }; self.removeModel = function (name) { self.ModelNames.remove(name); }; } I'm sure that many variations of this problem have been documented, however I'm very new to Knockout and have been unable to implement my desired functionality despite the outpouring of resources and examples made available. EDIT Solved using a simple method. I just instantiated an array in my Javascript file which I'm using to populate with the names of the models. I already had some Javascript setup to to trigger when a checkbox was marked to 'select' it on the kendo grid, and by just grabbing the appropriate row, I'm able to populate the array with the model name. As long as the page doesn't refresh (and it shouldn't since I'm utilizing modals and partial views for by CRUD operations), I should be okay.
has title: Utilizing Knockout Updating Viewmodel Based on Select Checkbox
tagged with: asp.net-mvc-4
has answer: http://stackoverflow.com/a/25271514

http://stackoverflow.com/comment/39391749
has text: did you use toggle? `.toggle("slow");`, if you only use `.show()` it wont toggle :-)
type: Comment
comment on: http://stackoverflow.com/a/25257305
score: 0
type: AnswerComment

http://stackoverflow.com/a/25338966
answers question: http://stackoverflow.com/q/25338891
score: -3
has body: data can be accessed in the Template using 'this' so this.petName
has comment: http://stackoverflow.com/comment/39504634
downvote count: 3
type: Answer
upvote count: 0

http://stackoverflow.com/q/25256430
accepted answer: http://stackoverflow.com/a/25296158
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
answer count: 1
downvote count: 0
tagged with: meteor
favorite count: 0
has body: I'm trying to use a nice responsive site template http://html5up.net/striped and running into a number of problems. I've set up a pretty basic test. I downloaded the striped package, created a clients folder in a meteorite app, and dropped the striped folder in. I had to make two changes - move the "left-sidebar" class in index.html into a rather then as meteor doesn't seem to allow applying classes to bodies. - move the images into an "img" folder in a public folder The grid seems offcenter and most of the coloring doesn't load when I run from meteor. However, the striped file on it's own works great (when I load the index.html file directly in my browser rather than through web server). Any idea what is going on here? I played around with it for quite awhile to no avail. I can only think it has to do with how meteor is loading resources but my understanding of how that works didn't lead to any progress for me.
has title: html5up! striped with meteor
has answer: http://stackoverflow.com/a/25296158
tagged with: node.js
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/39542376
type: AnswerComment
comment on: http://stackoverflow.com/a/25360444
type: Comment
has text: Yes, because you're returning an array that has only "label" and "data" in it. "ServiceLevel" does not exist within the returned array, but it may within the inner array.
score: 0

http://stackoverflow.com/comment/39583463
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25313796
has text: Have you checked the answer? If it helped, could you please accept it?

http://stackoverflow.com/comment/39340909
type: AnswerComment
has text: I would argue that "property name" is the official terminology (and is used through the specification), but "key" is implicitly acceptable in `Object.keys`. Good distinction between the property and the "key", however.
type: Comment
comment on: http://stackoverflow.com/a/25250933
score: 0

http://stackoverflow.com/q/25362010
score: 0
tagged with: google-maps
has comment: http://stackoverflow.com/comment/39549099
has comment: http://stackoverflow.com/comment/39548201
has title: Detect Google Maps Javascript API limit for map loads
answer count: 0
has comment: http://stackoverflow.com/comment/39548749
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39547533
has body: I want to detect whether my website hit the 25k limit for map loads. I already had a look at the Maps JS API reference but it only lists the possibility to check the status for things like the Geocoding API but not the Map load itself. So I am not interested in the limits related to geocoding or place lookup but just the limit on displaying interactive maps. Any idea how I can detect if the limit is hit and no map will be displayed? Thanks!
tagged with: javascript
tagged with: google-maps-api-3

http://stackoverflow.com/a/43138971
has body: es5 underscore.js version, supports arrays (integer keys) and objects: _.recursiveMap = function(value, fn) { if (_.isArray(value)) { return _.map(value, function(v) { return _.recursiveMap(v, fn); }); } else if (typeof value === 'object') { return _.mapObject(value, function(v) { return _.recursiveMap(v, fn); }); } else { return fn(value); } };
answers question: http://stackoverflow.com/q/25333918
score: 0
type: Answer

http://stackoverflow.com/comment/39419258
type: QuestionComment
score: 4
comment on: http://stackoverflow.com/q/25293443
has text: This question appears to be off-topic because it belongs on http://codereview.stackexchange.com
type: Comment

http://stackoverflow.com/a/25345920
type: Answer
score: 2
has body: You also need to set the property shadowCameraFar on your child object.
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25342409
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25342409
downvote count: 0
has comment: http://stackoverflow.com/comment/39522310

http://stackoverflow.com/q/25289299
tagged with: forms
has answer: http://stackoverflow.com/a/25289554
type: Question
has title: PHP Forms - Submit Form on Click of A Radio Button
accepted answer: http://stackoverflow.com/a/25289624
has comment: http://stackoverflow.com/comment/39411652
tagged with: javascript
has body: I really need you to help me on this issue. I have searched and found nothing on the above subject. I have a form with 2+ option radio buttons plus a submit button. I codify the form with a setTimeOut script --> if no action is taken in 15 sec, the page should submit itself. ... that works! Another clause that I want to add is, on click of any radio button, the form should auto Submit. This is because, I want to discard the Submit Button. Therefore, the SetTimeOut function will still remain and the auto submit using onClick event. My timer function is thus: var mins; var secs; function cd() { mins = 1 * m("01"); // change minutes here secs = 0 + s(":00"); // change seconds here (always add an additional second to your total) redo(); } function m(obj) { for(var i = 0; i < obj.length; i++) { if(obj.substring(i, i + 1) == ":") break; } return(obj.substring(0, i)); } function s(obj) { for(var i = 0; i < obj.length; i++) { if(obj.substring(i, i + 1) == ":") break; } return(obj.substring(i + 1, obj.length)); } function dis(mins,secs) { var disp; if(mins <= 9) { disp = " 0"; } else { disp = " "; } disp += mins + ":"; if(secs <= 9) { disp += "0" + secs; } else { disp += secs; } return(disp); } function redo() { secs--; if(secs == -1) { secs = 15; mins--; } //document.getElementById(txt.innerHTML) = dis(mins,secs); document.cd.disp.value = dis(mins,secs); // setup additional displays here. if((mins == 0) && (secs == 0)) { //window.alert("Time is up. Press OK to continue."); // change timeout message as required document.getElementById('form2').submit(); window.location = "testResult.php" // redirects to specified page once timer ends and ok button is pressed } else { cd = setTimeout("redo()",1000); } } function init() { cd(); } window.onload = init; // on page load, the time displays a countdown in a textbox (disp) of a form (CD) The code for radiobuttons are thus: <form id="form2" name="form2" method="post" action="testResult.php?Id=<?php echo $SID;?>&QuizId=<?php echo $qId…
has answer: http://stackoverflow.com/a/25289630
has comment: http://stackoverflow.com/comment/39411613
downvote count: 0
has answer: http://stackoverflow.com/a/25289386
favorite count: 0
possible better answer: http://stackoverflow.com/a/25289433
has answer: http://stackoverflow.com/a/25289624
answer count: 5
has answer: http://stackoverflow.com/a/25289433
tagged with: php
type: AnsweredQuestion
score: 2
upvote count: 2

http://stackoverflow.com/comment/39474564
type: Comment
has text: Because the browser will navigate away before the ajax call has a chance to finish. It's like hanging up your phone halfway through ordering a pizza. As far as how to log the link ssomeone follows -- you run those through a link forwarder... `example2.com`
comment on: http://stackoverflow.com/a/25323146
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39528730
has text: @AndyB Kind of, technically you create inner closures that each have their own `c` variable, each of which is initialized to the value that `i` held when the closure was created.
score: 1
comment on: http://stackoverflow.com/a/25352761
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25249406
type: Answer
has comment: http://stackoverflow.com/comment/39338737
answers question: http://stackoverflow.com/q/25249283
upvote count: 3
has comment: http://stackoverflow.com/comment/39339224
accepted answer of: http://stackoverflow.com/q/25249283
has comment: http://stackoverflow.com/comment/39338507
has comment: http://stackoverflow.com/comment/39338377
has body: Your code looks fine, except for one thing: null doesn't have .toString() method. So, it's best to use String instead: for ( var key in data ){ data[key] = String(data[key]); }; String is a string constructor. It takes anything and produces a string representation of it. Update But this solution won't work for complex data structures. Though, if you need a JSON string, then you could use JSON.stringify with tricky replacer: function replaceWithString(k, v) { if ((typeof v === 'object') &amp;&amp; (v !== null)) { return v; } else { return String(v); } } JSON.stringify(data, replaceWithString); and if you want to make it pretty: JSON.stringify(data, replaceWithString, 2); N.B. As Bergi noticed in comments, you could use Object(v) === v instead of (typeof v === 'object') &amp;&amp; (v !== null) to check that v is an object. Update2 It looks like data in your example is a mongoose document. The problem with mongoose is that it wraps all its object with the whole pack of nasty getters and setters to make them look like plain JS objects, which they are not. So, if you're working with mongoose documents, you should call .toObject() or .toJSON() before trying to do anything with it: data = doc.toObject(); // converts doc to plain JS object Though, my second solution with JSON.stringify should work anyway, because stringify calls .toJSON() automatically.
has comment: http://stackoverflow.com/comment/39339511
has comment: http://stackoverflow.com/comment/39338575
score: 3
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39338625
has comment: http://stackoverflow.com/comment/39338531
has comment: http://stackoverflow.com/comment/39339142

http://stackoverflow.com/q/25253047
has title: Disabling Rails form_for submit button in a do/end block
tagged with: ruby-on-rails
type: Question
type: AnsweredQuestion
tagged with: forms
accepted answer: http://stackoverflow.com/a/25253241
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has body: I currently have a form nested in a do/end block, so for every object that's created, it'll have its' own dropdown menu: &lt;% @shows.each do |show| %&gt; &lt;%= form_for show, :url =&gt; show_record_path(:show_id =&gt; show.id), method: :post do |f| %&gt; &lt;%= f.select :box_id, Box.all.collect { |p| [ p.box_number, p.id ] }, class: "show-radio-button", :include_blank =&gt; true %&gt; &lt;%= f.submit "Record", data: { disable_with: "Please wait.." }, :disabled =&gt; true, class: "record-button" %&gt; &lt;% end %&gt; And here is my jQuery that enables the submit button if an option from the dropdown has been selected: $('#show_box_id').on('keyup change', function(){ if ($('#show_box_id').val() == '' ) { $('.record-button').prop('disabled', true); $(".record-button").css("background-color", ""); } else { $('.record-button').prop('disabled', false); $(".record-button").css("background-color", "#008C00"); } }); The problem is that the jQuery only works on the first object created in the do/end block (so if I select something from a dropdown that's not in the first object, nothing happens), and if I select something from the dropdown in the first object, then the jQuery runs on all of them. How can I make it so that the jQuery code works on each object created individually with no effect on the others?
has answer: http://stackoverflow.com/a/25253241

http://stackoverflow.com/comment/39537760
score: 0
type: AnswerComment
has text: I'm giving you the points since you're suggestion led me to he right path. For whatever reason, there is some kind of bug that wasn't seeing the nested ui-view - but when I gave it an empty value of ="" then it worked. Not sure why, but - it works now. Thanks!
type: Comment
comment on: http://stackoverflow.com/a/25339360

http://stackoverflow.com/a/25259736
has comment: http://stackoverflow.com/comment/39358081
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39359872
type: Answer
accepted answer of: http://stackoverflow.com/q/25258415
has body: If older browser support is not an issue, you can use CSS3 flex box. *{ margin:0; padding:0; } html,body{ height:100%; } .wrap{ display:flex; width:100%; height:100%; text-align:center; list-style-type:none; white-space:nowrap; overflow:hidden; } .con{ position:relative; box-sizing:border-box; flex:1 .5; background:url(images/new-psd_22.jpg) no-repeat; opacity:0.5; margin:0px; border-left:#FFF 1px solid; transition: all 0.5s linear; } .hover{ display:inline-block; box-sizing:border-box; position:absolute; top:0; right:0; bottom:0; left:0; z-index:2; text-align:center; color:#fff; background-color:rgba(0,0,0,0.5); transition:0.5s; } .con:hover{ flex-grow:1.5; text-align:center; color:#fff; opacity:10; background:url(images/Indian_Air_Forc17992.jpg) no-repeat; margin:0px; } .con:hover span{ text-align:center; color:#fff; opacity:0; background:url(images/Indian_Air_Forc17992.jpg) no-repeat; margin:0px; } Demo
score: 0
answers question: http://stackoverflow.com/q/25258415

http://stackoverflow.com/q/25297918
has answer: http://stackoverflow.com/a/25297959
favorite count: 0
has title: Why is wrapping elements so much quicker with jQuery elements
upvote count: 4
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25297945
type: Question
has comment: http://stackoverflow.com/comment/39428242
tagged with: performance
tagged with: javascript
score: 4
answer count: 3
has answer: http://stackoverflow.com/a/25298406
has comment: http://stackoverflow.com/comment/39428233
accepted answer: http://stackoverflow.com/a/25298406
possible better answer: http://stackoverflow.com/a/25297945
tagged with: jquery
has body: Check out the test: http://jsperf.com/wrap-with-jq var s = $('&lt;span /&gt;').text('my span'); s.wrap('&lt;div id="myWrap" class="myClass"&gt;&lt;/div&gt;').parent(); 8,073 ops/sec 87% slower s.wrap($('&lt;div /&gt;', { 'id': 'myWrap', 'class': 'myClass' }).parent()); 72,955 ops/sec Is there a reason this is so much faster creating a new element with jQuery? I would have assumed it was slower due to having to wrap an element with jQuery.

http://stackoverflow.com/comment/39467580
type: Comment
comment on: http://stackoverflow.com/a/25319225
has text: what about 'topics= '?
type: AnswerComment
score: 0

http://stackoverflow.com/a/25254309
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25254181
has body: but if hiding and showing a paragraph is all you want to do, you're going the long way around... &lt;script&gt; document.getElementById("btn-remover").onclick=function(){ var el = document.getElementById("publicacion-texto"); if(el.style.display=="none"){ el.style.display="block"; this.innerHTML="Haz click aquí para remover el texto"; } else { el.style.display="none"; this.innerHTML="Haz click aquí para restaurar el texto"; } } &lt;/script&gt;

http://stackoverflow.com/comment/39586597
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25335456
has text: It all depends on the browser and how the browser chooses to implement it... but AFAIK, most modern browsers only send the filename (with no path) when using ` ` controls. Back in the day, browsers may have sent the full path but they do not now b/c of security/privacy concerns, and b/c in most cases the server only cares about the filename. Here is a simple free example of a file selector control. Telerik also offers pay version. NOTE: I did not test this control, just found via a quick search http://www.codeproject.com/Articles/301328/ASP-NETUser-Control-File-Browser

http://stackoverflow.com/q/25288540
has answer: http://stackoverflow.com/a/25288690
has body: I encountered the following behavior: &gt; foo = {}; {} &gt; foo.bar = function bar() { return arguments; } [Function: bar] &gt; bar() ReferenceError: bar is not defined at repl:1:2 at REPLServer.self.eval (repl.js:110:21) at Interface.&lt;anonymous&gt; (repl.js:239:12) at Interface.emit (events.js:95:17) at Interface._onLine (readline.js:202:10) at Interface._line (readline.js:531:8) at Interface._ttyWrite (readline.js:760:14) at ReadStream.onkeypress (readline.js:99:10) at ReadStream.emit (events.js:98:17) at emitKey (readline.js:1095:12) Isn't bar supposed to be a function in the current scope? Adding [var] bar = solves the problem: &gt; bar = foo.bar = function bar() { return arguments; } [Function: bar] &gt; bar(1) { '0': 1 } But why doesn't it work without assignment to bar?
accepted answer: http://stackoverflow.com/a/25288599
has comment: http://stackoverflow.com/comment/39410083
has comment: http://stackoverflow.com/comment/39410103
has comment: http://stackoverflow.com/comment/39409981
linked to: http://stackoverflow.com/q/336859
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25288877
has comment: http://stackoverflow.com/comment/39410024
has answer: http://stackoverflow.com/a/25288599
type: Question
tagged with: function
tagged with: javascript
has comment: http://stackoverflow.com/comment/39409924
possible better answer: http://stackoverflow.com/a/25288690
score: 0
has title: Why function statement doesn't create a function when using setting it as a method?
has comment: http://stackoverflow.com/comment/39409955
answer count: 3

http://stackoverflow.com/comment/39469575
type: QuestionComment
type: Comment
has text: Please have a look at http://stackoverflow.com/help/how-to-ask to see how you can ask a good question.
comment on: http://stackoverflow.com/q/25320387
score: 0

http://stackoverflow.com/q/25234568
accepted answer: http://stackoverflow.com/a/25236574
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I am looking for some description of best practices for views and models/collections in Backbone. I know how to add models to collections, render views using templates and use views in parent views, however I'm looking for more context and perhaps some example links. I've updated this question to be more specific. Let's say you have a more grid layout with all kinds of variation, that gets pulled from the same collection. What would you do here to create this page? A simple child view repeated in a parent view won't work because the variation of the grid items is too great. Do you: create tons of tiny views and collections and render all of these different views using the relevant collections into that one page? create a complex template file that has a loop in it, that as you go through the loop, the loop outputs different markup? Do people put multiple views inside a parent view, all from the same model? Similarly, do people mix different models into the same parent view? For example movies and tv shows - these different models, can get they added to the same collection that renders that list? Thanks!
favorite count: 0
has comment: http://stackoverflow.com/comment/39310790
tagged with: templates
tagged with: backbone.js
upvote count: 2
has comment: http://stackoverflow.com/comment/39310973
has answer: http://stackoverflow.com/a/25236574
tagged with: model-view-controller
score: 2
type: AnsweredQuestion
has title: Backbone.js View, ParentView, Model, Collection and Template Best Practices
type: Question

http://stackoverflow.com/q/25233324
has answer: http://stackoverflow.com/a/25233370
score: 0
has title: doesn't execute javascript code
has comment: http://stackoverflow.com/comment/39307382
type: Question
tagged with: c#
has body: Actually, when my form is submitted with the submit button, I would want that the javascript code is executed for checking datas and if datas are not filled, to open a popup dialog and so, don't execute the action bounded to the form. Unfortunately, the javascript code is never executed even if the javascript is on the top of the page. Do you have a solution ? Thank you My form : @using (Html.BeginForm("AddRecipe", "AddRecipe", FormMethod.Post, new { data_ajax = "false"})) { //Set of components to submit //etc &lt;input type="submit" data-theme="b" id="addRecipeBtn" onclick="checkDatas();" value="Ajouter ma recette" /&gt; } My javascript code to execute : &lt;script&gt; function checkDatas() { alert("ici"); var ok = $("#fakeInput").val().length != 0 &amp;&amp; $("#title").val().length != 0 &amp;&amp; $("#cookingTime").val().length != 0 &amp;&amp; $("#preparationTime").val().length != 0 &amp;&amp; $("#ingredientListArea").val().length != 0 &amp;&amp; $("#preparationArea").val().length != 0; if (!ok) { $("#popupDialog").popup("open"); } } &lt;/script&gt;
tagged with: javascript
has comment: http://stackoverflow.com/comment/39307366
has answer: http://stackoverflow.com/a/25233375
answer count: 3
tagged with: jquery
has answer: http://stackoverflow.com/a/25233405
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: razor

http://stackoverflow.com/a/25296091
downvote count: 0
has comment: http://stackoverflow.com/comment/39439100
has comment: http://stackoverflow.com/comment/39426810
has comment: http://stackoverflow.com/comment/39426986
has comment: http://stackoverflow.com/comment/39439183
has comment: http://stackoverflow.com/comment/39427762
has comment: http://stackoverflow.com/comment/39557608
has comment: http://stackoverflow.com/comment/39439205
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25295857
has comment: http://stackoverflow.com/comment/39426898
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25295857
has comment: http://stackoverflow.com/comment/39427490
has body: The difference between the PHP and JS implementation is, that PHP handles the UTF-8 string as as 8-bit chars, while in JS each char is represented by Unicode. Please give this a try: hash_hmac("sha1", 'ą', "1492343027") == hex_hmac_sha1("1492343027",'\xC4\x85') JSFIDDLE UTF 8 hex from - http://www.charbase.com/0105-unicode-latin-small-letter-a-with-ogonek JS hex_hmac_sha1("1492343027",'ą') = 206e608ecaf23a9575ca81a86e3afd72eca243a0 hex_hmac_sha1("1492343027",'\xC4\x85') = 8b353bb4c891d73ae9be09d0653e2564e0dff243 Escape your Unicode on JS side... PHP hash_hmac("sha1", 'ą', "1492343027"); = 8b353bb4c891d73ae9be09d0653e2564e0dff243 hash_hmac("sha1", "\xC4\x85", "1492343027"); = 8b353bb4c891d73ae9be09d0653e2564e0dff243
type: Answer
has comment: http://stackoverflow.com/comment/39425242
score: 2

http://stackoverflow.com/comment/39439023
comment on: http://stackoverflow.com/q/25303961
type: QuestionComment
has text: Seems hard to maintain. Why don't you use a simple module pattern ?
type: Comment
score: 0

http://stackoverflow.com/comment/39394161
type: AnswerComment
comment on: http://stackoverflow.com/a/25279611
type: Comment
has text: Problem is not there as the json was pasted from service thats why was looking like this . It still showing same thing duplicate data
score: 0

http://stackoverflow.com/comment/39322847
has text: You "can", not you "need"
comment on: http://stackoverflow.com/a/25241631
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/39483473
has text: did a little reserch and have the jssor.com/demos/scrolling-logo-thumbnail-slider.html working like a dream
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25322739
type: Comment

http://stackoverflow.com/q/25283778
accepted answer: http://stackoverflow.com/a/25284240
has body: I have an infinite loop with angularjs $q and promise. This is the code: &lt;a ng-hide="!isTechnician()" class="pull-right" href="#/admin/techniciansState"&gt;&lt;span class="glyphicon glyphicon-map-marker"&gt;&lt;/span&gt;&amp;nbsp; Estado del técnico &amp;nbsp; &lt;/a&gt; This is the js code: $scope.isTechnician = function () { if (!$scope.notCheckTechnician) { SecurityService.getCurrentUser().then(function (user) { if ($.inArray('technician', user.roles)) { return true; } else { return false; } }); } }; var SecurityService = function($resource, $q, $rootScope, API_URL) { // Definición del servicio REST var Security = $resource(API_URL + '/security/:action', { action: "@action" }, { 'currentUser': { method: 'GET', isArray: true, params: { action: 'current-user' } }}; var getCurrentUser = function() { var deferred = $q.defer(); var user = Security.currentUser(function() { if (user.length &gt; 0) { _setCurrentUser(user[0]); deferred.resolve(user[0]); } else { _setCurrentUser(null); deferred.reject('Not authenticated'); } }, function() { _setCurrentUser(null); deferred.reject('Not authenticated'); }); return deferred.promise; }; And the error: Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations: [] http://errors.angularjs.org/1.2.18/$rootScope/infdig?p0=10&amp;p1=%5B%5D at http://localhost:900/bower_components/angular/angular.js:78:12 at Scope.$get.Scope.$digest (http://localhost:900/bower_components/angular/angular.js:12434:19) at Scope.ng.config.$provide.decorator.$delegate.__proto__.$digest (&lt;anonymous&gt;:844:31) at Scope.$get.Scope.$apply (http://localhost:900/bower_components/angular/angular.js:12660:24) at Scope.ng.config.$provide.decorator.$delegate.__proto__.$apply (&lt;anonymous&gt;:855:30) at done (http://localhost:900/bower_components/angular/angular.js:8272:45) at completeRequest (http://localhost:900/bower_components/angular/angular.js:8477:7) at XMLHttpRequest.xhr.onreadystatechange (http://l…
downvote count: 1
type: Question
has title: Infinite loop with $digest angularJS
has comment: http://stackoverflow.com/comment/39401202
tagged with: javascript
has comment: http://stackoverflow.com/comment/39401134
answer count: 1
favorite count: 0
tagged with: angularjs
upvote count: 2
has answer: http://stackoverflow.com/a/25284240
type: AnsweredQuestion
score: 1

http://stackoverflow.com/a/25362531
score: 1
answers question: http://stackoverflow.com/q/25313911
has body: if its a regular partial(under the same view) then:- $("#notifications").append("&lt;%= escape_javascript(render(:partial =&gt; 'notification')) %&gt;"); else $("#notifications").append("&lt;%= escape_javascript(render(:partial =&gt; 'layouts/notification')) %&gt;");
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/39538674
comment on: http://stackoverflow.com/a/25358487
score: 0
type: AnswerComment
type: Comment
has text: `node.append("a").append("text");` is good but the second one is not. I've already tried that `function (d) {return d.url;});` which did not work. returns `undefined`

http://stackoverflow.com/comment/39576455
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25378219
has text: @GibboK http://stackoverflow.com/questions/1367700/whats-the-difference-between-keydown-and-keypress-in-net. Also not really sure why you're asking this type of question if you know how SO works (which you evidently do from your rep/badges). The answer is a quick google away/in the related answers on SO.
score: 4

http://stackoverflow.com/comment/39404252
comment on: http://stackoverflow.com/a/25284882
type: AnswerComment
score: 0
type: Comment
has text: @Richa Well is this the case..? are you appending the textbox in an event handler?

http://stackoverflow.com/a/25330185
has comment: http://stackoverflow.com/comment/39488624
answers question: http://stackoverflow.com/q/25329909
type: Answer
has comment: http://stackoverflow.com/comment/39490184
has comment: http://stackoverflow.com/comment/39488365
has comment: http://stackoverflow.com/comment/39492349
has comment: http://stackoverflow.com/comment/39488312
has body: Here is how you do it: http://jsfiddle.net/y7pdb5b2/ // Here we set the address var address = "oxford street london"; // We call get location, the callback will return the address; // You need to add some error checking to ensure you get something back; GetLocation(address, function (coord) { alert(coord); var lat = coord.lat, lng = coord.lng; }); function GetLocation(address, callback) { var geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': address }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { callback(results[0].geometry.location); } else { callback(); } }) };
has comment: http://stackoverflow.com/comment/39488948
score: 0

http://stackoverflow.com/q/25323744
tagged with: node.js
has body: I would assume that if I run the following code in my node console. var MongoClient = require('mongodb').MongoClient; MongoClient.connect('mongodb://127.0.0.1:27017/test', function(err, db){ if (err) throw err; db.collection('allClasses').findOne({}, function(err, doc){ //Print the result console.dir(doc); //close the DB db.close(); }); }); setTimeout(function(){ console.dir("10 Milliseconds!"); }, 10); setTimeout(function(){ console.dir("100 Milliseconds!"); }, 100); That if I consistently (10 out of 10 times) get the following output: That this illustrates that not only does the mongo query take between 10 and 100 ms to return my data, but that my node console executes my code in an asynchronous fashion. Question: Is this correct? I have one alternate question. If I wait for a very long time to execute this script, let's say 20 minutes, leaving my mongod.exe running. And then run the script. Sometimes I get the following output. I can understand the data return coming in last, I'm assuming because it takes longer than 100 ms for some reason probably to do with connectivity or since I waited so long it takes longer because mongod is idle or something along those lines.... Question 2: Why would the message function that is timed out longer show up first? I know there has to be a silly reason.
answer count: 0
score: 0
upvote count: 1
downvote count: 1
type: Question
tagged with: mongodb
tagged with: javascript
has comment: http://stackoverflow.com/comment/39475880
tagged with: shell
tagged with: asynchronous
favorite count: 0
type: UnansweredQuestion
has title: Does the following code illustrate async functionality?
has comment: http://stackoverflow.com/comment/39475738

http://stackoverflow.com/comment/39313088
score: 0
type: Comment
type: QuestionComment
has text: see this example : http://api.jquery.com/visible-selector/
comment on: http://stackoverflow.com/q/25236112

http://stackoverflow.com/q/25377921
tagged with: javascript
linked to: http://stackoverflow.com/q/25279031
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/39576767
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/25378764
type: Question
answer count: 1
tagged with: css
has body: I've got 4 arcs of a circle which are generated using SnapSVG.js The problem is that between the upper arcs the gap is higher than the gap of lower arcs So my question is can I fix the gap between arcs and obtain a perfect circle using only CSS to cosistency with resize? This is a raw JS [I intend to clean it a bit] http://jsfiddle.net/LtLafp2r/ var canvasSize = 200, centre = canvasSize/2, radius = canvasSize*0.8/2, s = Snap('#svg'), path = "", arc = s.path(path), startY = centre-radius; var d = 0; var dr =0; radians = Math.PI*(dr)/180, endx = centre + radius*Math.cos(radians), endy = centre + radius * Math.sin(radians), largeArc = d&gt;180 ? 1 : 0; var s = Snap("#svg"); // Lets create big circle in the middle: path = "M"+centre+","+startY+" A"+radius+","+radius+" 0 "+largeArc+",1 "+endx+","+endy; var arc = s.path(path); // By default its black, lets change its attributes arc.attr({ stroke: '#3da08d', fill: 'none', strokeWidth: 25 });
upvote count: 3
linked to: http://stackoverflow.com/q/17460713
has title: It is possible to obtain a perfect svg circle from parts?
accepted answer: http://stackoverflow.com/a/25378764
linked to: http://stackoverflow.com/q/25319325

http://stackoverflow.com/q/25272228
type: UnansweredQuestion
answer count: 0
tagged with: forms
type: Question
has comment: http://stackoverflow.com/comment/39380344
has comment: http://stackoverflow.com/comment/39380291
has comment: http://stackoverflow.com/comment/39380313
has title: One Javascript Control Multiple Form Submission
tagged with: javascript
has body: I am trying to build a page with multiple forms submitting different values to another php script "another-script.php" using Javascript as shown below: The forms should be able to submit different values by themselves but when using Javascript to submit to a different script "another-script.php", only the first form works. Would you please kindly advise what I should do to make each form submitting their own values. Thank you very much!
score: 0
has comment: http://stackoverflow.com/comment/39384228

http://stackoverflow.com/q/25282826
tagged with: google-maps
accepted answer: http://stackoverflow.com/a/25304779
has title: How can I change the coordinates for the iframe google map to print different results depending on the coordinates passed
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39439671
has comment: http://stackoverflow.com/comment/39405830
tagged with: angularjs
type: AnsweredQuestion
tagged with: iframe
has comment: http://stackoverflow.com/comment/39438962
upvote count: 1
has answer: http://stackoverflow.com/a/25304779
downvote count: 1
type: Question
has body: I have managed to create a page where a user can click and change access the google maps using the following code. Coordinates: {{place.place.lat}},{{place.place.lng}} Also, this is an angularjs app. Now I want to embed this map on my application with the same concept of changing the latitude and longitude when the user clicks on different places to show where that particular place. How can I do this? I have looked into iframe, but I can only use the fixed coordinates.
tagged with: javascript
has comment: http://stackoverflow.com/comment/39439316
score: 0

http://stackoverflow.com/comment/39556441
has text: I agree with j08691, we need to see some HTML
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25367836

http://stackoverflow.com/comment/39371179
score: 0
type: Comment
type: QuestionComment
has text: `console.log('innnnn' + $(this).html);` <<--- missing `()`? is it returning `null`??
comment on: http://stackoverflow.com/q/25267468

http://stackoverflow.com/comment/39360919
has text: Thanks mate , i am trying this change now . Will keep posted. :)
comment on: http://stackoverflow.com/a/25261586
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/25252594
accepted answer of: http://stackoverflow.com/q/25252518
answers question: http://stackoverflow.com/q/25252518
has body: You'll need to execute this code in separate statements (execute your last line after the second page loads). Also, it may help to right-click in the console and choose "Preserve log upon navigation". If you take this code out of the console, it won't work. You may be able to load the new page in an &lt;iframe&gt; and run the javascript against the document in the frame.
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/128993416

http://stackoverflow.com/a/25303805
has body: You can directly put formatted value in .val(). And use id selector $('#sum') instead of $('input#sum') directly, but make sure that you have unique id through out the html page. $('#sum').blur(function() { $(this).val(formatNumber($(this).val())); });
has comment: http://stackoverflow.com/comment/39438823
answers question: http://stackoverflow.com/q/25303720
has comment: http://stackoverflow.com/comment/39438553
has comment: http://stackoverflow.com/comment/39438591
score: 0
type: Answer

http://stackoverflow.com/q/25246843
has body: I was just wondering why the following code results in the value of 7 (august) on my node.js box, but not on my browser. new Date(1378008000 * 1000).getMonth() Is it not assuming Unix Epoch GMT timezone? What timezone would it be assuming and how should I be handling things like this? Thanks.
downvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39333039
tagged with: node.js
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/25247024
accepted answer: http://stackoverflow.com/a/25247024
has title: Node.js Date Timezones and getMonth()
type: Question
tagged with: javascript
score: -1
tagged with: date

http://stackoverflow.com/q/25309879
accepted answer: http://stackoverflow.com/a/25310101
tagged with: dart-js-interop
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has body: What is the Dart equivalent of Jquery getScript (to load javascript from Dart) ? http://api.jquery.com/jquery.getscript Thanks for your suggestions.
tagged with: dart
has answer: http://stackoverflow.com/a/25310101
score: 2
type: AnsweredQuestion
upvote count: 2
type: Question
has title: What is the dart equivalent of getScript

http://stackoverflow.com/comment/39367587
comment on: http://stackoverflow.com/a/25265515
type: AnswerComment
has text: I just need to create the regex I wrote above... Even if it is a bad idea. Thanks
score: 0
type: Comment

http://stackoverflow.com/q/25376674
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25378248
tagged with: node.js
score: 1
upvote count: 1
type: Question
tagged with: javascript
has body: I have a rest api that receives files.Each file that my node-application stores in the local storage is added to a xml &amp; json document. How can I prevent, that the app doesn't write two files at almost the same time in the document, what would cause an invalid document. At the moment I put all files into an array and store only the last one from the array. That prevents that the xml/json documents are only accessed once. this.files = new Array(); this.running = false; this.app.push('/file', function(req, res){ this.files.add(req.body.file); if(!this.running) this.storeFile(); } this.storeFile = function(){ this.running = true; fs.write(files[files.length-1], this.succ, this.err); this.succ(){ files.splice(fileIndex); if files.length greater than 0 app.storeFile(); else this.running = false; } This doesn't prevent, that several files are written at the same time. If running = false and two push events come in at almost the same time. The loop is executed twice and each file is stored twice. And the xml/json file is accessed/opened/written twice which causes an error/exception.
has title: NodeJS prevent multiple access on file
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/25305400
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I am using the jQuery Validate plugin, and I've encountered a problem. Whenever someone writes something in the field, and the field gets validated with no errors, the "error-message box" is still shown. My question is, how can I remove this box? This is my code: CSS: .register-box .field .has-error{ border: 1px solid red !important; } .register-box .field .has-error.success { border:none !important; } .register-box .field .has-success{ border: 1px solid #42CDA1 !important; background: #EEFBF7 !important; color: black !important; border-bottom: 0px !important; } .register-box .success > .error{ border: 1px solid #42CDA1 !important; } .register-box .field .valid{ border: 1px solid #42CDA1 !important; } .register-box .error{ margin-left: 200px !important; float: left; width: 150px; max-width: 150px; text-align: left; color: red; background: red; color: white; font-weight: bold; font-size: 11px; -webkit-font-smoothing: antialiased; font-smooth: always; -moz-osx-font-smoothing: grayscale; padding: 5px 7px; } jQuery: $('#myform').validate({ debug: true, errorClass: "has-error", errorElement: "div", errorContainer: $("#warning, #summary"), errorPlacement: function (error, element) { var name = $(element).attr("name"); error.appendTo($("#" + name + "_validate")); $("#" + name + "_validate").addClass('error'); }, /*errorPlacement: function(error, element) { error.appendTo("#errorHolder"); },*/ success: function(label,element) { label.hide(); //var parent = $('.success').parent().get(0); // This would be the 's parent . //$(parent).addClass('has-success'); }, rules: { username: { required: true }, email: { required: true, minlength: 5 } }, highlight: function(element, errorClass) { $(element).addClass(errorClass); }, messages: { firstname: "Enter your firstname", lastname: "Enter your lastname", username: { required: "Enter a username", minlength: jQuery.format("Enter at least {0} characters"), remote: jQuery.format("{0} is already in use") } }, submitHandler: function (form…
upvote count: 9
has comment: http://stackoverflow.com/comment/39450475
has title: Remove error class when success in jQuery Validate
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39441825
tagged with: jquery-validate
type: Question
score: 9
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25306887
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25306887
favorite count: 0

http://stackoverflow.com/comment/39391883
type: QuestionComment
comment on: http://stackoverflow.com/q/25278600
score: 0
has text: Where do you define `ajaxurl`? Is it empty or 0?
type: Comment

http://stackoverflow.com/comment/39438197
type: QuestionComment
comment on: http://stackoverflow.com/q/25303340
has text: The question is: how can I execute the toggle menu for every DIV?
type: Comment
score: 0

http://stackoverflow.com/q/25356419
score: 1
tagged with: github
favorite count: 0
has title: Strider Build with JsHint reports 'Not a pull request. Skipping JSHint'
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: javascript
has body: I have a build in Strider and have just integrated JsHint inot the build. When running the build Strider reports 'Not a pull request. Skipping JSHint' Any ideas on what could be causing this message? Thanks, Nick
type: Question
tagged with: jshint
tagged with: continuous-delivery
downvote count: 0

http://stackoverflow.com/comment/39408021
type: Comment
type: QuestionComment
has text: What element do you think is assigned to `table`?
score: 1
comment on: http://stackoverflow.com/q/25287227

http://stackoverflow.com/comment/39421505
type: Comment
comment on: http://stackoverflow.com/a/25293725
type: AnswerComment
has text: @lowcoupling sadly bootstrap offers no support for 3rd party plugins, so they might have conflicting CSS.
score: 0

http://stackoverflow.com/q/25298533
score: 15
tagged with: angularjs
answer count: 3
has body: I am trying to pass parameters via the ui-router state.go However, I am not sure how to pass the parameters. Here are my codes app.config(function($stateProvider) { $stateProvider .state('first', { url: '/first', templateUrl: 'first.html' }) .state('second', { url: '/second', templateUrl: 'second.html' }) }) //my first.html app.controller.('firstCtrl' ,["$scope", "$state", function($scope, $state){ $scope.userInput &lt;- come from user $scope.clickThis=function() { $state.go("second", $scope.userInput); } }]); //my second.html app.controller.('secondCtrl,["$scope", "$state", function($scope, $state){ //How do I get the parameter that is passed to here.. }) I can redirect the page to second.html but I can't seem to get the parameter that is passed to my secondCtrl. Can anyone help me about it? Thanks.
has answer: http://stackoverflow.com/a/33573441
has answer: http://stackoverflow.com/a/25298571
upvote count: 15
type: AnsweredQuestion
has title: How to pass parameter when I redirect the page in angularjs using ui router?
possible better answer: http://stackoverflow.com/a/25298573
downvote count: 0
tagged with: angular-ui
tagged with: javascript
has answer: http://stackoverflow.com/a/25298573
favorite count: 0
accepted answer: http://stackoverflow.com/a/25298571
type: Question

http://stackoverflow.com/q/25386613
has comment: http://stackoverflow.com/comment/39602073
has comment: http://stackoverflow.com/comment/39593011
has comment: http://stackoverflow.com/comment/39594130
has comment: http://stackoverflow.com/comment/39600524
has comment: http://stackoverflow.com/comment/39600381
has comment: http://stackoverflow.com/comment/39593186
has comment: http://stackoverflow.com/comment/39600618
answer count: 0
has comment: http://stackoverflow.com/comment/39592484
type: UnansweredQuestion
has title: jQuery .validate : Make a field required unless a false returned from remote
has comment: http://stackoverflow.com/comment/39592835
has comment: http://stackoverflow.com/comment/39601733
has comment: http://stackoverflow.com/comment/39592989
has comment: http://stackoverflow.com/comment/39594462
has comment: http://stackoverflow.com/comment/39592399
has comment: http://stackoverflow.com/comment/39593768
has comment: http://stackoverflow.com/comment/39594288
type: Question
has comment: http://stackoverflow.com/comment/39601158
linked to: http://stackoverflow.com/q/24891764
has comment: http://stackoverflow.com/comment/39600324
has comment: http://stackoverflow.com/comment/39592571
has comment: http://stackoverflow.com/comment/39592768
tagged with: javascript
tagged with: jquery
tagged with: jquery-validate
has body: My mission is to make a field a required field, but if a ajax/remote call returns a false then to cancel that required field order. I have been playing about for days now trying to solve this. I have tried using depends in many different ways, and initially used this example but could not get it to work - https://github.com/jzaefferer/jquery-validation/issues/431 (that example won't even try and look at the remote code for some reason) Been trying to strip back my code just to gain an understanding of how depends works. HTML: FORENAME JQUERY: function register() { var cancel_validation = 0; // Dont cancel validation var form = $("#register_employee_form"); var validator = form.validate({ errorElement: "p", rules: { forename: { required: true, remote: { url: "ajax_code.php", complete: function(response) { if (response.responseText == "false") { cancel_validation = 1; } } // complete }, // remote depends: function() { if(cancel_validation == 1) { return false; } } } // forename }, messages: { forename: { required : "forename required", remote : "REMOTE" } }, submitHandler: function(form) { form.submit(); } }); validator.form(); } ajax_code.php: For now just a simple echo of false or true for testing <?php echo "true"; // return false if OK ?> So if the remote response returns a false, then no validation is done, but if it returns a true then validation is done. Hope this make some sense. Quite hard getting across what I am trying to achieve and what I have tried so far. Any ideas and help gratefully received.
has comment: http://stackoverflow.com/comment/39601724
score: 0
has comment: http://stackoverflow.com/comment/39592261
has comment: http://stackoverflow.com/comment/39601226
has comment: http://stackoverflow.com/comment/39594336
has comment: http://stackoverflow.com/comment/39601137
has comment: http://stackoverflow.com/comment/39593120
tagged with: depends

http://stackoverflow.com/comment/39577026
score: 0
has text: Hmmm... having some trouble with the formatting in the comments, but if you check out the CodePen it's all in there: http://codepen.io/Realto619/pen/mqKlB
type: Comment
comment on: http://stackoverflow.com/a/25377112
type: AnswerComment

http://stackoverflow.com/q/25287174
has comment: http://stackoverflow.com/comment/39407427
tagged with: javascript
has body: I'm fairly new to programming and JS so I would like some pointers in terms of how I would go about this. I want to use that code for multiple instance of toggle per page. I want by default table only shows 3 rows and when some click on view more it shows the rest of the rows and it should be toggle on click $(document).ready(function(){ // toggle rows $( ".viewSection a" ).click(function() { var $self = $(this); var $nextUl = $self.parent().next(); $(this).parent().next().slideToggle("fast"); }); }) HTML: TOTAL BACKLOG: 20 Lotus Greens Enviro City 15 Lotus Greens Enviro City 15 TOTAL BACKLOG: 30 Gaursons Yamuna City Plots 15 Gaursons Yamuna City Plots 15 Gaursons Yamuna City Plots 15 Gaursons Yamuna City Plots 15 Gaursons Yamuna City Plots 15 Gaursons Yamuna City Plots 15 Gaursons Yamuna City Plots 15 Gaursons Yamuna City Plots 15 Gaursons Yamuna City Plots 15 view more JSfiddle: http://jsfiddle.net/s9L128g9/ I don't want to have to work with manually adding separate IDs to the JS to activate the toggle. All I want to do is have multiple toggle areas on the same page, and use a class in the JS to work them all.
score: 0
has comment: http://stackoverflow.com/comment/39407667
answer count: 3
accepted answer: http://stackoverflow.com/a/25288853
has comment: http://stackoverflow.com/comment/39407788
tagged with: jquery
has answer: http://stackoverflow.com/a/25287413
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25287413
has title: How to do show/hide of table rows multiple times per page?
has answer: http://stackoverflow.com/a/25287827
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/17254379
has answer: http://stackoverflow.com/a/25288853
type: Question

http://stackoverflow.com/comment/39529013
comment on: http://stackoverflow.com/q/25353154
score: 1
type: QuestionComment
type: Comment
has text: http://jsfiddle.net/digiman07/ekzfz9ck/1/show/ ?

http://stackoverflow.com/a/25265262
score: 0
type: Answer
has body: Do you have to use jQuery? Can you not make the delete button a submit type? Or: Delete
has comment: http://stackoverflow.com/comment/39403209
answers question: http://stackoverflow.com/q/25264806

http://stackoverflow.com/a/25484228
accepted answer of: http://stackoverflow.com/q/25314082
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: Once again, the answer arrived during sleep.. :-) Firstly, use of display: inline; on block-level elements seems not, at least in this situation, have the effect on width claimed by some bloggers (in fact tends to pollute the parent flex context). This in turn led to a search for alternative inline elements to replace div or section. On substituting the inline element span in place of the block-level elements div or section, the desired nowrap behaviour immediately took effect, but in turn knocked out my (now local) vertical block layout. This was restored using display:inline-block; on the containing span, so: originally (somewhat simplified): ---------- header / div--- svg:g -- svg:svg (with overflow:hidden;) \ ---------- user text input area ..which, despite a parent nowrap directive, was caused to wrap by the div (or other block-level) element. now: ---------- header / span-- svg:g -- svg:svg (with path extents matching those of svg:svg container) \ ---------- user text input area ..whereby span has the css display:inline-block; directive set on it and a width specified. Here, the parent flex nowrap directive was adhered to, but locally (ie inside the span) the block layout is applied.
has comment: http://stackoverflow.com/comment/39773989
answers question: http://stackoverflow.com/q/25314082
downvote count: 0
score: 1

http://stackoverflow.com/comment/39507174
type: Comment
comment on: http://stackoverflow.com/a/25340275
type: AnswerComment
score: 0
has text: Many ways to skin a cat

http://stackoverflow.com/q/25246565
accepted answer: http://stackoverflow.com/a/25246803
tagged with: ember.js
has title: Return object as ember-model with matching key in array of JSON objects
has body: What I'm trying to accomplish is to return only one object to the model and loop through it's properties in a handlebars template. Thanx-a-Lot for any help! My response looks like this: {"U+554A":{ "id":1, "unihex":"U+554A", "num_reference":"&amp;#21621;", "totalStrokes":10, "kMandarin":"a\n", "kDefinition":"exclamatory particle\n"}, "U+611B":{ "id":2, "unihex":"U+611B", "num_reference":"&amp;#24859;", "totalStrokes":13, "kMandarin":"\u00c3\u00a0i\n", "kDefinition":"love, be fond of, like\n"} } I tried everything. The most obvious being these two, just as a tryout, but the ember inspector shows no model is set: var sinograms = Ember.$.getJSON(apiurl); return sinograms['U+554A']; I also tried: var sinograms = Ember.$.getJSON(apiurl); return sinograms[0]; NB: I can change the response format if necessary. I know it works when I loose the object-keys (without "U+554A"), but then how do I select the matching character. @abuani: Upon your request. Thanx btw. //app.js App = Ember.Application.create(); App.Router.map(function() { this.resource('signup'); this.resource('login'); this.resource('profile'); this.resource('overview'); this.resource('practice'); }); App.OverviewRoute = Ember.Route.extend({ model: function() { var url = 'http://localhost/~hiufung/RoadToChinese/index.php/api/sinograms/random?limit=2'; var sinograms = Ember.$.getJSON(url); return sinograms; } }); //index.html (inline template) &lt;script type="text/x-handlebars" id="overview"&gt; &lt;header class="bar bar-nav"&gt; &lt;a class="icon icon-left pull-left" href="back"&gt;&lt;/a&gt; &lt;h1 class="title"&gt;RoadToChinese&lt;/h1&gt; &lt;a id="showRightPush" class="icon icon-gear pull-right" href="overview-settings"&gt;&lt;/a&gt; &lt;/header&gt; &lt;div class="content"&gt; &lt;div class="content-padded"&gt; {{#each object in model}} &lt;p&gt;{{object.num_reference}}&lt;p&gt; {{/each}} &lt;/div&gt; &lt;/div&gt; &lt;/script&gt;
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25246803
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39468227
comment on: http://stackoverflow.com/q/25319658
score: 0
type: Comment
has text: So are you trying to avoid api.init(), oauth.init()?
type: QuestionComment

http://stackoverflow.com/comment/39575739
comment on: http://stackoverflow.com/a/25370081
score: 0
type: AnswerComment
type: Comment
has text: Fascinating. Thank you very much for this enlightnening solution!

http://stackoverflow.com/a/25359842
has body: Your number: Submit form But at the end it depens on what you want to achieve. Hope i could help you a bit.
upvote count: 1
has comment: http://stackoverflow.com/comment/39541143
downvote count: 1
answers question: http://stackoverflow.com/q/25359765
score: 0
type: Answer

http://stackoverflow.com/comment/39414020
type: AnswerComment
comment on: http://stackoverflow.com/a/25289664
type: Comment
score: 1
has text: You need to convert the values to integers before performing arithmetic on them.

http://stackoverflow.com/a/25298549
score: 14
upvote count: 14
has body: As you've discovered, an ordinal scale doesn't have a ticks function to generate a set number of tick marks. Instead the axis object uses the entire set of values in the scale's domain to create the ticks. This makes sense in the general case, since can't always interpolate between the category values of an ordinal scale. As I've described it previously [The values for an ordinal scale] are assumed to be distinct categories, which might not have a natural order. They could be "apples", "oranges", and "bananas". There's no way to estimate a middle value ("oranges") based on the values of adjacent labels ("apples" and "bananas"), so by default all the labels are shown, even if they end up overlapping and unreadable. That said, in many cases the categories do have a natural order (true "ordinal" data instead of pure categorical data) and it does make sense to skip labels. To do that, you'll need to create your own function to generate the correct array of values to use (or hard code the array of labels if it will always be the same). Then use the axis object's .tickValues(array) function to explicitly set those tick values. For example, in the previously linked answer (which was actually a question about controlling the ticks on a linear scale), I showed how to use one of the d3 time interval range to generate the tick values. For your case, a method to filter the domain array based on index might work: var ticks = scale.domain().filter(function(d,i){ return !(i%10); } ); axis.tickValues( ticks ); Explanation: If scale is your ordinal scale, calling its domain() method with no parameters returns the array of all values. The standard array filter() method creates a new array that consists of only the elements that return true when passed to the filter function. i%10 (i modulo 10) returns 0 for index values that are multiples of 10. Taking the boolean not (!) of that result will return true for multiples of 10. This creates an array with only every 10th entry from your d…
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25296214
type: Answer
answers question: http://stackoverflow.com/q/25296214

http://stackoverflow.com/q/25236907
answer count: 0
upvote count: 3
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/9986226
type: Question
has comment: http://stackoverflow.com/comment/39314598
score: 3
has title: Text not fine when applying CSS scale effect?
has comment: http://stackoverflow.com/comment/39314913
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39314840
favorite count: 0
has comment: http://stackoverflow.com/comment/39314551
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39315046
has comment: http://stackoverflow.com/comment/39314819
has comment: http://stackoverflow.com/comment/39315079
has body: Fiddle : http://jsfiddle.net/d4hqjv3p/ I am trying to create text animate with css. when I use scale effect to text, it displaying blurry. But after finish the animation it will back to clear text. Code : 5 Script : function clickme() { $("div").addClass("scale"); }
tagged with: css
has comment: http://stackoverflow.com/comment/39314545
linked to: http://stackoverflow.com/q/9986226

http://stackoverflow.com/comment/39348821
comment on: http://stackoverflow.com/q/25254930
score: 0
has text: `step` ordinarily accept `now, tween` as parameters; should be able to find element and properties within `tween` object; track position of property with `now` . There is also a `progress` callback which could be utilized, see http://stackoverflow.com/questions/24555612/css3-js-get-position-of-element-during-animation/24556222#24556222
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39571461
comment on: http://stackoverflow.com/q/25356199
has text: Nvm, just see the answer :)
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25252777
score: 6
upvote count: 6
tagged with: phantomjs
has title: grunt-contrib-jasmine with PhantomJS, EJS templates and XMLHttpRequest Exception 101
linked to: http://stackoverflow.com/q/16826203
tagged with: unit-testing
type: Question
linked to: http://stackoverflow.com/q/2235929
has body: I'm trying to set up a basic unit test environment for a simple project, but I'm hitting a weird hurdle I have not been able to overcome after hours of research. For some reason, I am getting Error: NETWORK_ERR: XMLHttpRequest Exception 101 returned directly from EJS trying to load the template using XHR, but only once in a while. The case is simple, I have a backbone application instantiating a backbone view that renders an EJS template. This looks like so : BackboneView = Backbone.View.extend({ initialize: function() { this.template = new EJS({url: '/app/views/root/root.template.ejs'}); } }); To setup grunt-contrib-jasmine, I have the following snippet in my Gruntfile : jasmine: { cms: { src: "app/**/*.js" options: { specs: "tests/fe/spec/*Spec.js", vendor: [ "vendor/jquery/dist/jquery.js", "vendor/underscore/underscore.js", "vendor/backbone/backbone.js", "vendor/ejs/ejs.js", ], keepRunner : true, outfile : "tests/fe/_SpecRunner.html", host : "http://0.0.0.0:8000" } } } I'm able to run my test suite most of the time : $ grunt jasmine Running "jasmine:cms" (jasmine) task Testing jasmine specs via PhantomJS log: came in request!, /app/views/root/root.template.ejs log: 200 log: /app/views/root/root.template.ejs website.header header.test() - test should return 10... log: ✓ test should return 10 1 spec in 0.008s. &gt;&gt; 0 failures Done, without errors. But every now and then, I will get the console spitting this at me : $ grunt jasmine Running "jasmine:cms" (jasmine) task Testing jasmine specs via PhantomJS log: came in request!, /app/views/root/root.template.ejs log: ERROR in request, Error: NETWORK_ERR: XMLHttpRequest Exception 101 log: /app/views/root/root.template.ejs &gt;&gt; Error caught from PhantomJS. More info can be found by opening the Spec Runner in a browser. Warning: There is no template at /app/views/root/root.template.ejs Use --force to continue. Aborted due to warnings. The logs were added in the relevant part of the EJS engine to help me debug. Tha…
tagged with: javascript
tagged with: ejs
linked to: http://stackoverflow.com/q/15913170
downvote count: 0
favorite count: 0
tagged with: grunt-contrib-jasmine
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/25339360
has comment: http://stackoverflow.com/comment/39539449
answers question: http://stackoverflow.com/q/25339278
score: 0
has comment: http://stackoverflow.com/comment/39537785
type: AcceptedAnswer
has body: You are on the right track. UI Router is best to handle such scenarios. The only issue in your code is that when you want to open some view in a certain named block you have to explicitly specify the name of the block in which the view should get attached. Your code should be modified as below: &lt;div ui-view="carosel_viewer" class="carosel_viewer"&gt;&lt;/div&gt; views: { 'carosel_viewer': { 'url': 'home', 'templateUrl: 'templates/home.html', }, } Not tested though the above but something similar should work for you. You can read more here: https://github.com/angular-ui/ui-router/wiki/Multiple-Named-Views Hope it helps :)
type: Answer
has comment: http://stackoverflow.com/comment/39510415
has comment: http://stackoverflow.com/comment/39537760
has comment: http://stackoverflow.com/comment/39506119
accepted answer of: http://stackoverflow.com/q/25339278

http://stackoverflow.com/comment/39365188
type: Comment
has text: No error appears. It just doesn't seem to run the script under HTTPS environment.
comment on: http://stackoverflow.com/q/25263490
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39313942
score: 0
type: Comment
type: QuestionComment
has text: You can add one more attribute to the menu item. Add `data-Id` and assign it the id for that menu. Now in selection you will get selected menu and from there you can get value for this attribute. Let me know if you need help with code.
comment on: http://stackoverflow.com/q/25236615

http://stackoverflow.com/comment/39576654
score: 0
has text: Why are you wrapping StringUtils in IIFE?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25378432

http://stackoverflow.com/comment/39401616
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25284012
has text: How about you just iframe example.html? If not you will need to emulate all te js endpoints on localhost and parse them through to the remote site in php
score: 0

http://stackoverflow.com/comment/39387699
has text: Hmm, some deep thinking here. Want to work at ECMAScript?
comment on: http://stackoverflow.com/q/25276315
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25325727
has comment: http://stackoverflow.com/comment/39482020
has comment: http://stackoverflow.com/comment/39481626
has comment: http://stackoverflow.com/comment/39480743
upvote count: 2
has body: Ajax Cannot figure out how to add a link to add another field to the form on the fly The "Rails way" of doing that is to "pull" a new instance of the fields_for block from an ajax request. The reason why Ajax is recommended is because it's the "Rails way" to do it - completely modular &amp; extensible: #config/routes.rb resources :exercises do get :add_field, on: :collection end #app/models/exercise.rb Class Exercise &lt; ActiveRecord::Base ... def self.build #-&gt; allows you to call a single method exercise = self.new exercise.exercise_equipment.build exercise.exercise_muscles.build return end end #app/controllers/exercises_controller.rb Class ExercisesController &lt; ApplicationController def add_field @exercise = Exercise.build respond_to do |format| format.html format.js end end end #app/views/exercises/new.html.erb &lt;%= form_for @exercise do |f| %&gt; &lt;%= render "fields", locals: { f: f } %&gt; &lt;%= f.submit %&gt; &lt;% end %&gt; #app/views/exercises/add_field.js.erb $("#form_element").append("&lt;%=j render "exercises/form", locals: { exercise: @exercise } %&gt;"); #app/views/exercises/_form.html.erb &lt;%= form_for exercise do |f| %&gt; &lt;%= render "fields", locals: { f: f } %&gt; &lt;% end %&gt; #app/views/exercises/_fields.html.erb &lt;%= f.fields_for :exercise_muscles, child_index: Time.now.to_i do |emf| %&gt; &lt;%= emf.collection_select :muscle_id, Muscle.all, :id, :name, { include_hidden: false } %&gt; &lt;% end %&gt; &lt;%= link_to "New Field", exercises_add_fields_path, remote: :true %&gt; &lt;%= f.fields_for :exercise_equipment, child_index: Time.now.to_i do |eef| %&gt; &lt;%= eef.collection_select :equipment_id, Equipment.all, :id, :name, { include_hidden: false } %&gt; &lt;%= eef.check_box :optional %&gt; Optional &lt;% end %&gt; &lt;%= link_to "New Field", exercises_add_fields_path, remote: :true %&gt; This will give you the ability to create the fields through an ajax call; which is the correct way to do it
has comment: http://stackoverflow.com/comment/39480894
has comment: http://stackoverflow.com/comment/39481665
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25319017
has comment: http://stackoverflow.com/comment/39481886
type: Answer

http://stackoverflow.com/a/25287670
score: 0
type: Answer
has body: You can add and remove HTML elements using JavaScript/jQuery. An example of removing one would would look like this, $("#foo").remove(); This will get the HTML element that has an id of foo, then remove the element entirely. And to add an element you can get the parent element of the element you want and call append, $("#outerFoo").append('&lt;div id="foo"&gt;&lt;/div&gt;');
answers question: http://stackoverflow.com/q/25287524
has comment: http://stackoverflow.com/comment/39409156

http://stackoverflow.com/comment/39364763
score: 0
has text: which should i include ?
type: AnswerComment
comment on: http://stackoverflow.com/a/25263941
type: Comment

http://stackoverflow.com/q/25265119
downvote count: 0
accepted answer: http://stackoverflow.com/a/25265509
tagged with: javascript
favorite count: 0
tagged with: rest
upvote count: 6
tagged with: node.js
score: 6
possible better answer: http://stackoverflow.com/a/25266458
has answer: http://stackoverflow.com/a/25266458
has answer: http://stackoverflow.com/a/25265509
type: AnsweredQuestion
has title: Is an outer array valid JSON for a REST api?
has body: When using MongoDB with Mongoskin in a Node.js webb app I can run .find() on a collection to fetch all its document. The result is a mongodb cursor. This cursor is then converted to an Array with the cursors .toArray() method. [ { _id: "53ea101656cb0c0407306405", key: "value", ... }, { _id: "53ea101656cb0c0407306405", key: "value", ... }, ... ] But is this a valid JSON output for a REST Api?... or should i convert the outer array to an object? Maybe it doesn't matter?
has answer: http://stackoverflow.com/a/25265750
type: Question
answer count: 3

http://stackoverflow.com/comment/39437105
type: QuestionComment
score: 0
has text: You have kept input type as `button` so, on clicking it should not submit your form!! And you have scripted for `.submit` of form!!
comment on: http://stackoverflow.com/q/25302784
type: Comment

http://stackoverflow.com/comment/39503030
comment on: http://stackoverflow.com/a/25338047
has text: Thanks. In IE10 it's not as expected :( Please, see screenshot: https://copy.com/H4xL0wT2aX8G79YV
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25271556
has comment: http://stackoverflow.com/comment/39424162
has comment: http://stackoverflow.com/comment/39389924
answer count: 1
has comment: http://stackoverflow.com/comment/48691243
has comment: http://stackoverflow.com/comment/39494804
has title: Javascript Changing Firefox Proxy
tagged with: imacros
linked to: http://stackoverflow.com/q/22743604
has answer: http://stackoverflow.com/a/25379265
upvote count: 3
has comment: http://stackoverflow.com/comment/48847475
has body: I am trying to do what the title says and have been searching on here for a while now and I found a solution which looks viable. Only issue is the requre() function is not recognized. Now I am unsure, do I need to update java, firefox, or iMacros to fix this. As well I am not sure if I made an error in my code. For the code to follow know that there is an object for the proxies that separates proxy from port. var scope = {}; Components.utils.import("resource://imacros/utils.js", scope); Components.utils.import("resource://imacros/rijndael.js", scope); Components.utils.import("resource://gre/modules/ctypes.jsm", scope); var prefsvc = require("sdk/preferences/service"); prefsvc.set("network.proxy.http", proxy[j].ip); prefsvc.set("network.proxy.http_port", proxy[j].port); prefsvc.set("network.proxy.type", 1); What do you guys think the problem could be?
tagged with: firefox
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
favorite count: 0
tagged with: proxy
has comment: http://stackoverflow.com/comment/48848974
type: Question
score: 3
has comment: http://stackoverflow.com/comment/39407743

tinymce
tags question: http://stackoverflow.com/q/25283836
tag name: tinymce
type: Tag
tags question: http://stackoverflow.com/q/25351442
tags question: http://stackoverflow.com/q/25316657
tags question: http://stackoverflow.com/q/25317500
tags question: http://stackoverflow.com/q/25273183
tags question: http://stackoverflow.com/q/25319955

http://stackoverflow.com/comment/39438421
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25303720
has text: You only have one selector there and two DOMElement to jQuery set converts. Anyway, why do you want to shorten it?
type: QuestionComment

http://stackoverflow.com/comment/39386379
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25275096
has text: I'm not sure if I added the code correctly, but from what I'm seeing the code did not work, the quantity stopped working. I need coffee.. http://jsfiddle.net/e2p51y8j/ @Basic

http://stackoverflow.com/comment/39511935
has text: Great comments, I've updated my answer with all of these clarifications. Thanks @Volune.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25343184

viewmodel
tags question: http://stackoverflow.com/q/25304166
tag name: viewmodel
type: Tag
tags question: http://stackoverflow.com/q/25307143

http://stackoverflow.com/comment/39478838
comment on: http://stackoverflow.com/q/25324418
has text: also what might be the cases when the session variable does not contain the key?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25330630
has comment: http://stackoverflow.com/comment/39512466
answers question: http://stackoverflow.com/q/25328622
has comment: http://stackoverflow.com/comment/118449238
score: 18
has body: Some years ago I did exactly that. You can have a look at the code here: https://mrdoob.github.io/omggif-example/
type: Answer
has comment: http://stackoverflow.com/comment/104895648
upvote count: 22
downvote count: 4

http://stackoverflow.com/a/25313041
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39456259
type: Answer
answers question: http://stackoverflow.com/q/25312970
has comment: http://stackoverflow.com/comment/39455774
accepted answer of: http://stackoverflow.com/q/25312970
has comment: http://stackoverflow.com/comment/39455904
has body: function MyClass () { this.text = ""; this.characters = []; } MyClass.prototype.printText = function () { console.log(this.text); }; MyClass.prototype.printLen = function () { console.log(this.characters.length); }; var instance = new MyClass(); instance.text = "test"; instance.characters.push('a'); instance.characters.push('b'); instance.printText(); instance.printLen();
has comment: http://stackoverflow.com/comment/39455739
has comment: http://stackoverflow.com/comment/39455693
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39455979
upvote count: 1

http://stackoverflow.com/comment/39496565
has text: Spot on. Though I can't remember that I ever needed to break or continue to an outer loop. Usually it's much clearer to restructure your code into smaller functions so you can use return instead.
type: Comment
score: 2
comment on: http://stackoverflow.com/a/25334362
type: AnswerComment

http://stackoverflow.com/q/25345108
has body: I am trying to swap first and last characters of array.But javascript is not letting me swap. I don't want to use any built in function. function swap(arr, first, last){ var temp = arr[first]; arr[first] = arr[last]; arr[last] = temp; }
has answer: http://stackoverflow.com/a/25345144
has answer: http://stackoverflow.com/a/69614508
has title: Why can't I swap characters in a javascript string?
has answer: http://stackoverflow.com/a/69608273
type: UnansweredQuestion
upvote count: 21
has comment: http://stackoverflow.com/comment/39514990
has answer: http://stackoverflow.com/a/25345121
score: 21
type: Question
tagged with: arrays
downvote count: 0
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/49315012
has answer: http://stackoverflow.com/a/25345183
favorite count: 0

http://stackoverflow.com/q/25283821
downvote count: 0
tagged with: javascript
score: 1
has body: I'm new to Jade template. Here is the layout.jade: html head meta(charset='UTF-8') title MyApplication meta(content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no', name='viewport') link(href='/bootstrap/dist/css//bootstrap.min.css', rel='stylesheet', type='text/css') body block content script(src='http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js') script(src='/bootstrap/dist/js/bootstrap.min.js', type='text/javascript') As you see, there are two javascript at the end of the template file. My another jade file, home.jade is: extends layout block content // Content Header (Page header) section.content-header h1= title // Main content section.content script(type='text/javascript'). $(function() { alert('here!'); } The javascript related to this file is at the end of the file. Unfortunately the block content is embedded inside the layout.jade so that the script here is loaded before the jQuery. The code will never be called. Is there any way to solve this problem to make sure the javascript here is loaded after the jQuery? Thanks
has comment: http://stackoverflow.com/comment/39401102
tagged with: pug
type: AnsweredQuestion
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/25284185
upvote count: 1
answer count: 1
has title: How to ensure the javascript is at the bottom of the code in Jade template?
has comment: http://stackoverflow.com/comment/39401362
accepted answer: http://stackoverflow.com/a/25284185

http://stackoverflow.com/q/25230645
accepted answer: http://stackoverflow.com/a/25230998
favorite count: 0
upvote count: 1
tagged with: php
type: AnsweredQuestion
downvote count: 1
tagged with: httprequest
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25230998
score: 0
has title: Ajax watch database for changes and execute code
has body: My goal is to more or less send out requests to a php file, giving it parameters like so; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script&gt; function onsubmit() { var id = $_SESSION['user']['id']; 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) { window.WhateverVariable = xmlhttp.responseText; } } xmlhttp.open("GET","clientrequest.php?id="+id,true); xmlhttp.send(); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/html&gt; and keep sending out requests untill my php script returns x value, which will be passed into the window.WhateverVariable, and when the WhateverVariable is equal to 'x' I wish to execute some code; however, I can achieve this, but when the code is executed, the request is still going meaning the response text will be 'x' and will continuously destroy then re-execute the code, any way to get past this?
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/a/25280993
has body: &lt;input type="file" id="myFile" /&gt; try the following: //binds to onchange event of your input field $('#myFile').bind('change', function() { //this.files[0].size gets the size of your file. console.log(this.files[0].size); }); Old browsers support Be aware that old browsers will return a null value for the previous this.files call, so accessing this.files[0] will raise an exception and you should check for File API support before using it
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25280938

http://stackoverflow.com/q/25234745
accepted answer: http://stackoverflow.com/a/25243607
has comment: http://stackoverflow.com/comment/39311378
has title: List when sent to Controller from GSP is a String?
upvote count: 1
has body: I have a List of Strings built using Javascript on the client side which looks like this in the Javascript console: ["No address provided.", "No telephone number provided."] I send this to my Controller as one of the params from my GSP in an ajax call but the controller sees it like this: No address provided.,No telephone number provided. i.e. as a String (without square brackets). This is how I am sending my params: Save Any way so that the Controller will see it as a List and not a String?
has answer: http://stackoverflow.com/a/25238389
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25243607
score: 1
possible better answer: http://stackoverflow.com/a/25238389
has comment: http://stackoverflow.com/comment/39311442
tagged with: grails
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/39498565
comment on: http://stackoverflow.com/a/25335516
type: AnswerComment
type: Comment
has text: thanks for clearing up my confusion on how this code may be useful.
score: 0

http://stackoverflow.com/q/25231640
has body: I know very little, but... I have a function that checks userProperties variables before it runs each part of the code. That's cool. Right now I set userProperties at the top of the function, but what I want is to have check boxes in an HTML sidebar where the user can decide what they want to do. (once the user sets their preferences, I want that to persist to the next time they open that doc and not have the defaults over write it each time). My question is two-fold. What's a good way to have default settings in a script? and what I really really want to know: How do you hook up a checkbox to write to userProperties?
type: UnansweredQuestion
tagged with: google-docs
type: Question
tagged with: google-apps-script
tagged with: javascript
has title: Google Apps Script - good way to read and write user preferences from a sidebar
has answer: http://stackoverflow.com/a/25233025
score: 0
answer count: 1

http://stackoverflow.com/q/25384213
favorite count: 0
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/25385191
has body: I have an inheritance relationship between two JavaScript classes1 RealTimeChart = function(chartAttributes) { var chart = new FusionCharts(chartAttributes); this.appendData = function(data) { chart.feedData(data); } }; RealTimeGauge = function(chartAttributes) { chartAttributes.type = 'AngularGauge'; // call parent constructor RealTimeChart.call(this, chartAttributes); }; // inherit from RealTimeChart RealTimeGauge.prototype = Object.create(RealTimeChart.prototype); In RealTimeGauge I would like to override appendData(). The implementation of this function in RealTimeGauge needs to call the parent implementation, is this possible? It's relatively straightforward to do this if I change appendData to a prototype function, e.g. // parent class RealTimeChart.prototype.appendData = function(data) { this.chart.feedData(data); }; // child class RealTimeGauge.prototype.appendData = function(data) { console.log("doing custom stuff..."); // call the parent function to add the data to the chart RealTimeChart.prototype.appendData.call(this, data); }; However, if I make appendData a prototype function rather than a privileged function, I also have to make chart a public property, which I'd rather not do. Is it possible to call the parent implementation of appendData form RealTimeGauge if it's a privileged function? I know they're not really classes, but I don't know of a better name for them
has answer: http://stackoverflow.com/a/25385191
has answer: http://stackoverflow.com/a/25384635
accepted answer: http://stackoverflow.com/a/25384635
type: Question
has comment: http://stackoverflow.com/comment/39587520
score: 3
tagged with: oop
has title: calling parent implementations of privileged functions
tagged with: javascript
has comment: http://stackoverflow.com/comment/39587640
upvote count: 3
answer count: 2
has comment: http://stackoverflow.com/comment/39587986

http://stackoverflow.com/q/25238450
tagged with: javascript
has comment: http://stackoverflow.com/comment/39317297
has answer: http://stackoverflow.com/a/25238496
score: 0
has body: Im begginer in WebProgramming so maybe my questuion will seem naive to some of you. I want to run a simple JavaScript function without any click to implement a redirection. I try this: @inherits System.Web.WebPages.WebPage &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;meta name="viewport" content="width=device-width" /&gt; @Styles.Render("~/Content/css") @Scripts.Render("~/bundles/modernizr") @Scripts.Render("~/bundles/jquery") &lt;/head&gt; &lt;body&gt; &lt;a href="/OauthCallBack/GmailOAuthCallback"&gt;&lt;/a&gt; &lt;/body&gt; &lt;/html&gt; But it dosen't work. Any idea wat I am missing? Thank you in advance.
has title: How redirect to other page using HTML or JavaScript
has comment: http://stackoverflow.com/comment/39318240
has answer: http://stackoverflow.com/a/25238911
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25238496
has comment: http://stackoverflow.com/comment/39317423
has answer: http://stackoverflow.com/a/25238687
answer count: 4
tagged with: asp.net-mvc-4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39317337
has answer: http://stackoverflow.com/a/25238512
accepted answer: http://stackoverflow.com/a/25238512
type: Question

http://stackoverflow.com/comment/39449984
has text: Solid effort, but no dice. Any other ideas?
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25309848

http://stackoverflow.com/a/25287089
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25286943
downvote count: 0
answers question: http://stackoverflow.com/q/25286943
type: AcceptedAnswer
type: Answer
has body: Scroll function working properly... you do not add class off back to $('#head-nav')... i guess error in this line: $('#head-nav').removeClass('top clearfix on'); $('#head-nav').removeClass('top clearfix off'); //? add class not remove?

http://stackoverflow.com/a/25357026
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25356824
has body: The chaining is achieved by returning the same object. To have apply_style method in svg object you could do : svg.apply_style = function(){ this.attr("x", (width / 2)) .attr("y", 0 - (margin.top / 2)) .attr("text-anchor", "middle") .style("font-size", "16px") .style("text-decoration", "underline"); return this; //important }

http://stackoverflow.com/a/25235467
has body: Here's a generic image loader that preloads all your images and then calls start() // image loader // put the paths to your images in imageURLs[] var imageURLs=[]; // push all your image urls! imageURLs.push(""); // the loaded images will be placed in images[] var imgs=[]; var imagesOK=0; loadAllImages(start); function loadAllImages(callback){ for (var i=0; i&lt;imageURLs.length; i++) { var img = new Image(); imgs.push(img); img.onload = function(){ imagesOK++; if (imagesOK&gt;=imageURLs.length ) { callback(); } }; img.onerror=function(){alert("image load failed");} img.crossOrigin="anonymous"; img.src = imageURLs[i]; } } function start(){ // the imgs[] array now holds fully loaded images // the imgs[] are in the same order as imageURLs[] }
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/25235427
upvote count: 1

http://stackoverflow.com/comment/39519370
has text: It appears horizontal scrollbar for sidebar, and I cant move mouse to .hidden-nav )
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25345993

zeroclipboard
tags question: http://stackoverflow.com/q/25370065
tags question: http://stackoverflow.com/q/25358897
type: Tag
tag name: zeroclipboard

http://stackoverflow.com/comment/39452963
has text: So the garbage collection would be a bit more busy. But the other one holds on to the memory until the end-of-times. Not that it would be a lot of memory...
comment on: http://stackoverflow.com/q/25303925
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25355437
accepted answer of: http://stackoverflow.com/q/25355037
has body: CSS is case sensitive so Overflow wont work but overflow will. Try &lt;div style= "overflow:auto; max-height: 150px; width: 800px"&gt; to only apply croll bars if needed or: &lt;div style= "overflow:scroll; max-height: 150px; width: 800px"&gt; to always have scrollbars. Finally, avoid using inline style, apply it as a class instead.
answers question: http://stackoverflow.com/q/25355037
has comment: http://stackoverflow.com/comment/39534139
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39533383
downvote count: 0
score: 1

http://stackoverflow.com/comment/39432707
has text: Thanks it's works for me , and also thanks for Good Explanation with proper Example
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25300506

http://stackoverflow.com/q/25271524
has answer: http://stackoverflow.com/a/25272467
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/39379139
has body: So I'm having some issues with my cart. Some jQuery issues and I was wondering if someone could point me in the right direction. Thing is that I'm trying to make the cart more dynamic, if you check in a checkbox the item gets added to the cart and the total price and discount for that item is shown too. Just having trouble with the checkbox part. $(document).ready(function($){ $('#cart_listing .quantity').change(function (event) { $quan = $(this); console.log($quan.parent().next()[0]); $quan.parent().next().find('.price').text(function () { return $quan.val() * parseInt($(this).attr('data-val'), 10) + ' €'; }); var total = 0; $('#cart_listing .price').each(function(k, v){ total += parseFloat($(v).text(), 10); }); $('#cart_listing .faster').text(function () { faster = parseInt($(this).attr('data-val'), 10); return $(this).attr('data-val' + ' €'); }); var discount_pct = parseInt($("#cart_listing .discount").data("val"), 10); var discount = -(total * discount_pct/100); $('#cart_listing .discounted').text('-' + -discount + ' €'); $('#cart_listing #total').text(total + discount + faster + ' €') }); }); jsFiddle: http://jsfiddle.net/ooh43u6t/
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25272467
type: Question
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39379310
tagged with: javascript
tagged with: jquery
has title: Checkbox checked add to cart

http://stackoverflow.com/q/25325633
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39480312
has answer: http://stackoverflow.com/a/25471745
tagged with: ruby-on-rails
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39761675
type: Question
has comment: http://stackoverflow.com/comment/114075624
tagged with: javascript
has comment: http://stackoverflow.com/comment/39518356
has comment: http://stackoverflow.com/comment/114083263
has answer: http://stackoverflow.com/a/25356374
accepted answer: http://stackoverflow.com/a/25356374
answer count: 2
upvote count: 1
tagged with: seo
has title: How to make links inside ng-repeat indexable by SEO?
has comment: http://stackoverflow.com/comment/39500237
favorite count: 0
has body: I have code like this in the root page (e.g. http://www.example.com): url Each url is just a SEO-friendly-sub-url (e.g. http://www.example.com/pages/hello-world) I am aware that Google now executes Javascript (http://googlewebmastercentral.blogspot.no/2014/05/understanding-web-pages-better.html), but I still can't get those sub-urls being indexed (only the root page is indexed). How to make it indexable? If possible, the solution should not depend on third party services such as seo4ajax or prerendex.io
possible better answer: http://stackoverflow.com/a/25471745

http://stackoverflow.com/a/25275774
score: 19
answers question: http://stackoverflow.com/q/25275696
downvote count: 0
has comment: http://stackoverflow.com/comment/105942555
upvote count: 19
has body: For the date part:(month is 0-indexed while days are 1-indexed) var date = new Date('2014-8-20'); console.log((date.getMonth()+1) + '/' + date.getDate() + '/' + date.getFullYear()); for the time you'll want to create a function to test different situations and convert.
type: Answer
has comment: http://stackoverflow.com/comment/74299326

task
type: Tag
tags question: http://stackoverflow.com/q/25356057
tag name: task

http://stackoverflow.com/comment/39561087
comment on: http://stackoverflow.com/q/25370062
score: 0
type: QuestionComment
type: Comment
has text: Or appending it to an element outside the scroll area.

http://stackoverflow.com/q/25268861
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25268948
tagged with: jquery
has body: I have an index page that has jQuery loaded as well as a js file for a slider plugin. Then I'm using an on click event to use .load to load an external page, like this: //jQuery loaded from Google CDN here (in head) jQuery( document ).ready(function() { jQuery( ".button" ).click(function() { var myUrl = "/url-to-page"; jQuery( "#target-div" ).load(myUrl); }); }); This successfully loads the external page into #target-div, but the jQuery loaded on the index page does not fire on elements loaded from the external page. For example, I have some images (for the slider plugin) on the external page, but the slider plugin doesn't turn them into a slideshow as it would if I put those same images (inside a wrapper div) onto the index page directly. The external page does not any html, head, or body tags--only the content I want to load wrapped in some divs. Does anyone know the "trick" to making jQuery work on an externally loaded page?
tagged with: ajax
accepted answer: http://stackoverflow.com/a/25268948
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39373902
type: AnsweredQuestion
score: 0
has title: jQuery not working when page loaded via AJAX
upvote count: 1
has comment: http://stackoverflow.com/comment/39373958
downvote count: 1

http://stackoverflow.com/q/25272068
has comment: http://stackoverflow.com/comment/39380097
has comment: http://stackoverflow.com/comment/39380173
type: Question
accepted answer: http://stackoverflow.com/a/25272202
downvote count: 5
tagged with: javascript
answer count: 2
upvote count: 0
has comment: http://stackoverflow.com/comment/39380026
favorite count: 0
possible better answer: http://stackoverflow.com/a/25272524
has answer: http://stackoverflow.com/a/25272202
has answer: http://stackoverflow.com/a/25272524
has comment: http://stackoverflow.com/comment/39382467
has body: I have an array like this: var winArray = [ [1, 2, 3], [4, 5, 6], [7, 8, 9], [1, 4, 7], [2, 5, 8], [3, 6, 9], [1, 5, 9], [7, 5, 3] ]; And another array like this: var Xarray = [1,2,3] How can I check that the first array's index 0 contains my second array? Another issue is that the value order should not be regarded during the compression
linked to: http://stackoverflow.com/q/7837456
has comment: http://stackoverflow.com/comment/39379997
type: AnsweredQuestion
score: -5
has title: How to check if array keys exist in multidimensional array?

http://stackoverflow.com/a/25366246
score: 1
upvote count: 1
has body: Javascript executes on a single thread. Alert boxes interrupt that thread, causing it to hang until the user closes it. See this jsFiddle for an example. &lt;div id="messages"&gt; &lt;/div&gt; &lt;script&gt; alert('test'); $('#messages').text( 'alert is done!' ); &lt;/script&gt; What's likely happening is that you have some Javascript which is reloading portions of the page. IE is executing things in a particular order, and Chrome and Firefox are doing things in a slightly different order (or are doing things faster/slower). So in IE, the page underneath has finished (or not started) loading/reloading while in Chrome and Firefox the page is in the middle of loading/reloading. Unfortunately, there's no simple solution to this... any answer will involve changing your Javascript a bit. I'd recommend using something like blockUI and then showing things like alerts after a timeout (to give other parts of your Javascript a chance to finish).
downvote count: 0
answers question: http://stackoverflow.com/q/25366038
type: Answer

http://stackoverflow.com/q/25287676
has answer: http://stackoverflow.com/a/25287817
possible better answer: http://stackoverflow.com/a/25287810
has answer: http://stackoverflow.com/a/25287801
has title: How to change just the text after the bold tag?
has answer: http://stackoverflow.com/a/25287810
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25288722
accepted answer: http://stackoverflow.com/a/25287801
has comment: http://stackoverflow.com/comment/39408696
has answer: http://stackoverflow.com/a/25287857
type: Question
has comment: http://stackoverflow.com/comment/39408731
tagged with: javascript
answer count: 6
tagged with: jquery
has comment: http://stackoverflow.com/comment/39408437
score: 0
linked to: http://stackoverflow.com/q/13816944
has answer: http://stackoverflow.com/a/25288457
has comment: http://stackoverflow.com/comment/39408363
has body: I am having difficulty changing both instances of "a Runner" to "a Team Captain" &lt;form id="thisForm"&gt; &lt;table&gt; &lt;tr bgcolor="#eeeeee"&gt; &lt;td valign="top" colspan="4" style="vertical-align: top;"&gt; &lt;input type="radio" onclick="javascript:teamAction('form')" value="none" name="teamAct"&gt; &amp;nbsp;&lt;b&gt;Become&lt;/b&gt; a Runner &lt;/td&gt; &lt;/tr&gt; &lt;tr bgcolor="#eeeeee"&gt; &lt;td valign="top" colspan="4" style="vertical-align: top;"&gt; &lt;input type="radio" onclick="javascript:teamAction('form')" value="none" name="teamAct"&gt; &amp;nbsp;&lt;b&gt;Support&lt;/b&gt; a Runner &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; I was able to change the first instance using: document.getElementById("thisForm").innerHTML = document.getElementById("thisForm").innerHTML.replace(" a Runner", " a Team Captain"); Please see jsfiddle: http://jsfiddle.net/jelane20/voxnmwpn/

http://stackoverflow.com/q/25320912
has comment: http://stackoverflow.com/comment/39470668
has answer: http://stackoverflow.com/a/25321075
has title: Create/append element containing blob text which contains quotes
has comment: http://stackoverflow.com/comment/39470638
has comment: http://stackoverflow.com/comment/39470602
has comment: http://stackoverflow.com/comment/39470695
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25320965
score: 0
has comment: http://stackoverflow.com/comment/39470554
has answer: http://stackoverflow.com/a/25322253
answer count: 4
has answer: http://stackoverflow.com/a/25321113
has comment: http://stackoverflow.com/comment/39470543
accepted answer: http://stackoverflow.com/a/25322253
has body: I am try to pass a blob as following: $("#recordingslist").append(' '+new Date().toISOString() + '.wav'+' Send Exercise '); This will not work unfortunately. It will give me an unexpected identifier at the DOCTYPE. However the following works.. $("#recordingslist").append(' '+new Date().toISOString() + '.wav'+' Send Exercise '); Notice the escape characters around the blob. Does anyone have an explanation? This makes no sense to me :(
type: Question
has comment: http://stackoverflow.com/comment/39470576
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25321075

http://stackoverflow.com/comment/39387663
comment on: http://stackoverflow.com/q/25274923
type: Comment
type: QuestionComment
has text: Is `event.returnValue` always a promise? Are you sure that it is always getting resolved or rejected? If it's not a promise, do you still want to call `$el.hide()` or do you only want to call that when `event.returnValue` is a promise.
score: 0

http://stackoverflow.com/comment/39481206
has text: I'm still not sure to understand "place empty". About unchecked radio buttons, you can have a look [here](http://stackoverflow.com/questions/17120576/how-to-uncheck-checked-radio-button)
type: Comment
comment on: http://stackoverflow.com/a/25324447
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39593186
comment on: http://stackoverflow.com/q/25386613
score: 0
type: QuestionComment
type: Comment
has text: Spraky. I did initially have it in a $( document ).ready(function() {} but for some reason I put it on a onclick. I cannot recall why I tried that now, but yes I agree with you.

http://stackoverflow.com/comment/39465526
comment on: http://stackoverflow.com/a/25316439
type: AnswerComment
type: Comment
has text: Oh I was thinking that the tables wouldn't have to reference each other and that is what the relation would do.
score: 0

http://stackoverflow.com/comment/39375865
has text: Where are `queryTimer` and `acc` declared/initialised?
type: Comment
comment on: http://stackoverflow.com/q/25269349
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39405099
comment on: http://stackoverflow.com/q/25285813
type: QuestionComment
score: 1
has text: @putvande It's a 'order from my boss'.
type: Comment

http://stackoverflow.com/comment/39359801
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25260691
score: 0
has text: It's the old 'But it works' argument :/

http://stackoverflow.com/q/25304133
has answer: http://stackoverflow.com/a/25304593
has answer: http://stackoverflow.com/a/25304176
tagged with: javascript
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/25304202
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25304202
accepted answer: http://stackoverflow.com/a/25304176
has body: HTML: Grande Filme JS: var abc = document.getElementById('myID').getElementsByClassName('level-title-text').innerHTML; console.log(abc); How do I get the text "Grande Filme" into the variable ABC? JSFiddle here I tried innerText and value but didn't work. Thanks in advance for your help.
type: AnsweredQuestion
type: Question
has title: How to log the text in a span

http://stackoverflow.com/comment/39508783
has text: @Chris No, prototype is available for all JavaScript objects, your objects is not going to be `SuperObject`. rather that `SuperObject` is a factory/constructor of your objects. type of your objects and what they should to do is specified by you in the SuperObject definiftion
comment on: http://stackoverflow.com/a/25340987
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25303426
tagged with: javascript
score: 0
possible better answer: http://stackoverflow.com/a/25303476
has title: create RegEx from variable
has body: var re = "^abc"; How to create a RegEx from this variable to be able to test some strings with it like this: /THE_re_VARIABLE_HERE/i.test( someString );
tagged with: regex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25303476
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25303463
accepted answer: http://stackoverflow.com/a/25303463

http://stackoverflow.com/a/25240762
type: Answer
has body: You can use filter to get the number of td elements in each row with the completed values. Try this: $('#workflowviz tr').each(function() { var $tr = $(this); var $tds = $tr.find('td').filter(function() { return $(this).data('name') == 'stage: completed '; }); if ($tds.length == 5) { $tr.addClass('green'); } }); Example fiddle You would then just need to setup the .green class in your CSS to make the background of that particular tr element green.
score: 3
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25240587

http://stackoverflow.com/comment/39407603
has text: So you mean that If I want default lineWidth later I need to put lineWidth = 1;
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25287327
type: AnswerComment

http://stackoverflow.com/q/25247499
score: 4
has comment: http://stackoverflow.com/comment/39334477
has comment: http://stackoverflow.com/comment/39336413
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39335677
favorite count: 0
has title: Permission Denied calling javascript function
upvote count: 4
tagged with: css
has comment: http://stackoverflow.com/comment/39335658
has comment: http://stackoverflow.com/comment/39334992
has answer: http://stackoverflow.com/a/25248648
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39334473
has comment: http://stackoverflow.com/comment/39335783
has body: I am attempting to make ie7-js work with my wordpress installation. After reading about this library it seems like it is a great solution to making my website more compatible with older versions of IE more specifically IE8. It may seem odd to try and still support an old browser like that but I have noticed that several hundred visitors a month are visiting our site using browsers as old as IE6. A majority of our users are elderly and still using Windows XP. Now on to the problem. I am running a copy of the Windows XP virtual machine with IE8 from modern.ie I have followed the instructions on the library code page on how to include the file. I am trying to get the Specific IE9.js file to work. When I access the page in IE8 I get the error permission denied: line 850 character 37 I have tracked it down to the line below: for (var i = 0, imported; i &lt; styleSheet.imports.length; i++) from this function: function getCSSText(styleSheet, path, media, level) { var cssText = ""; if (!level) { media = toSimpleMedia(styleSheet.media); level = 0; } if (media === "none") { styleSheet.disabled = true; return ""; } if (media === "all" || media === self.media) { // IE only allows importing style sheets three levels deep. // it will crash if you try to access a level below this try { var canAcess = !!styleSheet.cssText; } catch (exe) {} if (level &lt; 3 &amp;&amp; canAcess) { var hrefs = styleSheet.cssText.match(IMPORTS); // loop through imported style sheets for (var i = 0, imported; i &lt; styleSheet.imports.length; i++) { var imported = styleSheet.imports[i]; var href = styleSheet._href || styleSheet.href; imported._href = hrefs[i].replace(TRIM_IMPORTS, ""); // call this function recursively to get all imported style sheets cssText += getCSSText(imported, getPath(href, path), media, level + 1); } } // retrieve inline style or load an external style sheet cssText += encode(styleSheet.href ? loadStyleSheet(styleSheet, path) : styleSheet.owningElement._cssText); cssText = parseM…
type: Question
has comment: http://stackoverflow.com/comment/39335291
tagged with: internet-explorer
has comment: http://stackoverflow.com/comment/39335581
tagged with: internet-explorer-8
tagged with: javascript

http://stackoverflow.com/a/25377160
type: Answer
upvote count: 96
has body: throw ... raises an exception in the current code block and causes it to exit, or to flow to next catch statement if raised in a try block. console.error just prints out a red message to the browser developer tools javascript console and does not cause any changes of the execution flow.
accepted answer of: http://stackoverflow.com/q/25377115
has comment: http://stackoverflow.com/comment/66398314
answers question: http://stackoverflow.com/q/25377115
type: AcceptedAnswer
downvote count: 1
score: 95

http://stackoverflow.com/comment/39412266
score: 0
type: Comment
has text: exactly what I wanted. thank you.
comment on: http://stackoverflow.com/a/25289664
type: AnswerComment

http://stackoverflow.com/a/25302957
has comment: http://stackoverflow.com/comment/39473452
has comment: http://stackoverflow.com/comment/39455645
score: 2
accepted answer of: http://stackoverflow.com/q/25292840
downvote count: 0
answers question: http://stackoverflow.com/q/25292840
has comment: http://stackoverflow.com/comment/39456415
upvote count: 2
has body: When you change the value of your combobox, it does not submit its value to the server. Since the partial refresh within the typeahead works locally around your input component, it doesn't have a clue about the client-side value of the combobox. So there are two options. First, you can submit the combobox value on each change by adding a simple eventHandler inside the combobox: &lt;xp:eventHandler event="onchange" submit="true" refreshMode="norefresh" disableValidators="true"&gt; &lt;/xp:eventHandler&gt; This will make a short AJAX call whenever the user changes its value. It doesn't need to refresh anything or validate fields at this situation. UPDATE: The above method will create UI lag and using this snippet does not work as you suggested in the comment. Because the partial refresh operation is an async operation, so when you start the typeahead, it does not wait for the partial refresh operation. But modifying the snippet a little bit will work. The problem here is that searchValue does not mean anything for us without the searchFilter. Therefore, I have looked a way to submit both information simultaneously. That's possible via the same method with the snippet. First, I have given an id for the typeAhead. This is important, especially if you want to use multiple typeAhead on the same page. &lt;xp:typeAhead id="simpleSearch" mode="partial" ..... other attributes .... &lt;/xp:typeAhead&gt; Now we will inject some CSJS into the Ajax request, specifically for the typeahead ones. &lt;xp:eventHandler event="onClientLoad" submit="false"&gt; &lt;xp:this.script&gt;&lt;![CDATA[ dojo.addOnLoad( function(){ /*** hijacking xhr request ***/ if( !dojo._xhr ) dojo._xhr = dojo.xhr; dojo.xhr = function(){ try{ var args = arguments[1]; if( args['content'] ){ var content = args['content']; if( content['$$ajaxmode'] ){ if( content['$$ajaxmode'] == "typeahead" ){ // Paranoid check for multiple typeahead: if(content['$$ajaxid'] == "#{id:simpleSearch}") { var filterType=dojo.byId("#{i…
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/25380297
has comment: http://stackoverflow.com/comment/39581000
upvote count: 4
downvote count: 0
answer count: 1
tagged with: javascript
score: 4
favorite count: 0
has title: Send object with on-click functions of Polymer
accepted answer: http://stackoverflow.com/a/28187332
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/43975068
type: Question
has comment: http://stackoverflow.com/comment/39589515
tagged with: polymer
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39592863
has comment: http://stackoverflow.com/comment/39580358
has body: I'm trying to send object as params of on-click functions, I already saw some posts using data-xxx to send values and retrieving them with the target.attributes field but that works only for strings and not objects. Here is a jsbin showing the problem: http://jsbin.com/tujekilafowa/1/edit?html,console,output There is a solution, even though its terrible, by using JSON.stringify to send the data and retrieving them with JSON.parse: http://jsbin.com/lavocacadoti/1/edit?html,console,output Is there a better way? In a perfect world, I would like it to work as Angular by passing parameters to a function directly inside the HTML call... EDIT I opened an issue on polymer project about this problem.
has answer: http://stackoverflow.com/a/28187332

http://stackoverflow.com/q/25367912
has body: I spent hours reading posts all over the web about controlling execution order in Javascript/jQuery, but I still don't understand. I'm trying to write code that shows the execution progress of behind-the-scenes javascript on a webpage. I have a jsfiddle (http://jsfiddle.net/wlandau/9sbu9myb/) that accomplishes this using timeouts. The javascript is var showProgress = function(x){ $(".progress").hide(); $(x).show(); } var step1 = function(){ showProgress(".running"); }; var step2 = function(){ for(var i = 0; i &lt; 1000000000; ++i) i = i + 1; }; var step3 = function(){ showProgress(".done"); }; $(".begin").click(function(){ step1(); setTimeout(step2, 0); setTimeout(step3, 0); }); $(".clear").click(function(){ $(".progress").hide(); }); I will eventually need to use ajax and php, and I've read that the recommended tools are when/then, Deferred objects, and promises. So I tried (http://jsfiddle.net/wlandau/an8moww6/), but the execution order is wrong. (The html page doesn't say "Running..." when the for loop is running.) That fiddle's javascript is var showProgress = function(x){ $(".progress").hide(); $(x).show(); } var step1 = function(){ var def = $.Deferred(); showProgress(".running"); return def.promise(); }; var step2 = function(){ var def = $.Deferred(); for(var i = 0; i &lt; 1000000000; ++i) i = i + 1; return def.promise(); }; var step3 = function(){ var def = $.Deferred(); showProgress(".done"); return def.promise(); }; var success = function(){ console.log("success") }; var failure = function(){ console.log("failure") }; $(".begin").click(function(){ $.when(step1(), step2(), step3()).then(success, failure); }); $(".clear").click(function(){ $(".progress").hide(); }); QUESTION 1 (first fiddle): When I change "step1()" to "setTimeout(step1, 0)" in the "$(".begin").click(function(){..}" block, the execution order breaks down. Why is this? QUESTION 2 (second fiddle): Why is the execution order wrong when I try to use when/then/Deferred/promise? QUESTION 3 (second…
accepted answer: http://stackoverflow.com/a/25368765
answer count: 1
has comment: http://stackoverflow.com/comment/39556896
has comment: http://stackoverflow.com/comment/39559312
tagged with: .when
type: AnsweredQuestion
tagged with: settimeout
has answer: http://stackoverflow.com/a/25368765
has comment: http://stackoverflow.com/comment/39557692
type: Question
has comment: http://stackoverflow.com/comment/39557830
has comment: http://stackoverflow.com/comment/39559996
has title: Javascript/jQuery: control execution order (no ajax/php yet)
has comment: http://stackoverflow.com/comment/39559158
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39559757
score: 0

http://stackoverflow.com/comment/39429937
score: 0
has text: Yes, I am aware of the you might not need jquery site. This is indeed quite similar to what I am doing at the moment. Just exploring other options...
type: Comment
comment on: http://stackoverflow.com/a/25298844
type: AnswerComment

http://stackoverflow.com/comment/39357526
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25259145
type: Comment
has text: Is the server written by you only? or is it a third party api?

http://stackoverflow.com/comment/39382794
comment on: http://stackoverflow.com/a/25273483
score: 0
type: AnswerComment
type: Comment
has text: It returns true when the date is '01/01/20'

http://stackoverflow.com/a/25376568
answers question: http://stackoverflow.com/q/25370140
score: 0
type: Answer
has body: I have not worked with angular JS but with codeigniter. For csrf protection codeigniter provides security class for providing the security token(or the csrf cookie) for respective requests either via form. Now you only need to enable this feature under the config file: Location: application/config/config.php Default Code: $config['csrf_protection'] = FALSE; Change it to: $config['csrf_protection'] = TRUE; By making it true, it automatically inserts a security token in form, that is verified at the server end. You can change the token name &amp; cookie name in the same file via below config settings: $config['csrf_token_name'] $config['csrf_cookie_name'] One important thing is that, if you refresh the page, security token doesn't change, or think it as same security token for current user session. This is somewhat drawback I have found with Codeigniter. If you want same implementation with ajax, either you need to add manual code for passing the token name or value or use ajaxSetup for all requests. By this way you can achieve the csrf protection at a level, if you want some more security then you can check for httponly cookies or ssl deployemnt subject to your project need.

http://stackoverflow.com/comment/39382265
type: Comment
type: QuestionComment
has text: Wheres the ending ` `?
score: 2
comment on: http://stackoverflow.com/q/25273321

http://stackoverflow.com/q/25361278
has comment: http://stackoverflow.com/comment/39543865
has comment: http://stackoverflow.com/comment/39544091
has comment: http://stackoverflow.com/comment/39544503
tagged with: javascript
score: 0
answer count: 7
has answer: http://stackoverflow.com/a/25361543
has title: Unable to submit form using Javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25361897
linked to: http://stackoverflow.com/q/14220321
has answer: http://stackoverflow.com/a/25361521
has answer: http://stackoverflow.com/a/25361797
has answer: http://stackoverflow.com/a/25361398
tagged with: ajax
has comment: http://stackoverflow.com/comment/39544176
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to submit my form named 'vform' by using javascript and ajax.Here Button named 'show' is being used to show the 'div' containing form named vform and that form calls codevalidate function and there it submits the form using some ajax code..Where i am getting error is vform.submit().Here's the html and js code(I know error is in if condition but do not know where) html: Apply for Discount Voucher code javascript: function codevalidate() { if(document.getElementById('code').value!=="") { $.post("couponajax.php",{code:$("#code").val()}, function(data) { if(data=='1') { //alert("success"); vform.submit(); return true; } else { document.getElementById('error').innerHTML="You have entered a wrong code!"; return false; } }); } else { document.getElementById('error').innerHTML="Code can't be empty!"; return false; } return false; } codefield function is just displaying the div on onclick event and ajax call is just checking whether the code exists in database or not..if exists returns 1 else 0. The problem is alert message is being displayed but form is not being submitted. How can I fix this problem?
has comment: http://stackoverflow.com/comment/39544029
has answer: http://stackoverflow.com/a/25361618
has answer: http://stackoverflow.com/a/25361430
has comment: http://stackoverflow.com/comment/39545047
type: Question

http://stackoverflow.com/q/25354028
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25354143
favorite count: 0
accepted answer: http://stackoverflow.com/a/25354061
answer count: 3
has body: The classic way to create constructor function is like: var Obj = function(param){ this.param = param; this.method = function(){ console.log(this.param); } } But why i can't do something like this: Obj.anotherMethod = function(){ //some code } (I know about Obj.prototype.anotherMethod). In practical usage i can't understand why use String.prototype.func instead of String.func to define new method. Is it just because String is constructor function and it's impossible to add method to it?
has comment: http://stackoverflow.com/comment/39530517
linked to: http://stackoverflow.com/q/16063394
upvote count: 1
has comment: http://stackoverflow.com/comment/39533399
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25354127
has title: Using constructor function to add methods
has answer: http://stackoverflow.com/a/25354061
score: 1
has answer: http://stackoverflow.com/a/25354127
tagged with: prototype
type: Question

http://stackoverflow.com/q/25278009
answer count: 0
downvote count: 0
tagged with: jquery
favorite count: 0
has title: Creating context menu on li using Bootstrap
type: Question
tagged with: twitter-bootstrap
upvote count: 3
has body: I found a way to make cool context menu on this question. I'm trying to add this functionality on dynamic li I have created. Unfortunately this isn't working. This is the code for running the context menu. It works fine for normal li. $("#myTab li").contextMenu({ menuSelector: "#contextMenu", menuSelected: function (invokedOn, selectedMenu) { var msg = "You selected the menu item '"; alert(msg); } }) ; But when I tried to click to the dynamic li just created it doesn't work. I thought this way will work, but it looks I'm wrong . I have this demo showing how it suppose to work: http://jsbin.com/qonuy/6 How do I use event delegation for this cases? Thanks $(document).on('contextMenu','"#myTab li',function(event){ menuSelector: "#contextMenu", menuSelected: function (invokedOn, selectedMenu) { var msg = "You selected the menu item '"; alert(msg); } });
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/18666601
score: 3

http://stackoverflow.com/comment/39563922
has text: This will capture any blur event on the page at any level in the DOM tree, it even captures when a div blurs. - http://jsfiddle.net/60eL4nws/6/
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25368944
type: Comment

http://stackoverflow.com/comment/39561184
has text: This is exactly what I am looking for! My only question is how do I combine the CSS and Jquery files to all work together?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25370105

http://stackoverflow.com/comment/39473322
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25322420
score: 2
has text: :) I meant which location in your directory structure

http://stackoverflow.com/comment/39384770
type: Comment
has text: Seens like the ring chart is broken in the 1.0 version of dimple . http://jsbin.com/konir/1/edit
comment on: http://stackoverflow.com/q/25271712
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39499632
type: Comment
has text: Lol... Is there a chance for that ? I don't think so because page is your and you know what is safe for you.
comment on: http://stackoverflow.com/a/25335970
type: AnswerComment
score: 0

http://stackoverflow.com/a/25271688
has body: You can do it inside a directive using the $compile angular function like shown in this plnkr. UPDATE Here is a plnkr that works better Here is the key part: link: function (scope, ele, attrs) { scope.$watch(attrs.dynamic, function(html) { var htmlStr = ''; var repeat = attrs.repeat; for(var i = 0; i&lt; repeat; i++){ htmlStr += html; } ele.html(htmlStr); $compile(ele.contents())(scope); }); } Your controller would look like this: function MyController($scope) { $scope.html = '&lt;p&gt;{{id}}&lt;/p&gt;\ &lt;ul&gt;\ &lt;li&gt;{{ElementType}}&lt;/li&gt;\ &lt;/ul&gt;\ &lt;blockquote&gt;{{text}}&lt;/blockquote&gt;'; } From your example, you'd remove the ng-repeat entirely and just use this directive. One change is that you'd pass in the whole $scope.data and dynamically pull out the bits you wanted to use in your html string. But because it's a string, that should be easy to do with simple string concatenation. One final thing - you are probably going to have to put some tags in so you can replace your static content with dynamic data from your array. Kind of like ng-repeat! (but different all the same). Finally, you could use interpolate to fill up your html string: $interpolate(template)({ id: id, ElementType: ElementType, text: text }); Where you would get the data for these items from the controller
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39483549
has comment: http://stackoverflow.com/comment/39381218
accepted answer of: http://stackoverflow.com/q/25270741
score: 1
answers question: http://stackoverflow.com/q/25270741
has comment: http://stackoverflow.com/comment/39417634
has comment: http://stackoverflow.com/comment/39380697
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39399743

http://stackoverflow.com/q/25274565
has title: Performance pagination in ajax (dont load all)
has comment: http://stackoverflow.com/comment/39385006
has comment: http://stackoverflow.com/comment/39384830
upvote count: 0
has comment: http://stackoverflow.com/comment/39385102
type: UnansweredQuestion
has body: I have a listing of 500 data in a javascript array (product name, product price, url img product etc etc). I can easily load the full data (500 products) but the performance is also not good. I would like to know if is it possible to use a pagination system in jquery (ajax) which load only for example 5 results per page (and not all my array). Thank you in advance
tagged with: pagination
score: -1
type: Question
has answer: http://stackoverflow.com/a/25275192
answer count: 1
downvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax

http://stackoverflow.com/comment/39555355
comment on: http://stackoverflow.com/q/25367347
score: 0
has text: How did you replace the one?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25363152
type: Answer
has comment: http://stackoverflow.com/comment/39890139
has body: Your playlist contains only $movie. You need to fill playlist vlc.playlist.add(mrl,name,options) then you can use vlc.playlist.playItem(number) JS: var options = new Array(); var id1 = vlc.playlist.add('http://xxx.xx.org/test/lista/u2-one.avi', "Movie", options); var id2 = vlc.playlist.add('http://xxx.xx.org/test/lista/coldplay-yellow.mp3', "Mp3", options); var id3 = vlc.playlist.add('http://xxx.xx.org/test/lista/coldplay-paradise.mp3', "Coldplay", options); HTML: Coldplay
answers question: http://stackoverflow.com/q/25362890
score: 0

http://stackoverflow.com/q/25314526
has answer: http://stackoverflow.com/a/25314589
type: Question
answer count: 3
has answer: http://stackoverflow.com/a/25315062
tagged with: javascript
has title: Modify table in webpage only when printing
has comment: http://stackoverflow.com/comment/39458817
score: 0
possible better answer: http://stackoverflow.com/a/25314585
has answer: http://stackoverflow.com/a/25314585
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/25315062
has comment: http://stackoverflow.com/comment/39458868
has body: I have a webpage with dynamically populated tables. They are wide, so they have horizontal scroll bars when being displayed on the page. My problem is that when I go to print, the tables are cut off by a little bit. As a solution, I want to reformat the tables by changing the contents of some &lt;td&gt; elements to make it fit, for example: //before 2014-01-23T18:28:35 //after 2014-01-23 18:28:35 This will decrease the width of the table so that it will fit on one page when printing. I have two ideas so far: When I dynamically populate the table, also populate a second table with the modified data. When on screen, the original table will be displayed, while the second one will be hidden. When printing, the original table will be hidden, and the second one will be displayed. Call a JavaScript function or use CSS to modify the contents of &lt;td&gt; elements only while printing. (Is this even possible?) What is the best approach for this situation? EDIT I am not asking about using a CSS stylesheet only when printing. I have already done that, and shrunk the font size to the minimum size (in my opinion) for human readability.
type: AnsweredQuestion

youtube-api
tags question: http://stackoverflow.com/q/25379746
tags question: http://stackoverflow.com/q/25346104
type: Tag
tags question: http://stackoverflow.com/q/25322225
tags question: http://stackoverflow.com/q/25330527
tag name: youtube-api
tags question: http://stackoverflow.com/q/25274217
tags question: http://stackoverflow.com/q/25318561
tags question: http://stackoverflow.com/q/25257336

http://stackoverflow.com/comment/39584663
type: AnswerComment
has text: THanks! Will try this. I've only recently started using angularjs and still need to get formal training in it but I'm already trying to learn alot by myself. Because of this I'm not yet experienced in the usage of scope and how to use it efficiently.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25382645

http://stackoverflow.com/comment/39386058
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25274613
has text: @Ronnie7777, the extra row was not the problem. The code closes the row on the same item it opens it, so it forms ` [0] [1][2]` etc. The row should open before the first and close after the third, e.g. ` [0][1][2] `
score: 0

http://stackoverflow.com/comment/39598404
comment on: http://stackoverflow.com/q/25389437
score: 0
type: Comment
type: QuestionComment
has text: Are you sure it's the routing that's being messed up and not validation that's giving you problems? Try adding the `[AllowHtml]` attribute above the declaration of the Value property in your model class or above the entire action.

http://stackoverflow.com/comment/39310969
comment on: http://stackoverflow.com/q/25234981
type: Comment
type: QuestionComment
has text: Normally browsers handle rendering pretty well and fast, unless you have literally thousands and thousands of elements.
score: 0

http://stackoverflow.com/comment/39556193
type: Comment
has text: @zazvorniki Not certain about "plugin" . js "masks" all except last 4 characters of input field - without a "plugin". As suggested by Wesley Murch, the actual data to be submitted could be concurrently entered into hidden element fields , then submitted when all 10 numbers, or 12 total characters are entered into visible ("masked") fields.
comment on: http://stackoverflow.com/a/25367615
score: 0
type: AnswerComment

http://stackoverflow.com/a/25234156
has comment: http://stackoverflow.com/comment/39309586
downvote count: 0
type: AcceptedAnswer
upvote count: 6
accepted answer of: http://stackoverflow.com/q/25233932
answers question: http://stackoverflow.com/q/25233932
has body: You would need to use $timeout instead of setTimeout to have the digest cycle invoked from within angular which updates the modal or you must invoke digest cycle yourself ( by wrapping the code scope.$apply(), scope.evalAsync etc...) , Reason is that angular has no idea when setTimeout is done since it does not happen within angular. You should try not to manually invoke digest cycle as much as possible when you have an angular way to do things and you are free to use it. In this case you can replace setTimeout with $timeout and the model changes will be get reflected in the view automatically since angular invoke a digest cycle when the $timeout is done. One more advantage is that when using $timeout it returns a promise as well which you can chain through and still have promise pattern implemented when opposed to setTimeout. app.controller('ChildCtrl', function($scope, $timeout) { $scope.updateStatus = function(item){ $scope.myItem = item; console.log('child: ' + item.id + ' status: ' + item.status); item.status = 'clicked'; console.log('status now updates in UI to: ' + item.status); callResult = fakeAjaxCall($scope); console.log('callResult: ' + callResult); }; var fakeAjaxCall = function(scope){ $timeout(function (item) { if (-1 == -1) { //success result = "Wow, it worked!"; console.log('current status: ' + scope.myItem.status); console.log('ajax result: ' + result); scope.myItem.status = result; console.log('new status: ' + scope.myItem.status); console.log("but the status in the UI doesn't update"); } }, 2000); }; Plnkr While debugging async operations, i would recommend usage of console.log (or $log) instead of alert for debugging.
type: Answer
score: 6

http://stackoverflow.com/q/25303489
downvote count: 0
score: 1
favorite count: 0
has body: I'm trying to dynamically replace a sub string in a parent string. I've tried string.replace('old','new') to no avail. Here's the snippet giving me trouble. newbuffer.replace( matches[i], p.shortcodes[x].vala ); console.log( "Replace " + matches[i] + " with " + p.shortcodes[x].vala ); Result is "Replace [hello] with Awaiting ajax request... </span">" Am I missing something here? Does .replace take "plain text" or will I need to do some regex?
type: Question
has title: javascript string.replace not working
tagged with: regex
has comment: http://stackoverflow.com/comment/39438015
has answer: http://stackoverflow.com/a/25303562
upvote count: 1
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25303562
type: AnsweredQuestion

http://stackoverflow.com/q/25341321
type: Question
linked to: http://stackoverflow.com/q/500431
tagged with: javascript
score: -1
has title: Uncaught ReferenceError: <function> is not defined
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39508925
has body: I have below codes in my jsp file. &lt;script&gt; $(document).ready(function() { var date = new Date(); var firstDay = new Date(date.getFullYear(), date.getMonth(), 1); function getFirstDay() { return firstDay; } ; function getToday() { return date; } ; }); &lt;/script&gt; &lt;script&gt; $('.datepicker').datepicker({ format : 'yyyy-mm-dd', todayHighlight : true }); $("#from_date").datepicker("setDate", getFirstDay()); $("#to_date").datepicker("setDate", getToday()); $("#from_date").datepicker('update'); $("#to_date").datepicker('update'); &lt;/script&gt; But when page load, I got below error on js console. Uncaught ReferenceError: getFirstDay is not defined How could I solve this ?
has comment: http://stackoverflow.com/comment/39509024
has answer: http://stackoverflow.com/a/25341354
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25341354
downvote count: 2
upvote count: 1

http://stackoverflow.com/q/25340697
has comment: http://stackoverflow.com/comment/39508773
upvote count: 0
has title: Pulling HTML element from PHP string and inserting into another page
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25341355
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: UnansweredQuestion
downvote count: 1
type: Question
has body: I have a PHP string with something like this inside: ... I then have a HTML page with a div with an id. I would like to somehow extract that table from the PHP string and paste it into my div. I cannot edit the HTML in the PHP string (so I cannot add an ID to the table to pull it out). How would I do this? I have tried using iframes but by browser is blocking them.
tagged with: javascript
score: -1

http://stackoverflow.com/comment/39391075
has text: @BoltClock I don't expect it to print anything. I just expect "anything" to be consistent accross its representations :)
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/25278271

http://stackoverflow.com/q/25283431
favorite count: 0
tagged with: treegrid
tagged with: angularjs
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25336182
upvote count: 1
has body: I am using tree-grid component in AngularJS: http://khan4019.github.io/tree-grid-directive/test/treeGrid.html here is above example in plunker: http://plnkr.co/edit/CQwY0sNh3jcLLc0vMP5D?p=preview in comparison with ng-grid, I can't define cellTemplate, but I really need cell formatting possibility. How can I implement example rules for each row: if TimeZone is equal to EST color Description content on green if TimeZone is equal to PST color Description content on red if Population as an odd number replace Area content by image good.jpg if Population as a even number replace Area content by image bad.jpg with tree-grid-directive? Maybe you can propose me some other AngularJS component (with tree expand functionality)?
downvote count: 1
type: Question
tagged with: angularjs-directive
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25336182
has title: Tree grid component with cellTemplate in AngularJS
answer count: 1

http://stackoverflow.com/q/25325824
has comment: http://stackoverflow.com/comment/39479802
upvote count: 0
has answer: http://stackoverflow.com/a/25326482
accepted answer: http://stackoverflow.com/a/25325930
has comment: http://stackoverflow.com/comment/39479564
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/25326019
has answer: http://stackoverflow.com/a/25326019
answer count: 3
has body: Hi I am currently doing a javascript course at Code Academy pertaining to "for" loops. but this exercise does not make sense to me and it is pointless going further without understanding why I am doing what i am doing... here with the code. text = "Blah blah blah blah blah blah Eric \ blah blah blah Eric blah blah Eric blah blah \ blah blah blah blah blah Eric"; var myName = "Eric"; var hits = []; // Look for "E" in the text for(var i = 0; i &lt; text.length; i++) { if (text[i] === "E") { // If we find it, add characters up to // the length of my name to the array for(var j = i; j &lt; (myName.length + i); j++) { hits.push(text[j]); } } } if (hits.length === 0) { console.log("Your name wasn't found!"); } else { console.log(hits); } I get the first loop but what confuses me is the whole second loop inside the if statement.... for(var j = i; j &lt; (myName.length + i); j++) { hits.push(text[j]); } just dont understand what i am doing?
has comment: http://stackoverflow.com/comment/39479491
has title: trying to understand the for loop in javascript
has comment: http://stackoverflow.com/comment/39479784
has comment: http://stackoverflow.com/comment/39479677
tagged with: loops
has comment: http://stackoverflow.com/comment/39479597
downvote count: 1
type: AnsweredQuestion
score: -1
has answer: http://stackoverflow.com/a/25325930
has comment: http://stackoverflow.com/comment/39479662
type: Question
has comment: http://stackoverflow.com/comment/39479811
has comment: http://stackoverflow.com/comment/39479486

http://stackoverflow.com/q/25388240
has title: Implementing a WYSIWYG report builder using HTML/CSS/JQuery?
has comment: http://stackoverflow.com/comment/39595317
has comment: http://stackoverflow.com/comment/40991900
has comment: http://stackoverflow.com/comment/39595384
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/pdf
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/26150933
upvote count: 3
has body: I am developing a dashboard that pulls statistics using API's from various platforms such as Google Analytics, Google AdWords, etc. Once the user has pulled all the data necessary and saved them in a database, the user may conveniently retrieve the statistics and have them displayed on a single screen on the dashboard, along with graphs and other graphical widgets to show trends. The end result I would like to achieve with this is to have a WYSIWYG report builder, if possible, so the user may design the page's CSS/HTML and save their report templates, and eventually export them to a PDF. I have the CSS elements that I would like to manipulate already created. I would however like to allow the user to choose how those CSS elements are laid out and scaled. However, I am unsure how complicated such an implementation would be, and how to approach implementing such a feature. I have researched and found out there are JQuery plugins that allow for dragging/resizing of CSS elements as such: http://jsfiddle.net/Ja4dY/1/ $(function() { var $foo = $('#foo').resizable().draggable(); $('#transform').on('click', function() { $foo.css({ '-moz-transform': 'rotate(60deg)', '-webkit-transform': 'rotate(60deg)', '-ms-transform': 'rotate(60deg)' }); }); }); Would it be possible to save a manipulated page as a template? I am assuming I will need to use another plugin to export the HTML page as a PDF. Are there any existing tools that do something similar? In a nutshell, I am looking to implement a reporting tool that saves customized templates and exports to PDF. I've tried looking around but came up with nothing, so I am wondering if the community knows of any tools or combination of tools that may achieve this. My apologies for any confusion in regards to my question. Thank you in advance!
type: Question
score: 3

http://stackoverflow.com/q/25378959
has comment: http://stackoverflow.com/comment/39577628
answer count: 4
has body: I got problem parse JSON data in proper format. This is my JSON data. I just want to grab beneAcctNumber from the data: { "restFilteredInterRegisteredAccounts": { "101010-BPD Bali-Permata ALTO": { "beneficiaryNote": null, "beneficiaryName": "Permata ALTO", "accountCurrency": "IDR", "paymentType": null, "beneficiaryIdType": null, "transferLimit": null, "beneficiaryResident": null, "accountLimit": 5.0E7, "bankName": "BPD Bali", "lastModTime": null, "ibInterAcctRef": null, "bankCode": "000129", "beneficiaryEmail": null, "ibInterAcctStrcol1": null, "ibInterAcctStrcol2": null, "userId": 1551, "beneAcctNumber": "101010", "beneficiaryId": null, "mobileNumber": null } }, } I got undefined value after retrieved it. My attempt for this one: restFilteredInterRegisteredAccounts[0].beneAcctNumber
has title: How to parse JSON properly?
has answer: http://stackoverflow.com/a/25379084
has answer: http://stackoverflow.com/a/25379106
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39577763
accepted answer: http://stackoverflow.com/a/25419274
type: Question
has comment: http://stackoverflow.com/comment/39577643
has answer: http://stackoverflow.com/a/25419274
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25379106
score: 0
has comment: http://stackoverflow.com/comment/39577646
has answer: http://stackoverflow.com/a/25379154

http://stackoverflow.com/a/25230695
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25230614
downvote count: 0
score: 1
has body: This looks like an event delegation issue. On the new boxes created during lvl1 you arnt assigning the event handler again. Try $( "#game" ).on( "click", ".box", function(){ alert("OK"); });

http://stackoverflow.com/q/25294899
has comment: http://stackoverflow.com/comment/39422154
tagged with: javascript
has body: I am still working on my "mvc/social" php project. Right now I am trying to secure the user input on the state message. I made a PHP and a JavaScript function but the js seems not to be seen when called. I've tried the same js file with another 'project' and I know it is working. The problem is that I dunno how to reach it! :O The view file is located into (project root)/views/afterloginview.php The js file is located into (project root)/public/js/application.js In the afterloginview.php I have got the following: &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src ="public/js/application.js"&gt; &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form id = "form_state" action="" method ="POST"&gt; &lt;input type="text" name="stato"/&gt; &lt;input type="submit" value="Aggiorna Stato"onclick="ok_state();"/&gt; &lt;/form&gt; Meanwhile into the application.js I have got: var NotAdmitted = /[\|\+=&lt;&gt;()%\*]|(!=)|-{2}/; // function ok_state(){ elem = document.forms[0]["stato"].value; if(elem == null || elem.length &lt;= 1 || elem.length &gt; 140){ alert("Aggiornamento di lunghezza non consentita!Lo stato non verrà aggiornato"); return false; } if(NotAdmitted.test(elem)==true){ alert("Hai usato caratteri non consentiti,impossibile aggiornare!"); return false; } else{ return true; } } I already tried ../public/js/application.js but it does not work neither. The console gives an error: Uncaught TypeError: Cannot read property 'value' of undefined. As a user stated the code is working! What's the problem?!?! Still not working.
has comment: http://stackoverflow.com/comment/39423261
has answer: http://stackoverflow.com/a/25310824
has comment: http://stackoverflow.com/comment/39422083
has comment: http://stackoverflow.com/comment/39422234
score: 0
has comment: http://stackoverflow.com/comment/39422104
answer count: 1
has comment: http://stackoverflow.com/comment/39422123
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39423011
has title: Could not execute JS function
tagged with: php
has comment: http://stackoverflow.com/comment/39422122
has comment: http://stackoverflow.com/comment/39422922
has comment: http://stackoverflow.com/comment/39422205
has comment: http://stackoverflow.com/comment/39424777
type: Question
has comment: http://stackoverflow.com/comment/39422275
has comment: http://stackoverflow.com/comment/39422059
has comment: http://stackoverflow.com/comment/39424292
has comment: http://stackoverflow.com/comment/39422160

http://stackoverflow.com/comment/39442277
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25302656
has text: @Christian Check the updated answer, you dont need to add `data-dom-cache` to all pages.

http://stackoverflow.com/comment/39446033
has text: I click it over and over again and it close and open as expected
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25307869

http://stackoverflow.com/a/25332914
upvote count: 1
has comment: http://stackoverflow.com/comment/39493982
accepted answer of: http://stackoverflow.com/q/25332537
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39493837
has comment: http://stackoverflow.com/comment/39494222
type: Answer
downvote count: 0
score: 1
has body: It's blinking because both of your if statements are true. So it is trying to fade in and fade out at the same time. I updated your fiddle to only fade in if you are between the two divs. I changed it so it first checks if it is above the first div. If it is, then the special div is hidden. If you have scrolled past the first div, it then checks the position relative to the second div and shows or hides it. So your code looks like: $(document).ready(function() { $("#DIV1").hide(); //hide your div initially var topOfOthDiv1 = $("#DIV2").offset().top; var topOfOthDiv3 = $("#DIV3").offset().top; $(window).scroll(function() { if($(window).scrollTop() &lt; topOfOthDiv1) { $("#DIV1").fadeOut(200); //reached the desired point -- show div } else { if($(window).scrollTop() &lt; topOfOthDiv3) { //scrolled past the other div? $("#DIV1").fadeIn(200); //reached the desired point -- show div } else if($(window).scrollTop() &gt; topOfOthDiv3) { //scrolled past the other div? $("#DIV1").fadeOut(200); //reached the desired point -- show div } } }); });
answers question: http://stackoverflow.com/q/25332537
has comment: http://stackoverflow.com/comment/39493810

http://stackoverflow.com/a/25279453
answers question: http://stackoverflow.com/q/25279232
accepted answer of: http://stackoverflow.com/q/25279232
type: Answer
score: 0
has body: Demo html This is heading Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Another heading Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content content content Content conten…
type: AcceptedAnswer

grails-resources-plugin
tags question: http://stackoverflow.com/q/25249333
type: Tag
tag name: grails-resources-plugin

http://stackoverflow.com/q/25353304
type: UnansweredQuestion
has title: Get messages in users' GMail inbox
type: Question
has answer: http://stackoverflow.com/a/25689946
score: 5
upvote count: 5
has answer: http://stackoverflow.com/a/25367827
tagged with: javascript
linked to: http://stackoverflow.com/q/22128789
has answer: http://stackoverflow.com/a/25680752
answer count: 3
downvote count: 0
tagged with: jquery
has body: In the code below I am signing in, authorising the app, and getting console output via the GMail API. I believe I am getting the threads and thread IDs, but I am not seeing the messages in the console. I am not getting any errors and I am getting output, just what seems like keys with no values. Here is what the console output looks like: Here is the code: var CLIENT_ID = 'YOUR_CLIENT_ID'; var SCOPES = ['https://www.googleapis.com/auth/gmail.readonly']; var USER = 'me'; /** * Called when the client library is loaded to start the auth flow. */ function handleClientLoad() { window.setTimeout(checkAuth, 1); } /** * Check if the current user has authorized the application. */ function checkAuth() { gapi.auth.authorize( {'client_id': CLIENT_ID, 'scope': SCOPES, 'immediate': true}, handleAuthResult); } /** * Called when authorization server replies. * * @param {Object} authResult Authorization result. */ function handleAuthResult(authResult) { var authButton = document.getElementById('authorizeButton'); var outputNotice = document.getElementById('notice'); authButton.style.display = 'none'; outputNotice.style.display = 'block'; if (authResult &amp;&amp; !authResult.error) { // Access token has been successfully retrieved, requests can be sent to the API. gapi.client.load('gmail', 'v1', function() { listThreads(USER, function(resp) { var threads = resp.threads; for (var i = 0; i &lt; threads.length; i++) { var thread = threads[i]; console.log(thread); console.log(thread['id']); } }); }); } else { // No access token could be retrieved, show the button to start the authorization flow. authButton.style.display = 'block'; outputNotice.style.display = 'none'; authButton.onclick = function() { gapi.auth.authorize( {'client_id': CLIENT_ID, 'scope': SCOPES, 'immediate': false}, handleAuthResult); }; } } /** * Get a page of Threads. * * @param {String} userId User's email address. The special value 'me' * can be used to indicate the authenticated user. * @param {Function} callback …
favorite count: 0
tagged with: gmail-api

http://stackoverflow.com/a/25263412
upvote count: 1
has comment: http://stackoverflow.com/comment/39363665
accepted answer of: http://stackoverflow.com/q/25263086
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25263086
has body: In the specific case of setTimeout, you don't even need a closure. You can pass variables to the timeout function, as follows: for (var x in data.property) { for (var i = 0; i &lt; data.property[x].values.length; i++) { var one = data.property[x].values[i][0]; var two = data.property[x].values[i][1]; setTimeout(function(one, two) { write(one, two); }, delay, one, two); delay += 1000; } }
type: Answer
score: 1

http://stackoverflow.com/a/25361473
downvote count: 0
type: Answer
has body: Not possible directly: values will always be initially read as strings on the PHP side. If you need to coerce the values into other types and cannot hardcode these types in your code you will need to arrange for "type information" to be passed to PHP (also as a string). That's how protocols that inherently provide data type support, such as SOAP, work.
upvote count: 3
answers question: http://stackoverflow.com/q/25361446
score: 3

http://stackoverflow.com/comment/39543820
type: Comment
comment on: http://stackoverflow.com/a/25361134
type: AnswerComment
score: 0
has text: Awesome. Will this work with Google Closure compiler?

http://stackoverflow.com/comment/39326915
type: Comment
type: QuestionComment
has text: `/^\d{1,3}-\d{1,3}-\d{1,4}$/`
score: 0
comment on: http://stackoverflow.com/q/25243662

http://stackoverflow.com/comment/39528571
type: AnswerComment
score: 0
type: Comment
has text: Indeed, I just added a `echo " ";` after the php returns the table. And now I get a shiny A when I click a button. I imagine there's a way better way to accomplish what I just did with that echo though.
comment on: http://stackoverflow.com/a/25352817

http://stackoverflow.com/comment/39401441
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25284013
has text: It's logging undefined in firefox and chrome console....
score: 0

http://stackoverflow.com/comment/39514467
comment on: http://stackoverflow.com/q/25344825
type: Comment
type: QuestionComment
has text: @monkeyinsight [tag:q]
score: 0

http://stackoverflow.com/a/25248993
score: 2
accepted answer of: http://stackoverflow.com/q/25248901
has body: That's because the function parameter, a, is not the same as the variable a declared in the outer scope. When you assign a new value to the parameter a, it has no effect on the outer variable. a = a.concat([1]); Instead, simply return the new array, and use the return value in the outer scope, like this: var f = function(a){ return a.concat([1]); }; var a = []; a = f(a); Or perhaps consider using push like this: var f = function(a){ Array.prototype.push.apply(a, [1, 2, 3]); }; This will push multiple values onto the source array, so it's pretty much equivalent to concat except that it modifies the original array.
answers question: http://stackoverflow.com/q/25248901
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/39337028

http://stackoverflow.com/comment/39545828
has text: what you need to add to every digit. what you tried show one of that
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25362501

http://stackoverflow.com/q/25313284
has comment: http://stackoverflow.com/comment/39456222
answer count: 1
tagged with: javascript
tagged with: jquery
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25313613
tagged with: css
has comment: http://stackoverflow.com/comment/39456211
has comment: http://stackoverflow.com/comment/39456282
favorite count: 0
downvote count: 0
type: UnansweredQuestion
score: 1
has title: Jquery place an object elsewhere on hover
type: Question
has body: I want to place an image into another div on hover. Something like: // I want to place this particular instance of .source into .place-here $('.source').hover(function() { $('.place-here').append(this); }); Although this does not work. Here is a jsfiddle if you are interested in helping me.. Thanks for any ideas!

http://stackoverflow.com/a/25258814
upvote count: 0
has comment: http://stackoverflow.com/comment/39355427
has comment: http://stackoverflow.com/comment/39355545
answers question: http://stackoverflow.com/q/25258757
score: -1
downvote count: 1
type: Answer
has body: Inside iframe use javascript: parent.location.reload(); //or parent.location.href = 'http://google.com' Note, that iframe should contain code from same origin (the same domain, and the same protocol).

http://stackoverflow.com/q/25362793
has comment: http://stackoverflow.com/comment/39546580
score: 0
accepted answer: http://stackoverflow.com/a/25362838
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/25362926
has body: I have 4 div elements on the same line, each set at 25% width to fit the screen. When I click on a div it should disappear, which I have achieved using jQuery. Then, I manually set the width of each of the divs to 33%. I can keep on doing this manually for more clicks, but is there a way the divs automatically resize them selves like this using jQuery and even continue when 2 divs are on screen so each would should be 50%?
has comment: http://stackoverflow.com/comment/39546810
has answer: http://stackoverflow.com/a/25362926
tagged with: javascript
tagged with: jquery
has title: Changing the width of HTML div element automatically using jQuery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25362838
has comment: http://stackoverflow.com/comment/39546510
type: AnsweredQuestion

http://stackoverflow.com/q/25263431
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39364177
has comment: http://stackoverflow.com/comment/39363656
possible better answer: http://stackoverflow.com/a/25263608
upvote count: 2
accepted answer: http://stackoverflow.com/a/25263556
has answer: http://stackoverflow.com/a/25263608
linked to: http://stackoverflow.com/q/16063394
type: Question
score: 2
type: AnsweredQuestion
has body: I would like to make objects, with earlier created objects as the prototypes. This way I would be able to make additions to existing objects without modifying them. Methods which interact with the earlier created objects (so using there attributes and perhaps mutating them) could also be applied to the newly derived objects. I thought this could be done with the following code, but it doesn't... objs = []; for (var i = 0; i &lt; 5; i++) { objs.push({ index: i }); } for (var i = 0; i &lt; 5; i++) { var newObj = {}; newObj.prototype = objs[i]; alert(newObj.index); } http://jsfiddle.net/q5bu25L1/2/
linked to: http://stackoverflow.com/q/9959727
has title: Javascript prototype from instance
tagged with: prototype
answer count: 2
has comment: http://stackoverflow.com/comment/39363706
downvote count: 0
has answer: http://stackoverflow.com/a/25263556

http://stackoverflow.com/comment/39583897
comment on: http://stackoverflow.com/a/25357230
score: 0
type: Comment
has text: That is helpful, as `<text>` elements are now coming to existence, within the `<circle>`s. However, they are still not being displayed. I updated the Q.
type: AnswerComment

http://stackoverflow.com/comment/39662536
type: QuestionComment
has text: Aidan - I suggest making a basic example - one field which works for you and then work that into your application. Start simple rather than trying to implement into existing code.
comment on: http://stackoverflow.com/q/25355473
score: 0
type: Comment

http://stackoverflow.com/a/25387808
has comment: http://stackoverflow.com/comment/39594587
has comment: http://stackoverflow.com/comment/39594867
has body: You can use RegisterStartupScript or RegisterClientScriptBlock to declare a script on the server and pass it on to be executed on the client. These are static functions of ClientScript and ScriptManager. Differences between ScriptManager and ClientScript when used to execute JS? Difference between RegisterStartupScript and RegisterClientScriptBlock?
score: 0
has comment: http://stackoverflow.com/comment/39595086
answers question: http://stackoverflow.com/q/25387311
has comment: http://stackoverflow.com/comment/39594889
type: Answer
has comment: http://stackoverflow.com/comment/39594454

http://stackoverflow.com/comment/39355928
type: QuestionComment
has text: @SunilHari so what do you need to make the question clearer? ill provide!
score: 0
comment on: http://stackoverflow.com/q/25255403
type: Comment

http://stackoverflow.com/comment/39370760
has text: okay, which event i should create timer on? Notice that each day, sunset/sunrise time is changing
comment on: http://stackoverflow.com/a/25267245
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25319040
tagged with: text
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25331822
upvote count: 3
has answer: http://stackoverflow.com/a/25331822
has comment: http://stackoverflow.com/comment/39484298
has answer: http://stackoverflow.com/a/25341286
has title: Display text with WebGL
type: Question
score: 3
tagged with: javascript
tagged with: webgl
has comment: http://stackoverflow.com/comment/39477060
has answer: http://stackoverflow.com/a/25320418
answer count: 3
has body: I want to display text with WebGL, and I know that there is not a built in way to do this. However, I know it can be done, with textures. I am new to OpenGL, so I don't really have much experience with shaders, so if someone could add how to set up the shaders for this. I would like to draw the entire string on the same object, instead of a bunch of seperate letters, and the strings are NOT preset, they will not always be the same. How can I get the text to appear? Also, how do I know how to space each letter? I read post #7 at this page, and that sounds like it's what I want to do, but I don't understand exactly what It all means. (It's mostly the shader stuff I don't understand). By the way, I am using sylvester.js
downvote count: 0
favorite count: 0
tagged with: textures
accepted answer: http://stackoverflow.com/a/25320418

http://stackoverflow.com/q/25357089
type: Question
has title: Google maps api v2 on Cordova: not sentitive to events?
downvote count: 0
tagged with: javascript
has body: in Cordova, I would like to open a map which shows markers when initialized. So in the code, I create the map and I wait for the event MAP_READY to add markers. Is it the good way to do it ? var map; document.addEventListener("deviceready", function() { var button = document.getElementById("button"); button.addEventListener("click", onBtnClicked, false); var div = document.getElementById("map_canvas"); map = plugin.google.maps.Map.getMap(div); }, false); map.addEventListener(plugin.google.maps.event.MAP_READY, function(map) { map.getMyLocation(function(location) { var msg = ["Current your location:\n", "latitude:" + location.latLng.lat, "longitude:" + location.latLng.lng].join("\n"); map.addMarker({ 'position': location.latLng, 'title': msg }, function(marker) { marker.showInfoWindow(); }); }); }); With this code, the marker is not added. But it works if I use a button with this code: map.getMyLocation(function(location) { var msg = ["Current your location:\n", "latitude:" + location.latLng.lat, "longitude:" + location.latLng.lng].join("\n"); map.addMarker({ 'position': location.latLng, 'title': msg }, function(marker) { marker.showInfoWindow(); }); Thanks for your help!
score: 2
tagged with: google-maps-api-2
favorite count: 0
tagged with: cordova
upvote count: 2
type: UnansweredQuestion
tagged with: android
answer count: 0

http://stackoverflow.com/q/25329922
type: Question
has body: Navigation is not working as I expected, when I trigger goToTournament (see below) the current view just re-renders and I get a jQuery 404 not found error on the console. The URL is changing appropriately and the correct route method is being triggered as well. // js/views/home.js define([ 'jquery', 'jquerym', 'underscore', 'backbone', 'models/tournaments/featured', 'collections/home', 'text!/templates/home.html' ], function($, JQM, _, Backbone, FeaturedModel, HomeCollection, homeTemplate) { var HomeView = Backbone.View.extend({ el: $('#site-main'), events: { 'click .tournament': 'goToTournament' }, initialize: function() { this.render(); }, render: function() { var homeCollection = new HomeCollection(); homeCollection.fetch({ success: function() { var data = {tournaments: homeCollection.toJSON()}; var compiledTemplate = _.template(homeTemplate, data); $('#site-main').html(compiledTemplate); $('.main-content').fadeTo(500, 1); return this; } }); }, goToTournament: function(e) { this; var t_id = $(e.currentTarget).data('id'); var router = new Backbone.Router(); router.navigate('tournament/' + t_id, {trigger: true}) } }); return HomeView; }); // js/router.js define([ 'jquery', 'underscore', 'backbone', 'views/home', 'views/tournament', 'collections/tournament' ], function($, _, Backbone, HomeView, TournamentView, TournamentCollection) { var AppRouter = Backbone.Router.extend({ routes: { '': 'home', 'tournament/:id': 'tournament' } }); var initialize = function() { var app_router = new AppRouter; app_router.on('route:home', function() { var homeView = new HomeView(); }); app_router.on('route:tournament', function(id) { var tournament = new TournamentCollection({ id: id }); tournament.fetch({ success: function() { var tournamentView = new TournamentView({collection: tournament}); } }); }); Backbone.history.start(); }; return { initialize: initialize }; });
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
tagged with: backbone.js
has answer: http://stackoverflow.com/a/25330362
has title: Backbone.js - 404 jQuery error on navigate
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25330362

http://stackoverflow.com/comment/39539462
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25358584
has text: I don't know how to do that. Can you help me and show me how to do that, please?

http://stackoverflow.com/comment/39368790
comment on: http://stackoverflow.com/q/25265393
has text: ok then how is `abcd, .efg` valid but `abcd-',` isn't?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25325678
tagged with: php
possible better answer: http://stackoverflow.com/a/25325711
type: AnsweredQuestion
upvote count: 3
type: Question
score: 3
accepted answer: http://stackoverflow.com/a/25327265
tagged with: yii
tagged with: javascript
has title: How to enable Cross-Origin Resource Sharing on my mobile app (cordova) that hooks up to an API (in Yii)
has body: I have implemented a mobile cordova app (from another external developer) into my local web environment that works inconjunction with a RESTful API system that I have developed. I am trying to login, this passes the JSON request to my API with the username &amp; password and basically returns a response. In Mozilla Firefore I get the following response within the console log :- Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://mystickers.local/myStickersApi/V1/appLogin. This can be fixed by moving the resource to the same domain or enabling CORS. Can anyone provide the best/simplest way to enable Cross Origin Requestion Sharing, my API is developed using Yii 1.x.x (e.g PHP) and the mobile app is developed using the Cordova framework (a combination of HTML5/CSS &amp; javascript).
answer count: 2
tagged with: cross-domain
tagged with: cors
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25325711
has answer: http://stackoverflow.com/a/25327265

http://stackoverflow.com/comment/39460070
score: 0
type: Comment
type: QuestionComment
has text: @cdhowie No errors in the console related to that function. console.log(Categories.list) in the done functions shows that the category is added.
comment on: http://stackoverflow.com/q/25315166

http://stackoverflow.com/comment/39405115
score: 0
has text: not sure if I understand your question properly but if you are wanting different style for different resolutions have a google for media queries
comment on: http://stackoverflow.com/q/25285864
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25233703
type: UnansweredQuestion
tagged with: indexed
type: Question
upvote count: 2
tagged with: decode
answer count: 1
tagged with: arrays
has answer: http://stackoverflow.com/a/25233731
tagged with: javascript
favorite count: 0
tagged with: encode
has body: I need to return indexed two-dimensional array from PHP to JavaScript. I have been searching for solution for days. On client side I have on-change event (in option select) calling JavaScript function which executes a php file. This php file creates a 2 dimensional array from csv file, encodes that array with json. However, when I try to access elements of the array in JavaScript it gives me "undefined". HTML file: Select State CA CO MA TX PHP file: $file = 'event_submission.csv'; $data2DArray = array(); $state = $_REQUEST['state']; echo($state), "\n\n"; //create table with header and column names print(' '); print(' AOM DAY 2014 '); print(' Company City State Event Date Event Details '); $delimiter = ","; if (($handle = fopen($file, "r")) !== FALSE) { $i = 0; while (($lineArray = fgetcsv($handle, 10000, $delimiter)) !== FALSE) { if ($lineArray[7] == $state) { for ($j=0; $j<count($lineArray); $j++) { $data2DArray[$i][$j] = $lineArray[$j]; } print(' '.$data2DArray[$i][0].' '.$data2DArray[$i][6].' '.$data2DArray[$i][7].' '.$data2DArray[$i][10].' '); } $i++; } fclose($handle); } $json = json_encode($data2DArray); echo 'var arrayFromPhp = ' . $json . ';'; return true; ?> Any suggestions? Please help....
score: 2
has title: How can I return indexed two-dimensional array from PHP to JavaScript
downvote count: 0

http://stackoverflow.com/comment/39353414
type: QuestionComment
has text: I have used preloader.js, which I found on web. I am updating my code with that javascript
comment on: http://stackoverflow.com/q/25256927
score: 0
type: Comment

http://stackoverflow.com/q/25358040
tagged with: angular-ui-router
tagged with: javascript
has title: AngularJS with ui-router: Changing value of a parent dependency of from child's controller
type: AnsweredQuestion
has body: Environment: AngularJS application (using UI Router) that has nested states. Short version: How do I change the value of a parent-state's dependency from inside a child's controller, such that siblings of the child state, who are also using the dependency will get the new value. Long version: Take the following configuration: shopApp.config(function($stateProvider) { $stateProvider.state('shop', { url : '/shop', templateUrl : 'shop.html', resolve : { user : function($q) { // callback that ends up returning null // because the user is not logged in } }, controller: function($scope, user) { // user is null at this point $scope.user = user; } }).state('shop.login', { url : '/login', templateUrl : 'login.html', controller : function($scope) { // onLoggedIn is called from some form-processing // logic once the user has successfully logged in $scope.onLoggedIn = function(userObject) { // I want the shop.userDetails state's controller // to get the new $scope.user value $scope.user = userObject; $state.go('^.userDetails'); }; } }).state('shop.userDetails', { url : '/userDetails', templateUrl : 'userDetails.html', controller : function($scope, user) { // Unfortunately user is null here $scope.user = user; } }); }); The shop.login state's controller has a function called onLoggedIn that's called once the user has logged in successfully. An object containing user-information is passed to this function. From this point on I want all resolutions of the user dependency to use this value (i.e userObj). Unfortunately, instead of using the value that I've just assigned to $scope.user, it seems that the value that gets passed to the controller of shop.userDetails is the one that was originally resolved when the shop state's controller was created. Does anyone know how to do this? If I'm doing this all wrong please tell me.
accepted answer: http://stackoverflow.com/a/25358335
tagged with: angularjs
type: Question
possible better answer: http://stackoverflow.com/a/34998825
has answer: http://stackoverflow.com/a/34998825
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25358335

http://stackoverflow.com/comment/39593515
has text: Use `.animate()` instead of `.css`.
comment on: http://stackoverflow.com/q/25387350
type: QuestionComment
type: Comment
score: 3

http://stackoverflow.com/comment/39541421
score: 2
has text: Cross-site access stops you lifting unauthorized content from other sites. If you really want to do this, do it server-side, so you have full control over the feed your page uses. When in doubt, use a tool like Fiddler2 (http://www.telerik.com/fiddler) to see what is being returned by the remote server to your page/script.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25359978

http://stackoverflow.com/comment/39551862
type: QuestionComment
score: 0
has text: Yes, 'as in file'. I think that answers my question. I believe the post-rendered form is somehow being cached elsewhere then.
comment on: http://stackoverflow.com/q/25364568
type: Comment

http://stackoverflow.com/a/25343874
downvote count: 0
answers question: http://stackoverflow.com/q/25343725
type: Answer
score: 2
upvote count: 2
has body: Just removing the script tag will not clear the memory, whatever was executed within that script tag stays, even after you remove it. Did you try holding on to the first jQuery, for instance, by renaming your '$' or calling your wrapped function with argument like ($)?

http://stackoverflow.com/q/25335170
has comment: http://stackoverflow.com/comment/39498203
has answer: http://stackoverflow.com/a/25335469
has comment: http://stackoverflow.com/comment/39497858
has comment: http://stackoverflow.com/comment/39498316
answer count: 1
downvote count: 0
favorite count: 0
has body: I installed Ember and its dependencies through npm and bower, and included the ember.js script in my application, thinking it would do nothing because I hadn't done anything with it yet. However, it upon refreshing the page, I get 5 console errors with different "Unexpected tokens" and "Ember is not defined". I also have a huge weird error printed in the markup of my application: "Value"===e.childNodes[2].nodeValue}(),o=function(r){var n;n=this instanceof o?this:new e,n.innerHTML=r;var i="metamorph-"+t++;return n.start=i+"-start",n.end=i+"-end",n};e.prototype=o.prototype;var s,l,u,c,h,m,p,f,d;if(c=function(){return this.startTag()+this.innerHTML+this.endTag()},f=function(){return""},d=function(){return""},n)s=function(e,t){var r=document.createRange(),n=document.getElementById(e.start),i=document.getElementById(e.end);return t?(r.setStartBefore(n),r.setEndAfter(i)):(r.setStartAfter(n),r.setEndBefore(i)),r},l=function(e,t){var r=s(this,t);r.deleteContents();var n=r.createContextualFragment(e);r.insertNode(n)},u=function(){var e=s(this,!0);e.deleteContents()},h=function(e){var t=document.createRange();t.setStart(e),t.collapse(!1);var r=t.createContextualFragment(this.outerHTML());e.appendChild(r)},m=function(e){var t=document.createRange(),r=document.getElementById(this.end);t.setStartAfter(r),t.setEndAfter(r);var n=t.createContextualFragment(e);t.insertNode(n)},p=function(e){var t=document.createRange(),r=document.getElementById(this.start);t.setStartAfter(r),t.setEndAfter(r);var n=t.createContextualFragment(e);t.insertNode(n)};el How do I even begin troubleshooting this? What have I done wrong? Added ember.js here: script(type='text/javascript'): include ../../bower_components/ember/ember.min.js script(type='text/javascript'): include ../../bower_components/ember-data/ember-data.min.js script(type='text/javascript'): include ../../bower_components/d3/d3.min.js script(type='text/javascript'): include ../../bower_components/handlebars/handlebars.min.js script(type='te…
tagged with: ember.js
accepted answer: http://stackoverflow.com/a/25335469
has title: Trying to incorporate Ember into an Express/Bower/Grunt/Node project
tagged with: node.js
score: 1
upvote count: 1
type: Question
type: AnsweredQuestion
tagged with: javascript

http://stackoverflow.com/q/25387977
favorite count: 0
has title: TypeScript : IFrame sandbox property undefined, DOMSettableTokenList has no constructor
linked to: http://stackoverflow.com/q/13021500
has comment: http://stackoverflow.com/comment/139748125
type: AnsweredQuestion
has body: I am creating an iFrame element in type script: var iFrameElement : HTMLIFrameElement = document.createElement("iframe"); iFrameElement.sandbox.add('allow-forms'); iFrameElement.sandbox.add('allow-scripts'); iFrameElement.sandbox.add('allow-same-origin'); However, the sandbox property is undefined, so the add(value: string) here fails. I cannot figure out how to instantiate the sandbox property either, here's the interface as defined in lib.d.ts: interface HTMLIFrameElement { sandbox: DOMSettableTokenList; } interface DOMSettableTokenList extends DOMTokenList { value: string; } interface DOMTokenList { length: number; contains(token: string): boolean; remove(token: string): void; toggle(token: string): boolean; add(token: string): void; item(index: number): string; [index: number]: string; toString(): string; } I am thinking there is just some syntax I don't know how to use here, or there is some other trick to get this working. I searched extensively on this site and the internet at large, however results were not particularly helpful. The answer here unfortunately does not work in TypeScript (Type 'String' is missing property 'value' from type 'DOMSettableTokenList') which makes me want to cast some object to that type. I see this guy appears to have re-implemented the type, but this seems too hacky to me right now. Help me stackoverflow, you're my only hope.
tagged with: iframe
accepted answer: http://stackoverflow.com/a/25685278
tagged with: sandbox
type: Question
tagged with: typescript
score: 5
has comment: http://stackoverflow.com/comment/39595933
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/39603343
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/25685278

http://stackoverflow.com/a/36450473
has body: I did this recently and I used the heights of the divs above the div that contains the countUp. If you want to understand more read here, here and here. This if you don't want to use jQuery. My solution looks something like this in the controller: $window.onscroll = function() { myFunction() }; function myFunction() { var bodyScrollTop = document.documentElement.scrollTop || document.body.scrollTop; //this makes it work in all browsers var height = document.getElementById("previousDiv").clientHeight; //the height of the previous div for example if (bodyScrollTop &gt; height) { //start the countUp } else { //something else } }
answers question: http://stackoverflow.com/q/25334056
score: 0
type: Answer

http://stackoverflow.com/comment/39308398
comment on: http://stackoverflow.com/q/25233013
type: Comment
type: QuestionComment
has text: [VALUE_FROM_COMBO_BOX] ... [VALUE_FROM_COMBO_BOX] ... [VALUE_FROM_COMBO_BOX]
score: 0

http://stackoverflow.com/a/25288922
type: Answer
answers question: http://stackoverflow.com/q/25288706
has body: Try adding it to an event listener like this: var eventTriggered=false; $(document).on( 'scroll', function(){ if($(document).scrollTop() &gt; 400 &amp;&amp; !eventTriggered) { alert("success"); eventTriggered=true; }else if($(document).scrollTop() &lt; 400){ eventTriggered=false; } }); This one works
score: 0

http://stackoverflow.com/a/25316726
has body: Form "validation" in Angular is not exactly the same thing as what you might expect. Angular does validate per your requirements but it does not, by default, do anything ABOUT the validation. In your plunkr, if you inspect one of the input fields, you will notice the CSS class names are changing on it as you edit. ng-pristine, ng-dirty, ng-valid, ng-invalid, etc etc. It's up to you to modify your CSS so that this does something visually, Angular will not automatically display any visual errors. Also, Angular does not prevent you from submitting an invalid form. Your code must check the form to see if it is $invalid. You can do this in the submit function (recommended), you could disable the submit button if $invalid evaluates to true (also recommended but in addition to in the submit function). You can use ng-show/ng-if/etc directives to show/hide validation errors based on the state of the form and/or fields. Essentially, Angular validation provides the mechanisms to validate the value of individual form elements. It is up to you to decide what to do with it since your business logic is bound to vary. Your UI needs, too, may vary as some forms wait for the user to submit it before displaying errors, some need to hit ajax endpoints to validate, and others provide feedback per-field as users navigate. You'll have to implement that functionality yourself or find a third-party module that does it for you. I don't have experience with any of those, but hopefully this helps fill in some of the blanks for you.
type: Answer
answers question: http://stackoverflow.com/q/25313167
has comment: http://stackoverflow.com/comment/39463697
score: 0

http://stackoverflow.com/a/25273994
answers question: http://stackoverflow.com/q/25273784
score: 0
type: Answer
has body: Setting b.name = 15 doesn't execute the function, it just overwrites the value of b.name. You could use getters and setters to react to a changing value. See John Resig's blog post or the MDN reference I edited your code to use them: var Book = function (value) { this.onChanging = []; this._name = ""; } Book.prototype = { addTest: function (fn) { this.onChanging.push(fn); }, get name() { return this._name; }, set name(val) { for (var i = 0; i &lt; this.onChanging.length; i++) { this.onChanging[i](val); } this._name = val; } }; var b = new Book(13); b.addTest(function (val) { console.log("executing", val); return true; }); b.name = 15; b.name = 17; working demo.

http://stackoverflow.com/comment/39508308
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25340883
has text: That's not a success message. it's the success `callback` from `$.post()`. it returns the data from the request. you can process the data returned from the 1st and add it to the url for the 2nd request.
score: 0

http://stackoverflow.com/q/25377476
accepted answer: http://stackoverflow.com/a/25377725
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has body: This is continuation of my previous question. Answer given by Joffrey worked fine But problem in that is, It loads the same content in all the divs which has the same class name. This should work independently for each divs. If you check the demo attached, you can see all the divs are displaying the same content as first div even though each div has different content. Here is the code used var text = $('.truncate, .truncate_another').text(); var shortText = $.trim(text).substring(0, 50).split(" ").slice(0, -1).join(" ") + "..."; $('.truncate, .truncate_another').text(shortText); $('.truncate, .truncate_another').hover(function(){ $(this).text(text); $('.truncate, .truncate_another').css('z-index', '10'); $(this).css('z-index', '100'); }, function(){ $(this).text(shortText); }); DEMO Here
tagged with: css
linked to: http://stackoverflow.com/q/25261234
type: AnsweredQuestion
has title: Single script for text truncation in multiple divs
has answer: http://stackoverflow.com/a/25377725
type: Question
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/39493004
comment on: http://stackoverflow.com/q/25332537
has text: Here it is: http://jsfiddle.net/xe3uv2sh/
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25234578
downvote count: 2
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25234649
score: -2
answer count: 1
has comment: http://stackoverflow.com/comment/39310287
tagged with: javascript
tagged with: jquery
has body: I have a piece of script that changes the background on click. But when I click anything even the screen, the background changes. I would like only the button to change the background image. I just can't seem to code it properly in jquery. Any help is most appreciated. Thanks
favorite count: 0
has answer: http://stackoverflow.com/a/25234649
has title: HTML, JQuery button on click to specific function
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39310214
upvote count: 0

http://stackoverflow.com/comment/39386071
type: QuestionComment
has text: try `/^(\w+\.)*\w+$/`
score: 0
comment on: http://stackoverflow.com/q/25275381
type: Comment

http://stackoverflow.com/comment/39592428
has text: Thank you thats exactly what I needed I tried alot using the trigger and passing variable as you did (ps named it code too) But wasnt able to do it, your code is best example of How to handle On click checkbox with trigger function . really grateful for your help, I know this would have been time consuming , thanks for sparing for your time to help me out on this
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25384732
type: Comment

http://stackoverflow.com/q/25271206
type: Question
downvote count: 2
has body: i'm new to NodeJS and i'm using MongoJS to connect to my database. All is working fine, but when i use db.collection.find() function, it returns only the first 10 results on the database. function listMessages(from,to){ console.log("[REQ] User "+from+" asked chat with "+to); var htext = 'Welcome to the chat&lt;br/&gt;'; db.messages2.find({$or:[{from_id: from, to_id: to}, {from_id: to, to_id: from}]},function(err, echoData) { if( err || !echoData) console.log("No messages found"); else echoData.forEach( function(returnData) { htext += returnData.from_id+": "+returnData.text+"&lt;br/&gt;"; }); io.sockets.emit('html message '+from, htext, to); }); } It works fine, but returns only the first 10 results on the database, even if i use limit. I've tried to use this too, and it didnt worked: db.messages2.find({$or:[{from_id: from, to_id: to}, {from_id: to, to_id: from}]},{},{limit: 50}, function(err, echoData) { What I need to do to fix this? Thanks!
upvote count: 1
answer count: 1
tagged with: node.js
tagged with: mongojs
has answer: http://stackoverflow.com/a/25271247
tagged with: socket.io
tagged with: mongodb
has title: MongoJS find() returning only 10 results?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25271247
type: AnsweredQuestion
score: -1
favorite count: 0

http://stackoverflow.com/comment/39304705
has text: hm. any other way to do it?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25231958

http://stackoverflow.com/a/25279397
type: Answer
has body: try this,$("#datepicker").datepicker({ maxDate: new Date() });
answers question: http://stackoverflow.com/q/25279113
score: 0

http://stackoverflow.com/comment/39386364
has text: possible duplicate of [Browser detection in JavaScript?](http://stackoverflow.com/questions/2400935/browser-detection-in-javascript)
comment on: http://stackoverflow.com/q/25275483
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39383696
type: Comment
type: QuestionComment
has text: Maybe because it doesn't have any value ultil you click on `#mainnav1 li a` element ;)
comment on: http://stackoverflow.com/q/25273979
score: 2

http://stackoverflow.com/q/25306775
answer count: 0
has body: In my website, I have a search box with a button. an auto suggest box will appear when search in the box. I added keyup event on js for move the selection up and down. And on enter press, go to a js file for the ajax call. The same thing i wrote for click event too. But when I select a list item using up or down key and press enter key, it automatically refresh the page with an additional ? in the url. I am using Progressive — Responsive Multipurpose HTML Template. Dont know whether it is an inbuilt code in it. my html is and java script code is $("#navSearchInput").keyup(TriggerSearch); function TriggerSearch(e) { var search_string = encodeURIComponent($("#navSearchInput").val()); e = e || window.event; var keycode; if (window.event) { keycode = e.which ? window.event.which : window.event.keyCode; } var key = e.which; switch (key) { case 38: break; case 40: break; case 13: e.preventDefault(); search_product(); break; default: if (search_string != "") { //default code } function search_product(e) { //code goes here } What is the problem with it? Please help...
has title: button automatically triggers "click" when press "enter key"
tagged with: onkeyup
type: Question
has comment: http://stackoverflow.com/comment/39444183
has comment: http://stackoverflow.com/comment/39444159
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39446611
tagged with: button
has comment: http://stackoverflow.com/comment/39444034
tagged with: click
has comment: http://stackoverflow.com/comment/42004211
type: UnansweredQuestion
tagged with: enter

http://stackoverflow.com/comment/39313256
type: Comment
comment on: http://stackoverflow.com/a/25236166
score: 0
type: AnswerComment
has text: can you share plunker ...using that I didn't know how I will integrate this with angular

http://stackoverflow.com/q/25288223
has comment: http://stackoverflow.com/comment/39409594
accepted answer: http://stackoverflow.com/a/25289668
has comment: http://stackoverflow.com/comment/39411323
has comment: http://stackoverflow.com/comment/39409737
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/39409927
has comment: http://stackoverflow.com/comment/39410813
upvote count: 0
has title: Check if option and radio input are selected and display different divs
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25289668
has comment: http://stackoverflow.com/comment/39409455
favorite count: 0
tagged with: css
type: AnsweredQuestion
has body: I want to check the reliability of the form showing percentage of reliability(like progress bar of password) I have more radio inputs and select option and I want to display a div if one element over "n" is selected, a different div if 2 elements over "n-1" are selected(and hide the old one) and so on. How can I do it with javascript? -- empty -- product1 product2 product3 product4

http://stackoverflow.com/comment/39309050
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25233980
has text: try `scrollTop: elementOffset`

http://stackoverflow.com/q/25321603
has title: any different between (function( ) { } ( ) ) and (function() { } ) ( )
linked to: http://stackoverflow.com/q/3384504
has comment: http://stackoverflow.com/comment/39471845
has comment: http://stackoverflow.com/comment/39471782
linked to: http://stackoverflow.com/q/423228
has comment: http://stackoverflow.com/comment/39471792
answer count: 0
type: Question
score: 0
duplicate of: http://stackoverflow.com/q/423228
tagged with: syntax
has comment: http://stackoverflow.com/comment/39471809
has body: Example: var hello = (function(text) { return "hello " + text }("world")) And var hello = (function(text) { return "hello " + text })("world") are they the same?
has comment: http://stackoverflow.com/comment/39471815
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/39491888
comment on: http://stackoverflow.com/a/25331970
has text: The `brand in notebooks` repeat is just displaying ALL of the JSON data?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25253463
accepted answer: http://stackoverflow.com/a/25253749
tagged with: nginx
tagged with: apache
tagged with: javascript
answer count: 1
tagged with: websocket
favorite count: 0
has answer: http://stackoverflow.com/a/25253749
score: 6
tagged with: php
type: AnsweredQuestion
has title: Are websockets the right technology to be used to update progress bars for the client and how to implement it?
has body: Scenario I am developing some sort of web based cloud storage service. One feature is that the user can initiate transcoding of video files (so that they can be streamed on different devices). This takes some time and I want to display a progress bar to the user. My plan is to submit the job using ajax where it is written into a database. The ajax call returns the ID of the job in the database, and this id will be used as the channel for notifications. So when the job has been submitted, the client subscribes to the channel "job-databaseID" on some self hosted websocket server. Transcoding workers then periodically select pending jobs from the database table and process them. While processing they push their progress to the websocket server to the same channel where the client is listening. The front-end application should be a website with javascript and jquery. The back end should be programmed in PHP and MySQL and an apache or nginx webserver. Question Is this a proper way of using websockets? Usually I see websockets employed in a on-to-many notification scenario. Here it is a one-to-one notification scenario. Are there maby better alterantives for this kind one way information flow? Also I often see channels for Websocket scenarios to be more or less long-lived. Here it is very short-lived. Would it maby make more sense to make one channel per user? What would be a good websocket server for that kind of use? Ideally the channels would be auto-removed once no client is connected to it any more and auto-created the same way, so I don't need to take care of that.
upvote count: 7
downvote count: 1
type: Question

http://stackoverflow.com/q/25321140
has comment: http://stackoverflow.com/comment/39470934
tagged with: javascript
has body: Hi all JavaScript Gurus, I am doing some Inline Validation using pure JavaScript for Email. While i do testing for the first time it shows all the validation fine, after entering of valid email , if i delete valid email (coming back to this input box after visiting other input box in form) and enter in-valid email or delete an valid one it does not show up the validation at all. Please note this is nothing to do with submit button. function validateEmail(){ var userEmail = document.getElementById('email'); var errorE = document.getElementById('emailError'); var validEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if(!validEmail.test(userEmail.value)){ errorE.classList.remove('display'); errorE.classList.add('validation'); return false; }else{ document.getElementById('emailError').style.display = "none"; return true; } } Here is my HTML &lt;p&gt; &lt;label class='label' for='email'&gt; Email &lt;/label&gt; &lt;input type='text' id='email' name='email' onblur="validateEmail(email)"&gt; &lt;span id="emailError" class="display"&gt; You must enter a valid email address &lt;/span&gt; &lt;/p&gt; Please guide me on this as i am new and learning javascript
score: 0
tagged with: validation
type: UnansweredQuestion
has title: Validation on Email works first time
has comment: http://stackoverflow.com/comment/39530113
has comment: http://stackoverflow.com/comment/39470942
answer count: 0
has comment: http://stackoverflow.com/comment/39471059
has comment: http://stackoverflow.com/comment/39471022
type: Question

http://stackoverflow.com/q/25264372
duplicate of: http://stackoverflow.com/q/818111
has comment: http://stackoverflow.com/comment/39365260
score: 2
has comment: http://stackoverflow.com/comment/39365445
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25264831
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/4851595
type: AnsweredQuestion
has body: I'm building a file uploader. but I want to upload from a folder on the server so the path of the browser is restricted to C:\wamp\www\JSSoundRecorder\upload how can I specify the path in the html input file?? html code: Open jquery code: $('#id').on('click', function() { $('#yourinputname').trigger('click'); }); example: http://jsfiddle.net/QVAC7/
upvote count: 2
accepted answer: http://stackoverflow.com/a/25264831
has title: file browser with specific path
linked to: http://stackoverflow.com/q/818111
type: Question

http://stackoverflow.com/comment/39527474
has text: While it solves the problem, the trouble with this is the functions are defined on every Tree instance, rather than once on Tree.prototype (as I'm sure you're aware, but I thought I'd make explicit)
score: 0
comment on: http://stackoverflow.com/a/25352317
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/39304807
has text: I just did a Google search and found the answer immediately.
comment on: http://stackoverflow.com/q/25231958
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39586694
score: 0
comment on: http://stackoverflow.com/a/25382146
type: Comment
has text: you did not set up your views correct so it loaded in the wrong ion-nav-view Both the ion tabs section and the app.js has been edited @user602088
type: AnswerComment

http://stackoverflow.com/q/25321019
possible better answer: http://stackoverflow.com/a/25321039
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25321039
tagged with: javascript
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25321038
has comment: http://stackoverflow.com/comment/39470701
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 2
linked to: http://stackoverflow.com/q/8950146
tagged with: opacity
downvote count: 1
has title: if not working for .innerHTML in Javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39470702
has answer: http://stackoverflow.com/a/25321038
has body: I have typed the following code in Javascript which just hides and shows a div with a youtube video on it. : Javascript: function showVideo2() { document.getElementById("TheVid").style.opacity = 1; } function hideVideo2() { document.getElementById("TheVid").style.opacity = 0; } function determineShowHideVid() { if (document.getElementById("PlayerDetermine").innerHTML.match ="Play") { showVideo2(); document.getElementById("PlayerDetermine").innerHTML = "Close"; } else { hideVideo2(); document.getElementById("PlayerDetermine").innerHTML = "Play"; } } HTML Play Play x CSS #TheVid { -webkit-transition: opacity 2s; -moz-transition: opacity 2s; -o-transition: opacity 2s; transition: opacity 2s; } .vid { position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden; } .vid iframe, .vid object, .vid embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } However, only 'hideVideo2()' and showVideo2() works, and determineShowHideVid() does not. I was trying to get innerHTML so that if it says Play, the video shows. if not, the video hides. The thing is, Button element PlayerDetermine changes it's text content to close and shows the video, but does not hide it back. Is there something wrong with my IF statement in javascript?

http://stackoverflow.com/a/30379161
has body: I added the 'useIntranet' option as a parameter to fetchResult and that seemed to solve the issue. var options = {"useIntranet" : true}; var fetchResult = UrlFetchApp.fetch(fullURL, options);
score: 0
answers question: http://stackoverflow.com/q/25282315
type: Answer

http://stackoverflow.com/q/25365312
has comment: http://stackoverflow.com/comment/39557809
possible better answer: http://stackoverflow.com/a/42836309
has comment: http://stackoverflow.com/comment/39551386
has answer: http://stackoverflow.com/a/42836309
tagged with: javascript
has comment: http://stackoverflow.com/comment/39553958
answer count: 2
has comment: http://stackoverflow.com/comment/39555733
downvote count: 0
has answer: http://stackoverflow.com/a/25366030
tagged with: jquery
has comment: http://stackoverflow.com/comment/39551962
favorite count: 0
tagged with: model
has body: I tried both switch cases and if else statements to get models with id accept, reject, review to show up but none is working for me. I just want to confirm if I am doing something wrong in terms of logic and syntax. Bulk Actions Accept Reject Report Apply or
has title: How do I assign different data-target to different option values so different models shows up?
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/25366030
has comment: http://stackoverflow.com/comment/39561519
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39553186
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39553367

http://stackoverflow.com/q/25290322
type: Question
tagged with: javascript
tagged with: fullcalendar
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has body: I have been able to get my FullCalendar plug in working on my local host and want to be able to create events through a pop up window. The following code sets up the calendar and allows me to select a time slot and I thought present the modal view to allow an entry to be made: $(document).ready(function(){ var calendar = $('#calendar').fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'agendaDay agendaWeek month' }, defaultView: 'agendaWeek', slotDuration : '00:15:00', scrollTime: '13:00:00', minTime : '09:00:00', maxTime : '21:00:00', slotEventOverlap: false, firstDay : 1, selectable: true, selectHelper: true, editable:true, //select function: select: function(start, end, allDay){ endtime = $.fullCalendar.formatDate(end, 'h:mm tt'); starttime = $.fullCalendar.formatDate(start, 'ddd, MMM d, h:mm tt'); var mywhen = starttime + ' - ' + endtime; $('#createEventModal #apptStartTime').val(start); $('#createEventModal #apptEndTime').val(end); $('#createEventModal #apptAllDay').val(allDay); $('#createEventModal #when').text(mywhen); $('#createEventModal').modal('show'); }, }); //function to submit the form $('#submitButton').on('click', function(e){ //cancel the link options e.preventDefault(); doSubmit(); }); }); function doSubmit(){ alert("form submitted"); $("#createEventModal").modal('hide'); $("#calendar").fullCalendar('renderEvent', { title: $('#clientName').val(), start: new Date($('#apptStartTime').val()), end: new Date($('#apptEndTime').val()), allDay: ($('#apptAllDay').val() == "true"), }, true); } this is my HTML code as it stands to create my modal form: x Book Appointment Client: When: Cancel Save Appointment I don't know what I am missing to get the form to present to user. I am new to web development and would really appreciate some help with this
tagged with: http://stackoverflow.com/tag/html
tagged with: twitter-bootstrap
has title: How do I get the modal window to pop up when I select a time slot on fullCalendar?
has answer: http://stackoverflow.com/a/25319030

http://stackoverflow.com/a/25345528
has comment: http://stackoverflow.com/comment/39527806
score: 0
has comment: http://stackoverflow.com/comment/39515660
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25345049
has comment: http://stackoverflow.com/comment/39515691
has body: You can bind the value of the input field to a javascript function using &lt;input type="text" value="{{getValue()}}"&gt;. The getValue() function can then check the myColor variable and return accordingly. I also simplified the model a bit, colors is now an array of strings. When myColor==="one", getValue returns "rahul" which populates the input, else it returns ""; See: plunkr
answers question: http://stackoverflow.com/q/25345049

http://stackoverflow.com/a/26712522
type: Answer
answers question: http://stackoverflow.com/q/25375764
has body: I think you need to prefix your functions in your object return with self.. Like this: return { items: self.items, start_date: self.start_date, end_date: self.end_date, records_per_page: self.records_per_page, search_for: self.search_for, records: self.records, pages: self.pages, getShippersData: self.getShippersData, gridViewModel: self.gridViewModel And then in your activate function, call self.functionName instead of this.. I've had similar problems when doing just like you and calling this. in the object wich I'm returning.
score: 0

execcommand
tags question: http://stackoverflow.com/q/25387001
type: Tag
tag name: execcommand

rsvp.js
type: Tag
tag name: rsvp.js
tags question: http://stackoverflow.com/q/25367146

http://stackoverflow.com/q/25274114
tagged with: mysql
type: Question
has answer: http://stackoverflow.com/a/25274609
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has body: I have a page where user can add the records to the mysql database. On the same page there is a list existing records in the database. I use ajax to add the record to database, sorry for old version of mysql, will get updated after I get this thing to work first: $(document).ready(function(){ //on the click of the submit button $("#btn_submit").click(function(){ //get the form values var username = $('#hdn_username').val(); var name = $('#txt_name').val(); var brand = $('#txt_brand').val(); //make the postdata var postData = 'username='+username+'&name='+name+'&brand='+brand; //call your input.php script in the background, when it returns it will call the success function if the request was successful or the error one if there was an issue (like a 404, 500 or any other error status) $.ajax({ url : "input.php", type: "POST", data : postData, success: function(data,status, xhr) { //if success then just output the text to the status div then clear the form inputs to prepare for new data $("#status_text").html(data); $('#name').val(''); $('#brand').val(''); }, error: function (jqXHR, status, errorThrown) { //if fail show error and server status $("#status_text").html('there was an error ' + errorThrown + ' with status ' + textStatus); } }); }); }); My html is: Product Name Brand Quantity Price Delete [insert_php] $current_user= wp_get_current_user(); $username= $current_user->user_login; mysql_connect("localhost","xxxxx","xxxx");//database connection mysql_select_db("xxxx"); $query= "SELECT * FROM wp_userdata WHERE username='$username'"; $result= mysql_query($query); if (!$result) { die("Error db request: ". mysql_error()); } while ($result_row = mysql_fetch_array($result, MYSQL_ASSOC)){ echo ' '.$result_row['product_name'].' '.$result_row['product_brand'].' '.$result_row['product_quantity'].' '.$result_row['product_link'].' X '; } [/insert_php] Add Products Product Name Brand And my input.php is: mysql_connect("localhost","xxxx","xxxx");//database connection mysql_sele…
accepted answer: http://stackoverflow.com/a/25274796
possible better answer: http://stackoverflow.com/a/25274609
has answer: http://stackoverflow.com/a/25274796
has title: Reload the query after adding the record to mysql database with ajax without reloading the page
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/q/25239453
has answer: http://stackoverflow.com/a/25243426
has comment: http://stackoverflow.com/comment/39325073
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39319483
score: 0
has title: Cross domain loading of widget template
has body: I am hosting a widget on another domain than the site in which I am embedding the widget. The dashboard.js loads fine, but the HTML template gets, XMLHttpRequest cannot load http://192.168.2.72:8081/widgets/templates/dashboard.html. Origin http://192.168.2.72:8080 is not allowed by Access-Control-Allow-Origin. The url to the template is correct, so I can only assume this is a cross domain error. In the widget, the template is referred to like: templatePath: dojo.moduleUrl("monitor/dashboard", "../templates/dashboard.html"), This all works when it's a local widget. Is there anyway to get dojo to load the HTML template in better way? The way I have defined loader,
answer count: 1
has comment: http://stackoverflow.com/comment/39319420
accepted answer: http://stackoverflow.com/a/25243426
tagged with: dojo
has comment: http://stackoverflow.com/comment/39319152
type: AnsweredQuestion

http://stackoverflow.com/comment/39322933
comment on: http://stackoverflow.com/a/25241521
score: 0
type: Comment
type: AnswerComment
has text: @kpsingh: No, JS acts like the C preprocessor, or PHP's Zend Engine: it concatenates all of the files into one big script, and runs that, starting at line 1 of the first file, all the way through to the last line of the final script. All this in one single thread. If that fails, all of the code fails.

http://stackoverflow.com/a/25270669
type: AcceptedAnswer
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25270539
has body: You've defined your route as follow_user POST /users/:id/follow(.:format) users#follow But in the jQuery snippet, you're using /user/... instead of /users/...
score: 1
answers question: http://stackoverflow.com/q/25270539
upvote count: 1

http://stackoverflow.com/comment/39442361
has text: Actually I'm working in Laravel. $pbid is passed through to the View. If I however set the $pbid manually in the view, it works. What's weird is that `var_dump($pbid); $pbid=5; var_dump($pbid);` returns exactly the same, but the jQuery selector only works when it's set explicitly within the view.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25305843

http://stackoverflow.com/comment/39531229
type: Comment
type: QuestionComment
score: 1
has text: Why not just use CSS? It's way faster than trying to do it with jQuery.
comment on: http://stackoverflow.com/q/25354421

http://stackoverflow.com/q/25296507
accepted answer: http://stackoverflow.com/a/25510107
has comment: http://stackoverflow.com/comment/39425498
type: Question
tagged with: jakarta-ee
has comment: http://stackoverflow.com/comment/39425512
has body: I'm creating a Java EE web application. This application uses Java as the server side programming language and uses Javascript for the client side. The Javascript is in an HTML5 document (needs to be for a specific reason). My Javascript needs some data from the server in order to perform its task. Which leaves me with my problem: how can I fill a Javascript variable with data from the Java server? I was looking into using JSF and incorporating the HTML5 with the Javascript into it. Apparently, the server side code is rendered first and then sent to the client. In that case, I can do something like this: var data = #{controller.getData}; If this does work, there is one problem: the data is "static". Whereas, I need to be able to change this data frequently by receiving new data from the server. But, if the server side code is already rendered and then sent to the client, each call to #{controller.getData} will return the same value. So, this lead me to look into AJAX. JSF provides an AJAX Javascript library, however, I can't seem to understand how to use it to change a variable within my Javascript code in the HTML5 document (within the JSF page). So, again, how can I fill a Javascript variable with data from the Java server?
has title: transferring data between java backend and javascript frontend
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25298541
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/39425573
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25318794
has answer: http://stackoverflow.com/a/25298541
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39464391
tagged with: jsf
has comment: http://stackoverflow.com/comment/39464412
has answer: http://stackoverflow.com/a/25510107

http://stackoverflow.com/q/25292613
tagged with: angularjs
has body: In my angularjs project, I have the following files: /index.html /js/apps.js // Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a attribute in index.html) // the 2nd parameter is an array of 'requires' // 'starter.controllers' is found in controllers.js angular.module('starter', ['ionic', 'starter.controllers', 'starter.services']) .run(function($ionicPlatform) { $ionicPlatform.ready(function() { if(window.StatusBar) { StatusBar.styleDefault(); } // Register stopping and starting analytics on app open and close document.addEventListener("pause", window.analytics.Stop(), false); document.addEventListener("resume", window.analytics.Start(), false); // Exit the application if you go offline document.addEventListener("offline", function(){}, false); }); }) .config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('app', { url: "/app", abstract: true, templateUrl: "templates/menu.html", controller: 'AppCtrl' }) .... // if none of the above states are matched, use this as the fallback $urlRouterProvider.otherwise('/login'); }); /js/services/CloudDatabases.js angular.module('starter.services') .service('CloudDatabases', ['$http', function ($http) { var urlBase = '/api/customers'; this.getDatabases = function () { console.log('CloudDatabases.getDatabases();'); return 'test getDatabasesResponse'; }; }]) /js/controllers.js angular.module('starter.controllers', ['CloudDatabases']) // Login controller .controller('LoginCtrl', function($scope, $ionicLoading, $http, $ionicPopup, $rootScope, $state, $ionicViewService, CloudDatabases) { CloudDatabases.getDatabases(); // Form data for the login modal $scope.loginData = {}; // Try loading the loing data from storage if the user has already logged in $scope.loginData.username = window.localStorage['username'] || ''; $scope.loginData.password = window.localStorage['password'] || ''; $sco…
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25292676
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/25292676
tagged with: javascript
upvote count: 1
answer count: 1
has title: Angular JS Services and Controllers in Different Files Causes Error
favorite count: 0

http://stackoverflow.com/q/25260317
type: Question
upvote count: 2
has body: I'm using the state definitions below(UI-Router's). Once I invoke $state.go('products.new') the controller (ProductCtrl) is invoked twice. For some reason, UI Router "forgets" the original state change and invokes the controller based on the url only (which is indeed ambiguous in this case). If I arrive at the page directly though (deep link) the controller is invoked once as it should. Any suggestion how to make it work? .state('products', { abstract: true, template: "&lt;div ui-view&gt;&lt;/div&gt;" }) .state('products.product', { url: '/products/:productId', templateUrl: 'views/productView.html', controller: 'ProductCtrl' }) .state('products.new', { url: '/products/new', templateUrl: 'views/productView.html', controller: 'ProductCtrl' })
answer count: 3
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/50449813
downvote count: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/15535336
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/31015673
score: 2
tagged with: angular-ui-router
has answer: http://stackoverflow.com/a/25437880
has title: url ambiguity causes ui router to instantiate controller twice
tagged with: routes

http://stackoverflow.com/comment/39360683
type: QuestionComment
type: Comment
score: 0
has text: You could replace your `if` statement with a shorter ternary statement: `theDiv.style.display = theDiv.style.display == "none" ? "" : "none";`
comment on: http://stackoverflow.com/q/25261815

http://stackoverflow.com/a/25320777
has comment: http://stackoverflow.com/comment/39470573
has comment: http://stackoverflow.com/comment/39471216
has body: delete the inline style and add this a img{float:left} you may want to add some margin as well, but you'll get the idea Note: it's a good idea to give a class to that img so you don't have to be this generic. Like .bullet{float:left} HTML &lt;img class="bullet" src="uyourimage" id="place-holder-1" /&gt;
type: Answer
has comment: http://stackoverflow.com/comment/39470499
has comment: http://stackoverflow.com/comment/39470980
has comment: http://stackoverflow.com/comment/39470761
has comment: http://stackoverflow.com/comment/39470362
score: 2
has comment: http://stackoverflow.com/comment/39470700
downvote count: 0
has comment: http://stackoverflow.com/comment/39471085
has comment: http://stackoverflow.com/comment/39470288
upvote count: 2
has comment: http://stackoverflow.com/comment/39471275
has comment: http://stackoverflow.com/comment/39471310
has comment: http://stackoverflow.com/comment/39470886
has comment: http://stackoverflow.com/comment/39470650
answers question: http://stackoverflow.com/q/25320752
has comment: http://stackoverflow.com/comment/39471161

http://stackoverflow.com/comment/39349011
type: AnswerComment
has text: "browserify": "^4.2.3", "minifyify": "^3.0.12", node v0.10.29
type: Comment
comment on: http://stackoverflow.com/a/25252913
score: 1

http://stackoverflow.com/comment/39545328
comment on: http://stackoverflow.com/q/25361989
type: QuestionComment
type: Comment
score: 7
has text: Looks like `$x` is not returning any results. None of those tests in the `if` statement are going to work anyway, replace it with `if($x.length) { ... }`. jQuery will never return `""`, `"undefined"` or `null` from a selector.

http://stackoverflow.com/a/25354072
has body: You should use "match" function to submit the form when the user came from any page of the site anything.com $(document).ready(function(){ var uri = document.referrer; if (uri.match(/anything.com/)){ $("#yourForm").submit(); } });
answers question: http://stackoverflow.com/q/25353892
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/39561234

http://stackoverflow.com/a/25386243
has comment: http://stackoverflow.com/comment/39591538
has comment: http://stackoverflow.com/comment/39592129
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39592600
score: -1
has comment: http://stackoverflow.com/comment/39592309
downvote count: 2
answers question: http://stackoverflow.com/q/25386153
upvote count: 1
has comment: http://stackoverflow.com/comment/39592112
type: Answer
has comment: http://stackoverflow.com/comment/39592156
accepted answer of: http://stackoverflow.com/q/25386153
has comment: http://stackoverflow.com/comment/39591974
has body: As long as you don't have circular structures, you can use JSON Stringify to make a deep comparison of every room attribute _.uniq(input, function(input){ return JSON.stringify(input.position.room) });
has comment: http://stackoverflow.com/comment/39591395

http://stackoverflow.com/a/25266275
score: 0
has comment: http://stackoverflow.com/comment/39371357
type: Answer
has comment: http://stackoverflow.com/comment/39407426
has body: If you want to access local file in chrome ?? Sometimes it’s cool to debug and test javascript applications in Chrome but you want to read / write to local files. Example: you’re looking to use ajax and do a $.getJSON(‘json/somefile.json’). Chrome by default won’t allow this and will throw an error similar to Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. Or XMLHttpRequest cannot load. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. Chrome does have a switch to enable this, it’s quite easy to turn on. You’ll need to make sure Chrome is closed completely, and run chrome with the ‘–allow-file-access-from-files’ flag. Ie: C:\Users\&lt;user&gt;\AppData\Local\Google\Chrome\Application&gt; chrome --allow-file-access-from-files Or you should be able to run: %localappdata%\google\chrome\application\chrome --allow-file-access-from-files I’ve made the below into a .bat file I use, if you find it helps. start "chrome" %localappdata%\google\chrome\application\chrome --allow-file-access-from-files exit To see if the flag is set, you can visit: chrome://version/ and look at the Command Line section and you should see –allow-file-access-from-files You’ll most likely need to run this with at least admin access, and I would caution visiting unknown sites with this setting on, as they could capitalize on your setting and potentially read local files. REF: Reference Link -Allow Local File Access in Chrome (Windows)
answers question: http://stackoverflow.com/q/25266119
has comment: http://stackoverflow.com/comment/39390460

http://stackoverflow.com/q/25353847
type: Question
has comment: http://stackoverflow.com/comment/39530432
has comment: http://stackoverflow.com/comment/40033865
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/39530473
has title: Read a page generated with JavaScript
has body: this time I'm looking for something really special. In my PHP page, I got a table generated by a Javascript, here is the example : Example Page This table is racing game results. I didn't write the JS, and I can't change the format of the results. What I need is to parse these results to get variables, to generate championship results giving points to guys, adding points of multiple series, etc... I tried : Parsing with DOMDocument, also substr, but as it's JS generated it can't work. >>this solution&lt;&lt; which sounded good but it doesn't work. Do you guys have any idea to get an exploitable array ? If not, what do you suggest as alternative solution ? I'm not able to reproduce the JS in a PHP function, too hard. Here is the JS : click Thank you !
score: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39530495
linked to: http://stackoverflow.com/q/11441272
tagged with: php
has answer: http://stackoverflow.com/a/25354016
upvote count: 1
downvote count: 1

http://stackoverflow.com/a/25298777
type: Answer
answers question: http://stackoverflow.com/q/25290977
has comment: http://stackoverflow.com/comment/39482320
score: 0
has body: you need something like this ViewModel function RowData(ids, comments) { var self = this; self.comments = ko.observable(comments).extend({ required: true }); self.ids = ko.observable(ids); } var Vm = function () { var self = this; //definition for Sec1 self.Sec1 = ko.observableArray([]); self.selectedIDS = ko.observable(); self.comment = ko.observable(); //some function which will add the new row with values self.addRow = function () { self.Sec1.push(new RowData(self.selectedIDS(), self.comment())); }; //result has the IDS value and comment from an ajax call self.removeRow = function (item) { self.Sec1.remove(item); }; self.IDS = ko.observableArray([{ value: "0", ids: "Choose..." }, { value: "1", ids: "Drip" }, { value: "2", ids: "Flood - Ditch" }, { value: "3", ids: "Flood - Gated Pipe" }, { value: "4", ids: "Pivot" }, { value: "5", ids: "Sprinkler" }, { value: "6", ids: "Other" }]); }; ko.applyBindings(new Vm()); View Irrigation Delivery System Comment Add Irrigation Delivery System Comments Remove jsFiddle Demo
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25290977

source-maps
type: Tag
tag name: source-maps
tags question: http://stackoverflow.com/q/25234028

http://stackoverflow.com/q/25363487
accepted answer: http://stackoverflow.com/a/25363548
has answer: http://stackoverflow.com/a/25363514
has answer: http://stackoverflow.com/a/25363985
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25363517
upvote count: 5
has answer: http://stackoverflow.com/a/25363575
possible better answer: http://stackoverflow.com/a/25363517
has body: I have string like this:- var src=url("http://localhost:200/assets/images/eyecatcher/6/black6.png)" And now I want to get image name i.e black6.png and folder name 6. I know there is substr function I can use but the file name and folder name will be dynamic like orange12.png and 12 etc. How I can get these values? Please help me. Thanks
type: Question
has comment: http://stackoverflow.com/comment/41178597
score: 5
has title: Get values from string using jquery or javascript
downvote count: 0
answer count: 7
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25363548
favorite count: 0
has comment: http://stackoverflow.com/comment/39547872
has comment: http://stackoverflow.com/comment/39547898
has comment: http://stackoverflow.com/comment/41178346
has answer: http://stackoverflow.com/a/25363612
has comment: http://stackoverflow.com/comment/39547897
has answer: http://stackoverflow.com/a/25363569

http://stackoverflow.com/comment/39344358
type: Comment
comment on: http://stackoverflow.com/a/25252569
has text: That makes perfect sense yet for some reason for me it's not evaluating as it seems it should be
type: AnswerComment
score: 0

http://stackoverflow.com/a/25278862
downvote count: 0
score: 1
has body: Because you move the canvas, the hit detection code is off because it uses the pageX,pageY values which are values relative to the page. You can get positions relative to the canvas itself by using the offsetX,offsetY values which should get you better hit detection without have to do extra calculations function btnClick(e) { // Variables for storing mouse position on click var mx = e.offsetX, my = e.offsetY; You may need to do this in other parts of the code as well, and/or other calculations to make sure the hit detection is correct
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25278756
accepted answer of: http://stackoverflow.com/q/25278756
type: Answer

http://stackoverflow.com/comment/39536839
type: QuestionComment
has text: You can't do Ajax calls to resources on a different domain than you are running unless they give you access to do so or unless the service supports JSONP and you use that (which doesn't even actually make an Ajax call, it uses a ` ` tag). I'd suggest you read up on how the specific API you're trying to use supports cross-domain access.
score: 0
comment on: http://stackoverflow.com/q/25357475
type: Comment

http://stackoverflow.com/q/25374153
score: 1
has title: Distinct, ranged colors in google geochart
upvote count: 1
tagged with: google-visualization
answer count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to make a google geochart with a range of values set as a specific, solid color. Example: number of cookies- 0-10: red 11-20: yellow 21-30:green I'm trying to use the colorAxis.values object to do this like this: var options = { colorAxis: {values:[0, 10], colors:['red', 'red'], values:[11, 20], colors:['yellow', 'yellow'], values:[21, 30], colors:['green', 'green']} }; Is it possible to do what I'm trying here?
favorite count: 0
has answer: http://stackoverflow.com/a/25394177
downvote count: 0
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/107402329
comment on: http://stackoverflow.com/a/28151305
score: 0
type: AnswerComment
type: Comment
has text: And then raise an invoice as well :/

http://stackoverflow.com/q/25319388
has comment: http://stackoverflow.com/comment/39468240
has title: Weird code making Bootstrap scrollspy work, how do I track the bug?
has answer: http://stackoverflow.com/a/26026377
score: -1
type: Question
has body: So the following selector and definition is somehow allowing my scrollspy to mostly behave the way it is supposed to in Chrome. Without it, the scrollspy jumps to halfway down the screen. The CSS looks like this. ul.scrspy.affix { top: 1.85rem; } This chaining of classes is very odd and I want to udnerstand what is going on and find a better way to accomplish what it is doing. Additionally, when I go into the element inspector in my rendered page, the browser is changing my "affix" class to "affix-top" which also very odd. I welcome any recommendations on how to track down the issues, and am open to suggestions on how to fix the problem. FYI, my scrollspy has two levels of children, so it is a more complex list than the one found on getboostrap.com. There are examples of this on the lesscss.com site.
tagged with: scrollspy
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
downvote count: 1

http://stackoverflow.com/q/25362000
has answer: http://stackoverflow.com/a/25362497
has answer: http://stackoverflow.com/a/25362541
tagged with: javascript
answer count: 6
score: 0
has body: I'm working on a requirement, where in I display the fields based on radio button selection. Below is the code - $( document ).ready(function() { $('#selection_0').select(function () { $('#text_to_speech').show(); $('#recorded_messages').hide(); $('#recorded_messages').find('input, textarea, button, select').each(function () { $(this).prop('disabled', true)}); $('#text_to_speech').find('input, textarea, button, select').each(function () { $(this).prop('disabled', false)}); }); $('#selection_1').select(function () { $('#recorded_messages').show(); $('#text_to_speech').hide(); $('#recorded_messages').find('input, textarea, button, select').each(function () { $(this).prop('disabled', false)}); $('#text_to_speech').find('input, textarea, button, select').each(function () { $(this).prop('disabled', true)}); }); }); I'm unable to make this code work. There is no error in console as well. FIDDLE
has comment: http://stackoverflow.com/comment/39545147
tagged with: jquery
has answer: http://stackoverflow.com/a/25362081
has answer: http://stackoverflow.com/a/25362124
has comment: http://stackoverflow.com/comment/39545196
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25362169
has comment: http://stackoverflow.com/comment/39544991
has answer: http://stackoverflow.com/a/25362568
type: Question
has title: Unable to hide or show div based on radio button selection in jQuery

http://stackoverflow.com/q/25288648
upvote count: 4
answer count: 1
downvote count: 0
has title: Nested ng-repeat-start / ng-repeat-end
favorite count: 0
has body: ng-repeat-start / ng-repeat-end are used for looping through data without rendering parent element [Portal to Docs]. In my case, I want to display data in nested ng-repeat-start / ng-repeat-end blocks without extra elements. I've tried to put two ng-repeat-start directives into the same element but it fails to display correctly. I somehow figured out a workaround as displayed below [Portal to Demo]. Any better solution for case like this? data [{ name: 'Chapter 1', sections: [{ name: '1-1', words: 1024 }, { name: '1-2', words: 512 }] }, { name: 'Chapter 2', sections: [{ name: '2-1', words: 2048 }, { name: '2-2', words: 256 }] }] html {{chapter.name}} {{section.name}} {{section.words}} css tr.tr-for, tr.tr-end { display: none; }
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25291114
type: Question
tagged with: javascript
score: 4

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/25354948
tags question: http://stackoverflow.com/q/25329664
tags question: http://stackoverflow.com/q/25255691
tags question: http://stackoverflow.com/q/25265340
tags question: http://stackoverflow.com/q/25282874
type: Tag

http://stackoverflow.com/q/25337564
type: Question
has comment: http://stackoverflow.com/comment/39508271
tagged with: ember-data
tagged with: javascript
has body: I have the following Ember model for users, which contains a list of permissions: App.User = DS.Model.extend({ username: DS.attr(), permissions: DS.attr(), //e.g. ['edit', 'read'] isEditor: function() { var perms = this.get('permissions'); return perms.indexOf('edit') &gt; -1; }.property('permissions') }); I use this, amongst other things, to get a list of editors in a controller (for use in a select). When I load the page, I get this error in the console: Error: Something you did caused a view to re-render after it rendered but before it was inserted into the DOM. It happened after adding the isEditor function, and if I comment out the contents of the function it works fine, although obviously the list I'm generating from it is incorrect. But as far as I can see there is nothing wrong with the code. Edit: I'm using the function in a controller mixin: App.EditorsMixin = Ember.Mixin.create({ editors: function() { return this.store.filter('user', function(model) { return model.get('isEditor'); }); }.property() }); Edit 2: It seems that the problem might be related to the fact that not all store.find('user') promises are fulfilled when editors is called. Adding in a few console.log lines and running it though the debugger, I can see that I need something like this: editors: function() { this.store.find('user').then(function() { return this.store.filter('user', function(model) { return model.get('isEditor'); }); }); }.property() But I can't figure out how to get a list of editors out of the mess of nested promises.
has answer: http://stackoverflow.com/a/25357340
has comment: http://stackoverflow.com/comment/39518396
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39525388
type: UnansweredQuestion
tagged with: ember.js
has comment: http://stackoverflow.com/comment/39525368
has title: Ember error in computed model property
score: 1
upvote count: 1

http://stackoverflow.com/comment/39425146
comment on: http://stackoverflow.com/a/25296389
type: AnswerComment
score: 0
has text: so using the prototype to make a boolean function and declare as false. then in the onclick check the status (is the window open already), in the onclose the mistake i had made was referencing the marker as the first parameter but it must be the infowindow.
type: Comment

http://stackoverflow.com/a/25379008
upvote count: 1
has body: if you don't use any PHP Framework then you can save it by session or cookies. Then on login page you can get it and show
downvote count: 0
score: 1
type: Answer
answers question: http://stackoverflow.com/q/25378811

http://stackoverflow.com/q/25260724
tagged with: javascript
has answer: http://stackoverflow.com/a/25260779
has comment: http://stackoverflow.com/comment/39359440
downvote count: 0
accepted answer: http://stackoverflow.com/a/25260766
favorite count: 0
has answer: http://stackoverflow.com/a/25260789
answer count: 5
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39359315
has answer: http://stackoverflow.com/a/25260857
tagged with: css
has body: I'm using javascript to insert paragraphs inside a div. What it does is get the value of an input form when you click a button and append it into a specific div as a paragraph. The problem is that their margin is too big and I have no idea how to decrease them (make them closer). What do I do in this case? jsfiddle - Anyway, my code looks like this: HTML Add "> CSS #blue { height:100px; width:250px; margin-top: 10px; float:left; position:relative; background-color:blue; overflow:auto; } #red { height:100px; width:250px; margin-top: 10px; float:left; position:relative; background-color:red } form { font-size: 12px; font-family: Verdana, Arial, Sans-Serif; display: inline-block; } #bt_1 { margin-left:5px; height:35px; width:70px; margin-top: 25px; border-radius:5px; } JavaScript function addParagraph() { var word = document.getElementById("box_top").value; var pMaker = document.createElement("p"); var nodeMaker = document.createTextNode(word); pMaker.appendChild(nodeMaker); var blueDiv = document.getElementById("blue"); blueDiv.appendChild(pMaker); }
tagged with: margin
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25260775
score: 1
has answer: http://stackoverflow.com/a/25260775
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25260766
has title: CSS: How to decrease the margin of my paragraphs inside a div?
tagged with: appendchild

http://stackoverflow.com/q/25290437
score: 0
answer count: 1
tagged with: javascript
tagged with: asp.net
has comment: http://stackoverflow.com/comment/39423214
tagged with: http://stackoverflow.com/tag/html
has title: Put asp.net literal inside a control that will not load css or js
has comment: http://stackoverflow.com/comment/39417245
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39414196
has comment: http://stackoverflow.com/comment/39414046
has answer: http://stackoverflow.com/a/25295486
has comment: http://stackoverflow.com/comment/39413626
has body: There is a literal on a page that loads in css and js. I can't modify the code behind, but I want to modify the front end code so that the literal dumps the css and js into a control that will not load the css and js. Is this possible?
type: Question

http://stackoverflow.com/comment/39538080
has text: Similar issue: http://stackoverflow.com/questions/18340100/onchange-event-does-not-fire-when-value-is-changed-in-onkeyup-event
comment on: http://stackoverflow.com/q/25358168
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25378026
tagged with: parse-platform
has answer: http://stackoverflow.com/a/25378540
has title: How to get just FileName Parse.com database
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/28048494
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25378540
has answer: http://stackoverflow.com/a/28048494
tagged with: javascript
score: 0
has body: I am in little bit problem, I get the filename from Parse.com database like this. object.get("thumbnailImage").name(); and it returns me like this name. tfss-63deff46-ab55-4230-b71c-1d77d54f9bfa-Pendulum.png But i want to get exact filename for example Pendulum.png How can I get it? Thanks in advance.

http://stackoverflow.com/q/25333264
tagged with: locomotivejs
type: Question
has comment: http://stackoverflow.com/comment/39494523
has comment: http://stackoverflow.com/comment/39495936
has body: Im working on porting a project over to an angular based SPA. Its currently a more "traditional" node/locomotivejs app that serves up templates from the server side (never known the proper term for this). The projects too large to to migrate all at once, so we are converting it to angular a page at a time. My problem: if you load the angular part of the app, everything works fine. You can go to the angular routes correctly. However if you then go to a non-angular route (that should be handled serverside), then nothing loads (the ng-view goes blank, rather than a whole new template being loaded up). If you go to a serverside route first or hit refresh, the page loads correctly. My guess is that angular is trying to handle these routes, and i am unsure how to get it to let the server take back over. app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); $routeProvider.when('/something/page1', { templateUrl: '/page1.html', controller: 'page1Ctrl' }); $routeProvider.when('/something/page1/subpage', { templateUrl: '/subpage.html', controller: 'subpageCtrl' }); }]); this is my angular routeProvider. No "otherwise" specified. Serverside I have something like: this.match( '/someOtherPage', 'someOtherPage#showstuff'); If i go to /someOtherPage directly, it loads correctly from the serverside. If i go to /something/page1, then go to /someOtherPage, it does not seem to contact the server.
has title: AngularJS - How to get serverside and clientside routing to work together
tagged with: javascript
tagged with: routes
has comment: http://stackoverflow.com/comment/39497216
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/25373114
accepted answer: http://stackoverflow.com/a/25373114
favorite count: 0
tagged with: angularjs
tagged with: node.js
type: AnsweredQuestion
score: 2
upvote count: 2

http://stackoverflow.com/comment/39518549
type: AnswerComment
type: Comment
has text: did you tried to browse the same URL from your browser, it should return JSON object if everything is correct, if it still return the full page i suggest that you check the JSP page
score: 1
comment on: http://stackoverflow.com/a/25341399

http://stackoverflow.com/comment/67859618
has text: With version from today, Oct '16, this answer doesn't work anymore as 'add' expects a jQuery object.
type: AnswerComment
comment on: http://stackoverflow.com/a/25535578
type: Comment
score: 2

http://stackoverflow.com/comment/39303868
type: QuestionComment
comment on: http://stackoverflow.com/q/25231521
has text: Yes the data in the JSON file is accurate if that's what you mean.
score: 0
type: Comment

http://stackoverflow.com/comment/39637054
type: Comment
has text: @thecbuilder I know I'm anoying, sorry, but `.innerHtml` should be `.innerHTML`
comment on: http://stackoverflow.com/a/25372478
score: 0
type: AnswerComment

http://stackoverflow.com/q/25375687
favorite count: 0
accepted answer: http://stackoverflow.com/a/25376327
has comment: http://stackoverflow.com/comment/39571974
tagged with: css
has comment: http://stackoverflow.com/comment/39571875
tagged with: gallery
type: AnsweredQuestion
upvote count: 1
type: Question
has body: I want to know if there's a way to show more than 3 images on this script. I already tried, but I couldn't do it. Link: http://tympanus.net/Development/3DGallery/ If it's impossible, is there any other plugin in this same style? Thanks.
has answer: http://stackoverflow.com/a/25376327
score: 1
has comment: http://stackoverflow.com/comment/39571940
has comment: http://stackoverflow.com/comment/39572020
has title: 3D CSS and jQuery Gallery
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39611818
type: AnswerComment
comment on: http://stackoverflow.com/a/25380988
type: Comment
has text: please tell me your are not serious about `$myvar` ???? i wrote that as a sample `$myvar` is not a real variable replace it with your own
score: 0

http://stackoverflow.com/q/25269095
favorite count: 0
tagged with: sencha-touch
answer count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
has title: Sencha Touch: onUpdated() function + Ext.MessageBox pop-ups freeze my Sencha app
type: Question
downvote count: 0
tagged with: javascript
has body: Am building a Sencha Touch app. Each time I build a new app version and the function below is called my app freezes on all web browsers, iOS device and Android device. I cannot press anything after the Ext.Message.Box is show whether i want to update the app. onUpdated: function() { Ext.Msg.confirm( "Application Update", "This application has been updated to a new version. Reload now?", function(buttonId) { if (buttonId === 'yes') { window.location.reload(); } } ); }, Whenever an Ext.MessageBox opens it freezes my app, when I click on any of the options (No Ok), nothing happens. The app is basically frozen. I have added in requires: ['Ext.MessageBox'] in app.js I have read multiple online pages on it, but to no avail Does somebody have experience with these 2 errors? They seem to be related.
has comment: http://stackoverflow.com/comment/60868022
tagged with: extjs
tagged with: sencha-touch-2

jquery-masonry
tags question: http://stackoverflow.com/q/25233281
type: Tag
tags question: http://stackoverflow.com/q/25311974
tag name: jquery-masonry
tags question: http://stackoverflow.com/q/25316420

http://stackoverflow.com/q/25333190
has comment: http://stackoverflow.com/comment/39571001
has comment: http://stackoverflow.com/comment/39570822
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25486854
tagged with: jquery-select2
has title: Why isn't my select2 autocomplete method getting executed?
has comment: http://stackoverflow.com/comment/39570578
has body: I'm trying to implement the select2 on my master layout of my ASP.NET MVC 4 website. I want it to, as soon as the user starts typing (minimum of 2 letters), call my method to query the database using the letters the user has already typed. Except, when I start typing, my method never gets called. I threw in some alerts and I'm able to see what I'm typing, but the select2 isn't firing, I think. Here's the script and css references in the tag: Here's the search box in my layout.cshtml file: And here's the bottom of my layout page where the select2 stuff appears: @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/jqueryui") @Scripts.Render("~/bundles/jqueryval") @RenderSection("scripts", required: false) Lastly, here's my controller method (I'm not worried about the code here yet, I just want to see my breakpoint get hit at the first line...): public ActionResult AutoFillValues() { // Get all wrestlers and all teams var players = _playerRepo.Query().Where(w => w.Division == "Division I" && w.Conference != null); var schools = players.Select(w => w.School).Distinct(); ArrayList list = new ArrayList(); foreach (var school in schools) { var hyperlinkFormat = "{1}"; //@HttpUtility.UrlEncode(Model.Team.Name, System.Text.Encoding.UTF8) list.Add(string.Format(hyperlinkFormat, string.Format(RosterPath, school), string.Format(RosterText, school))); } foreach (var player in playerss) { var hyperlinkFormat = "{1}"; //@HttpUtility.UrlEncode(Model.Team.Name, System.Text.Encoding.UTF8) list.Add(string.Format(hyperlinkFormat, string.Format(RosterPath, player.School), string.Format(RosterText, player.School))); } return Json(list.ToArray()); }
has comment: http://stackoverflow.com/comment/39570520
score: 0
has comment: http://stackoverflow.com/comment/39600401
type: AnsweredQuestion
tagged with: c#
has answer: http://stackoverflow.com/a/25486854
tagged with: asp.net-mvc
type: Question

http://stackoverflow.com/a/27434093
type: Answer
upvote count: 4
has body: In your DIV, CSS-hide the cursor using cursor:none; Create a .png Cursor image and move it (left, top) with jQ on mousemove Randomize the .png margin-left and margin-top using a setTimeout (to make the re-positioning smooth use CSS3 transition or do it with jQ .animate()). Note: The script cannot know if the hand is still on the mouse ;) function rand(min, max) {return Math.random() * (max - min) + min;} var $cursor = $('div img'); $('div').mousemove(function(e) { // Make .png follow the mouse coordinates $cursor.css({ left: e.pageX, top:e.pageY }); }).hover(function(e){ $cursor.toggle(); // Show .png cursor as we enter the DIV }); (function tremor(){ // Add tremor to .png image $cursor.css({ marginLeft: rand(-15,15), // arm tremor marginTop: rand(-30,30) // hand contractions }); setTimeout(tremor, rand(50,100)); }()); div{ position:absolute; background:#eee; height:100%; width:100%; cursor:none; } div img{ display:none; position:absolute; transition: margin 0.2s; } &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div&gt;&lt;img src="https://i.sstatic.net/KwMGA.png"&gt;&lt;/div&gt;
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/25258921

http://stackoverflow.com/comment/39371753
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25267800
score: 0
has text: Looks liek you have a syntax error.

http://stackoverflow.com/comment/39548836
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25363854
type: Comment
has text: There are many ways to achieve this. You can search on SO and find out many alternatives (i.e. [here](http://stackoverflow.com/questions/17838708/implementing-loading-spinner-using-httpinterceptor-and-angularjs-1-1-5), [here](http://stackoverflow.com/questions/16778140/show-spinner-on-multiple-http-calls-angularjs) ). I would avoid using jQuery DOM manipulation and animations, since there is no meaning in using that for this.

http://stackoverflow.com/q/25371713
type: Question
has body: I have an array of sound samples (16-bit): [0, 120, 320, 120, 0, -100, -30000, 65, 2, 3, 10, ...] They range -32768 to 32767. I would like to be able to play the samples using the Web Audio API. I know that it expects the source buffer to be an ArrayBuffer, but I can't quite figure out how to convert a bunch of samples to an ArrayBuffer to be played with the Web Audio API. Any tips?
downvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25372842
accepted answer: http://stackoverflow.com/a/25372842
tagged with: web-audio-api
upvote count: 6
favorite count: 0
tagged with: buffer
tagged with: arraybuffer
score: 6
tagged with: audio
type: AnsweredQuestion
has title: Playing raw audio PCM samples in Web Audio

http://stackoverflow.com/comment/39530802
type: QuestionComment
has text: _It's like .on() doesn't manage dynamic class change..._ __Indeed!__
comment on: http://stackoverflow.com/q/25354158
score: 0
type: Comment

http://stackoverflow.com/a/47339441
type: Answer
has comment: http://stackoverflow.com/comment/129624705
has comment: http://stackoverflow.com/comment/129359257
score: 3
answers question: http://stackoverflow.com/q/25244335
upvote count: 3
has body: Based on the discussion here: https://github.com/select2/select2/issues/195 it is possible to add a Select All button inside the dropdown list of options. Per that discussion, selecting too many at once can freeze the browser. Here I have added a functionality to disable the select all button if there are more that 25 options listed: https://jsfiddle.net/hula_zell/50v60cm6/
has comment: http://stackoverflow.com/comment/133986157
downvote count: 0

http://stackoverflow.com/q/25292624
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 3
linked to: http://stackoverflow.com/q/4862193
has comment: http://stackoverflow.com/comment/39417529
score: 4
tagged with: memory-management
has answer: http://stackoverflow.com/a/25292758
type: UnansweredQuestion
tagged with: properties
has answer: http://stackoverflow.com/a/25293012
has answer: http://stackoverflow.com/a/25292814
type: Question
upvote count: 4
has title: Javascript delete operator
has body: I read a book about javascript that said: var o = {x:1 , y:2 }; delete o ; // Can't delete a declared variable so returns false; However, the book also states that the variables declared outside any function scope are properties of the global object. Why aren't we allowed to delete it then if it is a property of the global object?

http://stackoverflow.com/q/25345414
downvote count: 0
tagged with: javascript
has body: I am trying to do a simple array sort in a directive. But somehow when i put the nested array in the orderBy filter it is losing array and becomes an object (which can not be ordered) when i log out the scope.item inside the directive it says: addresses: Array[2] but when trying to filter using $filter('orderBy')(scope.item.addresses, 'distance'); i am getting "TypeError: object is not a function" (function(angular){ 'use strict'; angular.module('starter').directive('getDistance', function() { return { restrict: 'E', replace: true, link: function (scope, element, $filter) { ; console.log(scope.item); scope.item.addresses = $filter('orderBy')(, scope.item.addresses, 'distance'); console.log(scope.item.addresses); } }; }); })(window.angular);
tagged with: angularjs-filter
answer count: 1
favorite count: 0
tagged with: angularjs
upvote count: 1
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39515527
has answer: http://stackoverflow.com/a/25345474
accepted answer: http://stackoverflow.com/a/25345474
type: Question
tagged with: angularjs-directive
has title: angularjs directive losing array format filter

http://stackoverflow.com/a/25263456
score: 1
answers question: http://stackoverflow.com/q/25263237
type: AcceptedAnswer
downvote count: 0
has body: The reason console.log(addNumbersA); returns: function anonymous(num1,num2 /**/) { return num1 + num2 } Is because its a functional expression. The function keyword, when used as an expression, can create a function value. A function value can do all the things that other values can do—you can use it in arbitrary expressions, not just call it. It is possible to store a function value in a new place, pass it as an argument to a function, and so on. Similarly, console.log(addNumbersB); returns: function (num1, num2) { return num1 + num2; } You can test this out in chrome dev tools, perhaps some inspectors/js repls have different notations of shortcutting, such that you may not get EXACT output (ie. just get 'function()' in Firebug).
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25263237

http://stackoverflow.com/q/25370688
answer count: 1
has body: I was reading twitter when I came across a tweet that said.. parseInt(1/0,19); //18 Of course, in JS, anything divided by 0 is Infinity, but what does the radix 19 mean, and why is Infinity radix 19 parsed to 18? Other radix, such as 16, or 10 (default) will yield "NaN", so what's special about the radix 19?
favorite count: 0
has answer: http://stackoverflow.com/a/25370734
type: AnsweredQuestion
upvote count: 2
score: 1
has title: parseInt'ing Infinity with a radix
linked to: http://stackoverflow.com/q/11340673
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39562204
has comment: http://stackoverflow.com/comment/39562133
duplicate of: http://stackoverflow.com/q/11340673
accepted answer: http://stackoverflow.com/a/25370734
tagged with: javascript
has comment: http://stackoverflow.com/comment/39562285

http://stackoverflow.com/a/25384183
type: Answer
upvote count: 1
has body: Because you have .keyup(); at the end of your JQuery statement. Just remove it
answers question: http://stackoverflow.com/q/25384125
downvote count: 0
score: 1

http://stackoverflow.com/q/25266825
upvote count: 1
downvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39369938
has answer: http://stackoverflow.com/a/25266881
has comment: http://stackoverflow.com/comment/39370300
type: AnsweredQuestion
score: 1
has title: why is this code throwing a syntax error while rendering two different google charts
type: Question
tagged with: google-visualization
tagged with: javascript
has body: Can anyone help me figure out that why am i getting a syntax error when i call in the html part.I could render the first chart earlier but this error came up when i added another google chart to the script.I think i might have made some error while combining the two.Can someone please let me know the error.
has comment: http://stackoverflow.com/comment/39369954
accepted answer: http://stackoverflow.com/a/25266881

http://stackoverflow.com/q/25325663
tagged with: width
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39479366
favorite count: 0
tagged with: android
tagged with: input
has title: Get image width from input type file using javascript on mobile
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: file
has comment: http://stackoverflow.com/comment/39479725
type: Question
has body: This http://jsfiddle.net/Mqvgx/ works on windows browsers but not on android phone. Any ideas? function getImgSize(input) { if (input.files &amp;&amp; input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#testImg').attr('src', e.target.result); } reader.readAsDataURL(input.files[0]); } } $('#testImg').on('load',function(){ alert($(this).width()+'*'+$(this).height()); }) $("input").change(function(){ getImgSize(this); });
score: 2

http://stackoverflow.com/q/25331198
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: google-closure
has body: I have a bunch of JavaScript prototypes inheriting from each other. Each class is defined in its own file like this. An example file looks like this: goog.provide("app.classes.ClassA"); (function() { app.classes.ClassA = function() { // constructor } app.classes.ClassA.prototype.example = function() { // example method } })(); A second file may look like this: goog.provide("app.classes.ClassB"); goog.require("app.classes.ClassA"); (function() { app.classes.ClassB = function() { // constructor } goog.inherits(app.classes.ClassB, app.classes.ClassA); app.classes.ClassB.prototype.example = function() { // example method } })(); After running the compiler, the code specified in the first file looks like this: goog.provide("app.classes.ClassA"); (function() { a.classes.ClassA = function() { // constructor } a.classes.ClassA.prototype.example = function() { // example method } })(); 'app' in ClassA has been replaced by a single 'a' and goog.inherits cannot find app.classes.ClassA because it is undefined. How can I prevent the Closure Compiler from renaming namespaces like this? Thanks!
has comment: http://stackoverflow.com/comment/39535682
score: 1
has title: Closure compiler removing class namespaces
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25331263
has comment: http://stackoverflow.com/comment/42046358
tagged with: javascript

http://stackoverflow.com/comment/39381610
score: 0
type: AnswerComment
type: Comment
has text: @runTarm Interesting! Although in my application items will always be appended, what would your solution be if it wasn't the case?
comment on: http://stackoverflow.com/a/25272683

http://stackoverflow.com/comment/39534342
comment on: http://stackoverflow.com/q/25356057
score: 0
type: Comment
type: QuestionComment
has text: don't use ``.pipe(concat('xxx.js'))``.

http://stackoverflow.com/comment/39422227
comment on: http://stackoverflow.com/q/25294686
score: 0
type: Comment
type: QuestionComment
has text: I can't make it work with the solution of the "duplicate question" : http://jsfiddle.net/me2loveit2/r0zt4qLg/8/

http://stackoverflow.com/q/25331038
tagged with: sharepoint
has title: Managed Metadata, Person/Group, and Checkbox Field Values Not Being Saved on Item Creation
answer count: 0
type: UnansweredQuestion
score: 0
has body: Managed Metadata, Person/Group, and Checkbox field values are not being saved when I use a very common JavaScript/jQuery redirect method on a New Form. Here is the code that others have referenced in this forum and in blogs. Any clue why these field values are not saving on item creation? I am using SharePoint 2013 Online. $(document).ready(function () { var button = $("input[id$=SaveItem]"); // change redirection behavior button.removeAttr("onclick"); button.click(function () { var elementName = $(this).attr("name"); var aspForm = $("form[id=aspnetForm]"); var oldPostbackUrl = aspForm.attr("action"); //var oldPostbackUrl = aspForm.action; var currentSourceValue = GetUrlKeyValue("Source", true, oldPostbackUrl); var newPostbackUrl = oldPostbackUrl.replace(currentSourceValue, "Redirect.aspx"); if (!PreSaveItem()) return false; WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(elementName, "", true, "", newPostbackUrl, false, true)); }); }); Thanks! K.
type: Question
has comment: http://stackoverflow.com/comment/39495037
has comment: http://stackoverflow.com/comment/39555635
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25370452
tagged with: jquery-animate
has title: How can I shrink a header animated when I scroll down and enlarge it when I scroll up?
has answer: http://stackoverflow.com/a/25370908
tagged with: javascript
tagged with: jquery
has body: I'm just going to build me a website. I thought it would be nice if my header is shrinking a litte bit when I'm scrolling down to 30px. Of course it should enlarge again when I'm scrolling up to the top. And thats my problem. I can not find out how I increase the header again! Here is my jQuery Code for the shrink effect: $(document).ready(function() { $(window).scroll(function() { var top = $(document).scrollTop(); if (top &gt; 30) { $("#header").animate({height:50}, 200); $("#header").animate({opacity:0.5}, 200); $("#logoimage").animate({height:40}, 200); $("#logoimage").delay(20).queue(function() { $(this).css({'margin-top':'20px'}); $(this).dequeue();}); } })}); I've created a Page on JSFiddle that I can show what i mean: http://jsfiddle.net/Xuryon/s46zzkt2/ I hope somebody knows how to solve that Problem...
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25370654
possible better answer: http://stackoverflow.com/a/25370908
has answer: http://stackoverflow.com/a/25370654
type: AnsweredQuestion
type: Question

http://stackoverflow.com/a/25324225
has comment: http://stackoverflow.com/comment/39532655
has comment: http://stackoverflow.com/comment/39532605
type: Answer
answers question: http://stackoverflow.com/q/25323573
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39476486
has comment: http://stackoverflow.com/comment/39534016
downvote count: 0
has body: The problem is you need some logic to test if int00 is set before you reset it. var int00; $('#scroll_diseases_left').mousedown(function(){ // if int00 is set, keep it, if it is not start a new interval. int00 = int00 || setInterval(function() { scroll_diseases_left(); }, 250); }); $('#scroll_diseases_left').mouseup(function(){ clearInterval(int00); int00 = undefined; });

http://stackoverflow.com/comment/39568981
type: QuestionComment
comment on: http://stackoverflow.com/q/25374189
score: 0
has text: Another problem might be that `x`, `y`, `width`, and `height` don't exist... you're looking for `offset()` / `position()`, `width()`, and `height()`
type: Comment

http://stackoverflow.com/q/25330949
has comment: http://stackoverflow.com/comment/39489998
tagged with: jquery
has title: Problems detecting whether cursor is still in an element
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39490426
tagged with: http://stackoverflow.com/tag/html
tagged with: hover
tagged with: twitter-bootstrap-3
answer count: 0
has body: I made a variable that is assigned a value of 1 when the cursor enters a span element, ultimately retaining this value until the cursor leaves that element. The purpose of this is to check whether the user is still hovering over that element, as I don't know of a simpler way that would bypass using the ":hover" selector. The problem is that when I check if hovering==1 by displaying an alert, no alert is displayed when I clearly entered the element and didn't leave it. Anyone know how to fix this? See Bootply. HTML: ELEMENT JS: var hovering=0; $( "span" ) .mouseover(function() { hovering=1; }) .mouseout(function() { hovering=0; }); if (hovering==1) { alert("HOVERING"); } EDIT: My goal was essentially to check whether the user was still hovering over the element as they scrolled down the page. This code did the trick: $( "span" ) .mouseover(function() { hovering=1; }) .mouseout(function() { hovering=0; }); var hovering =0; (function() { var timer; $(window).bind('scroll',function () { clearTimeout(timer); timer = setTimeout( refresh , 150 ); scrolling=true; if (hovering==1) { if ($(window).scrollTop() !== 0) { alert("HOVERING; NOT AT TOP"); } else if ($(window).scrollTop() === 0) { alert("HOVERING; AT TOP"); } } }); var refresh = function () { scrolling=false; }; })();
type: Question
has comment: http://stackoverflow.com/comment/39489698
tagged with: javascript
score: 0

http://stackoverflow.com/a/25262626
has comment: http://stackoverflow.com/comment/39363905
type: Answer
has body: I'm not entirely sure what you mean, but if your question is how you can use/read the data in newData, try this: newData = JSON.parse(newData); //parses the JSON into a JavaScript object Then access the object like so: newData.NEARBY_LIST //the object containing the array newData.NEARBY_LIST[0] //the first item (key "100") newData.NEARBY_LIST[1] //the second item (key "101") newData.NEARBY_LIST[0][0] //the first field of the first item (key "RestaurantID", value "100") newData.NEARBY_LIST[0][2] //the third field of the first item (key "RestaurantName", value "Chennai Tiffin") newData.NEARBY_LIST[0][3][0] //the first field of the fourth field of the first item (key "startTime", value "11:00") I hope this was what you were looking for. EDIT: as Siddharth points out, the above structure does assume you have arrays. If you are not using arrays you can access the properties by using their names as if they're in an associative array (e.g. newData["NEARBY_LIST"]["100"]. The reason I say "properties" and "as if" is because technically JavaScript doesn't support associative arrays. Because they are technically properties you may also access them like newData.NEARBY_LIST (but I don't recommend that in this case as a property name may not start with a number, so you would have to use a mix of the different notations). On that note, I would recommend using arrays because it makes so many things easier (length checks, for example), and there are practically no downsides. EDIT2: also, I strongly recommend using the same camelcasing conventions throughout your code. The way you currently have it (with half your properties/variables starting with capitals (e.g. "RestaurantName", "RestaurantID") and the other half being in lowerCamelCase (e.g. "listTime", "startTime")) is just asking for people (you or colleagues) to make mistakes.
upvote count: 1
answers question: http://stackoverflow.com/q/25262472
has comment: http://stackoverflow.com/comment/39362774
has comment: http://stackoverflow.com/comment/39365045
downvote count: 0
score: 1

http://stackoverflow.com/a/25318775
downvote count: 0
type: Answer
score: 1
has body: If you're using Bootstrap, why do you need fixed sizes? The whole point of Bootstrap is responsive behaviors. In your case, just apply any width you need to your columns. Otherwise, if you mean proportional widths for each col, use this: col 1 col 2 col 3 then in CSS .col1{max-width:100px;} .col2{max-width:200px;} .col3{max-width:300px;}
answers question: http://stackoverflow.com/q/25318693
upvote count: 1

http://stackoverflow.com/comment/39560923
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25369762
has text: NVM :) I think I got a solution on my own
type: AnswerComment

http://stackoverflow.com/q/25320758
downvote count: 3
has comment: http://stackoverflow.com/comment/39470582
upvote count: 1
has comment: http://stackoverflow.com/comment/39487398
possible better answer: http://stackoverflow.com/a/25321238
favorite count: 0
has answer: http://stackoverflow.com/a/25330015
has title: Chrome Animating Links On Page Load
accepted answer: http://stackoverflow.com/a/25330015
tagged with: animation
has comment: http://stackoverflow.com/comment/39472411
has comment: http://stackoverflow.com/comment/39471569
has comment: http://stackoverflow.com/comment/39472195
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39471989
has answer: http://stackoverflow.com/a/25321238
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/39470218
has comment: http://stackoverflow.com/comment/39500810
type: Question
answer count: 2
score: -2
has comment: http://stackoverflow.com/comment/39470198
tagged with: javascript
has body: In Chrome only, on this site http://jacquelynchastain.com, all of the links are animating on load. There should be zero animation on this page when it loads. Here is the best screenshot I can get of what's happening: when the page loads, the links start off styled like the default Foundation 5 links/buttons. When loaded they assume the correct styling and the page ends up looking correct. e.g. the default link style is a small blue font; the menu link style is a larger green font with a CSS transition. The transition is getting triggered and causing the animation from default link text to the correctly styled which is definitely undesirable. I have verified this issue is only happening in Chrome, and it seems not everyone is seeing it but some are. Tech Specs: I am on Mac, OSX version 10.9.4, Chrome 36.0.1985.143 This issue does not happen in Firefox, Safari, or Internet Explorer. I have verified with at least 7 other people on Mac and PC that it also happens in their version of Chrome. UPDATE: Below is the stripped back code where the problem is happening: Effect: The css transition is being triggered on load somehow & the link style is being animated (i.e. grows from the default size to 2em) instead of just being applied. Conditions:On Chrome only. Only happens when the css is included in the external file AND when there is a form element. It doesn't happen if the css is included inline, or if the form element is removed. HTML: Test CSS: a{ font-size:2em; -webkit-transition:all 0.3s ease-out; -moz-transition:all 0.3s ease-out; transition:all 0.3s ease-out; } What could be causing this?
has comment: http://stackoverflow.com/comment/39487598
has comment: http://stackoverflow.com/comment/39470626

http://stackoverflow.com/comment/39391387
type: Comment
type: QuestionComment
has text: So what is the problem
comment on: http://stackoverflow.com/q/25278520
score: 0

http://stackoverflow.com/comment/39553877
score: 0
has text: Aren't you also exposing it as a public method?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25366611

http://stackoverflow.com/comment/39344503
has text: This was marked as duplicate a little bit quickly so I'll post the answer to your question as a comment. You can't change `+` behavior, it works as described here: http://ecma-international.org/ecma-262/5.1/#sec-11.6.1. The key is that `ToPrimitive` on an object will basically try `toString` first and `valueOf` then. So if you really would like to hack `+` the only solution is to override `Date.prototype.toString`, _but this has far reaching consequences for all the JS code running on your page!_. My advice is to fix your code generator to output proper code.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25252415
type: QuestionComment

http://stackoverflow.com/a/25394177
downvote count: 0
answers question: http://stackoverflow.com/q/25374153
has body: Use a single values array and a single colors array: colorAxis: { values:[0, 10, 11, 20, 21, 30], colors:['red', 'red', 'yellow', 'yellow', 'green', 'green'] }
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/q/25325681
has comment: http://stackoverflow.com/comment/39504140
has answer: http://stackoverflow.com/a/25326588
tagged with: d3.js
has comment: http://stackoverflow.com/comment/39528829
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39480340
has title: Can't add text without append("g"), append("g") gives error from d3.js
score: 1
has comment: http://stackoverflow.com/comment/39505399
upvote count: 1
has comment: http://stackoverflow.com/comment/39480666
tagged with: nodes
has comment: http://stackoverflow.com/comment/39521811
type: Question
has comment: http://stackoverflow.com/comment/39530462
tagged with: javascript
has comment: http://stackoverflow.com/comment/39486289
has comment: http://stackoverflow.com/comment/39512366
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39481836
has body: I am new to D3 and I am working with code from here. I changed the code so I can add new nodes (neighbors) and edges to them with data from MySql upon click on a node, which is why part of the node code is in start(). I want to append text labels to the nodes, and from some googling I understand that both the circle element and the text element needs to be within a g. However, when I do this, I get an error from d3.js on line 742: Uncaught NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node Why is this and how do I fix it to get what I want, while preserving the addNode functionality? Here is my code: var width = 960, height = 500; var color = d3.scale.category10(); var nodes = [], links = []; var force = d3.layout.force() .nodes(nodes) .links(links) .charge(-400) .linkDistance(120) .size([width, height]) .on("tick", tick); var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height); var node = svg.selectAll(".node")/*.append("g")*/, link = svg.selectAll(".link"); function start() { link = link.data(force.links(), function(d) { return d.source.id + "-" + d.target.id; }); link.enter().insert("line", ".node").attr("class", "link"); link.exit().remove(); node = node.data(force.nodes(), function(d) { return d.id;}); node.enter()/*.append("g")*/ .append("circle") .attr("class", function(d) { return "node " + d.id; }) .attr("id", function(d) { return d.id; }) .attr("r", 8) .on("click", nodeClick) .append("text") .text(function(d) {return d.id; }); node.exit().remove(); force.start(); } function nodeClick() { var node_id = event.target.id; handleClick(node_id, "node"); } function tick() { node.attr("cx", function(d) { return d.x; }) .attr("cy", function(d) { return d.y; }) link.attr("x1", function(d) { return d.source.x; }) .attr("y1", function(d) { return d.source.y; }) .attr("x2", function(d) { return d.target.x; }) .attr("y2", function(d) { return d.target…
favorite count: 0

http://stackoverflow.com/q/25326139
accepted answer: http://stackoverflow.com/a/25327944
answer count: 1
tagged with: javascript
tagged with: angularjs
has body: I am trying to wrap an angular object into a template which I should then be able to instantiate by using a directive. In this case each directive is a type of widget. The problem comes from the fact that the directives I am writing are based on the same type, so when instantiating a directive I am keeping a track of the widget object in the global scope. I have something in the lines of: .directive('lineChart', ['$interval', '$compile', 'widgetDataService', return { restrict: 'E', scope: false, templateUrl: 'templates/lineChart.html', link: function(scope, elm, attrs) { var obj = { guid: attrs['guid'], datasource: undefined } scope.widgets.push(obj) ... So then in the template I can do: ... k-data-source="widgets[{{index}}].datasource" ... The idea here being that consequent uses of the directive would result in sequentially initialised templates - and therefore each template would get its respective index. However this doesn't work. If I use a directive more than once all instantiated templates get the last index, which probably means that angular is separating the instantion in different stages. Is there a way to use a global object to keep track of the underlying objects of the directives, but still let them have different indexes passed in at runtime?
tagged with: angularjs-directive
type: AnsweredQuestion
has title: AngularJS directives accessing the same scope object - avoid overwrite
type: Question
score: 0
has answer: http://stackoverflow.com/a/25327944

http://stackoverflow.com/q/25270226
possible better answer: http://stackoverflow.com/a/25270536
answer count: 2
has comment: http://stackoverflow.com/comment/39376478
has answer: http://stackoverflow.com/a/25270615
has answer: http://stackoverflow.com/a/25270536
has comment: http://stackoverflow.com/comment/39376463
tagged with: jquery
has comment: http://stackoverflow.com/comment/39376529
tagged with: regex
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25270615
has title: How to match a url in javascript with regexp
type: Question
has comment: http://stackoverflow.com/comment/39376590
has comment: http://stackoverflow.com/comment/39376409
tagged with: javascript
linked to: http://stackoverflow.com/q/161738
has body: I'm trying to add css to a div, when the website have /category or /blog in url. follows my code: var expression = /[-a-zA-Z0-9@:%_\+.~#?&amp;//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&amp;//=]*)?/gi; var regex = new RegExp(expression); var paths = ['/blog', '/category']; for (i = 0; i &lt; paths.length; i++) { if (paths[i].match(regex) ) { console.log("Successful match"); $('.page-title').css('bottom', '-100px'); } else { console.log("No match"); } } The problem is this return false always, seems to don't getting just the /blogor /category i need to put the css just when have this two parts in url, I think this regex is wrong or something is missing, someone can help?
score: 0

http://stackoverflow.com/q/25262434
tagged with: http://stackoverflow.com/tag/html
has title: How to use a html form to send data to javascript to be saved as a variable
has body: I want to use html and javascript (strictly no php) to have a html data entry form to pass data to js to be saved as a variable. Any help would be appreciated :) This is what a have so far: //form name What is your name: //name input Go // running some kind of function? and then the js side var name = 'test'; function formCatch() { //declare function 'formCatch' name = document.forms["myform"].submit(); // set the name variable as the contents from the form alert('hello, ' + name); // alert to test the output } I'm pretty sure the second line of the function is incorrect. What I'm looking for in that function is for the data entered into the form on the html page to be saved as the name variable.
accepted answer: http://stackoverflow.com/a/25262698
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25262488
tagged with: forms
type: Question
possible better answer: http://stackoverflow.com/a/25262488
tagged with: javascript
has answer: http://stackoverflow.com/a/25262698
has comment: http://stackoverflow.com/comment/39361830
has answer: http://stackoverflow.com/a/25262498
score: 0
answer count: 3

drupal
type: Tag
tags question: http://stackoverflow.com/q/25246536
tags question: http://stackoverflow.com/q/25270044
tags question: http://stackoverflow.com/q/25283378
tag name: drupal
tags question: http://stackoverflow.com/q/25303629

http://stackoverflow.com/q/25304144
score: 1
type: Question
possible better answer: http://stackoverflow.com/a/25304276
linked to: http://stackoverflow.com/q/3004178
tagged with: javascript
has comment: http://stackoverflow.com/comment/39440626
answer count: 2
has body: var currentDate = Thu Aug 14 2014 05:30:00 GMT+0530 (IST); // This is dateTimeobj var deptDate = Thu Aug 14 2014 14:23:24 GMT+0530 (IST); // This is dateTimeobj alert(currentDate == deptDate); // false How can I compare these two dates, while ignoring the time portion?
upvote count: 1
duplicate of: http://stackoverflow.com/q/492994
favorite count: 0
linked to: http://stackoverflow.com/q/492994
has answer: http://stackoverflow.com/a/25304276
has title: Comparing JavaScript dates while ignoring time of day
duplicate of: http://stackoverflow.com/q/3004178
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25304218
accepted answer: http://stackoverflow.com/a/25304218
downvote count: 0

http://stackoverflow.com/q/25320752
accepted answer: http://stackoverflow.com/a/25320922
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25320798
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/25320777
has body: Here's the code, a bit messy, going to fix it up after this is answered. website screenshot service Here is a live demo: http://jsfiddle.net/Lrnvrdub/ And thanks for the help it's greatly appreciated. Edit: all of the replies work fantastically but when I try to adjust the size of the image, I have tried using both css and html, an empty square is in the image's place when the link isn't hovered. Here's an example: http://jsfiddle.net/csewukgs/
upvote count: 1
tagged with: css
possible better answer: http://stackoverflow.com/a/25320777
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25320922
downvote count: 1
has title: How could I get the arrow image to be placed on the left of "answer1"
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25320859

http://stackoverflow.com/a/25292847
downvote count: 0
score: 1
type: Answer
has body: Alternative to queryselector would be getElementsByTagName var i; var inputs = document.getElementsByTagName("input"); for (i = 0; i &lt; inputs.length; ++i) { var name = inputs[i].getAttribute("name"); if(name.indexOf("location") &gt; -1) { inputs[i].disabled = true; console.log(name); } } link to JSFIddle
upvote count: 1
answers question: http://stackoverflow.com/q/25292582

http://stackoverflow.com/a/25380337
answers question: http://stackoverflow.com/q/25379661
downvote count: 0
type: Answer
has body: But still you can use another approach You can use the visibility property in CSS to achieve this as shown in the below Fiddle link : link JS Snippet: $(function() { $('.panel-button').on('click',function(){ var panelId = $(this).data('panel');// attr('data-panel') console.log($('#'+panelId).css('visibility')); if($('#'+panelId).css('visibility') === 'hidden') { $('#'+panelId).css('visibility','visible'); } else { $('#'+panelId).css('visibility','hidden'); } }); });
score: 1
upvote count: 1

http://stackoverflow.com/comment/39360249
comment on: http://stackoverflow.com/q/25261623
type: Comment
type: QuestionComment
has text: This question is probably better asked on [SO] as it seems to have nothing to do with Unix and/or Linux.
score: 1

http://stackoverflow.com/q/25269334
has comment: http://stackoverflow.com/comment/39374918
answer count: 0
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39375220
tagged with: javascript
downvote count: 0
has body: I'd like to open a popup window with the exact size I provide. I'm using window.open(url,'newwindow','resizable=yes,menubar=no,status=no,toolbar=no,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top) For my example I used: width='400px' height='300px' top=left='300px' In Chrome it works fine and I get a new window with inner size of 400x300px. In IE (v11) I get a window with 404x304px. In FF (v31) I get a window with 398x299px. But I need it to be exactly 400x300px like in Chrome or I get big problems with my window resize event listener. I'm going nuts here, so am I doing something wrong here? Does anyone know how to solve this, or is it a known issue? I am just using plain HTML/JavaScript for this project. Edit: I just came up with a little workaround. I just add this inside the HEAD tag of my popup html: &lt;script&gt; window.innerResizeTo = function(targetWidth, targetHeight) { if(window.innerWidth || window.innerHeight) { var innerWidth = window.innerWidth, innerHeight = window.innerHeight; } else { var innerWidth = window.document.documentElement.clientWidth || window.document.body.clientWidth, innerHeight = window.document.documentElement.clientHeight || window.document.body.clientHeight; } if (innerWidth != targetWidth &amp;&amp; innerHeight != targetHeight) { if(window.outerWidth || window.outerHeight) { var outerWidth = window.outerWidth, outerHeight = window.outerHeight, fixedwidth = targetWidth + outerWidth - innerWidth, fixedheight = targetHeight + outerHeight - innerHeight; } else { window.resizeTo(300,300); var outerWidth = window.document.documentElement.clientWidth || window.document.body.clientWidth, outerHeight = window.document.documentElement.clientHeight || window.document.body.clientHeight, fixedwidth = targetWidth + 300 - outerWidth, fixedheight = targetHeight + 300 - outerHeight; } window.resizeTo(fixedwidth,fixedheight); } } window.innerResizeTo(400,300); &lt;/script&gt; It's pretty ugly but it works …
favorite count: 0
has comment: http://stackoverflow.com/comment/39376734
has comment: http://stackoverflow.com/comment/39375737
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Size of popup window with window.open inconsistent and resize inner width/height
tagged with: css

http://stackoverflow.com/a/25351183
has comment: http://stackoverflow.com/comment/39525584
has comment: http://stackoverflow.com/comment/39527065
accepted answer of: http://stackoverflow.com/q/25350908
has body: I have updated your fiddle here - it had a lot of server side stuff which needed to be removed. You also need an opener. $( "#opener" ).click(function() { OpenLoginDialog(); });
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25350908
type: AcceptedAnswer

http://stackoverflow.com/comment/39362123
type: QuestionComment
comment on: http://stackoverflow.com/q/25262247
type: Comment
has text: I believe the intended approach is to initially bind your view model to a DOM element on the page (see below), then bind the view model to any subsequently loaded elements when they are loaded by doing this: `ko.applyBindings(viewModel, document.getElementById("my-element-id-here"));` Clearing out bindings is not intended, which is why it is more difficult to do so... presumably because it leaves things in an incorrect state.
score: 0

http://stackoverflow.com/comment/39442802
score: 0
comment on: http://stackoverflow.com/a/25306126
type: Comment
has text: Thanks a bunch for your answer - If I check the source, however, the variables are echoed correctly into both the script and the anchor.
type: AnswerComment

http://stackoverflow.com/comment/39389025
comment on: http://stackoverflow.com/q/25277011
has text: Is Your API RESTfull? If it is, consider use [resource module](https://docs.angularjs.org/api/ngResource/service/$resource) of angular. It is really usefull.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39569891
type: Comment
type: QuestionComment
has text: What is with the parenthesis around the string?
score: 0
comment on: http://stackoverflow.com/q/25374656

http://stackoverflow.com/q/25354840
has title: MongooseJS Not saving to array properly
score: 0
answer count: 1
tagged with: angularjs
tagged with: node.js
has body: I want to append a value into my Mongoose array but my array never seems to update. I do the following: In my controller, I append an eventName into the array eventsAttending like so: $scope.currentUser.eventsAttending.push(event.eventName); $http.put('/api/users/' + $scope.currentUser._id, $scope.currentUser) .success(function(data){ console.log("Success. User " + $scope.currentUser.name); }); I try to update the array like so: // Updates an existing event in the DB. exports.update = function(req, res) { if(req.body._id) { delete req.body._id; } User.findById(req.params.id, function (err, user) { if (err) { return handleError(res, err); } if(!user) { return res.send(404); } user.markModified('req.body.eventsAttending'); user.save(function (err) { if (err) { return handleError(res, err);} return res.json(200, user); }); }); }; But my array never seems to update. I've also tried the following: // Updates an existing event in the DB. exports.update = function(req, res) { if(req.body._id) { delete req.body._id; } User.findById(req.params.id, function (err, user) { if (err) { return handleError(res, err); } if(!user) { return res.send(404); } var updated = _.merge(user, req.body); updated.markModified('eventsAttending'); updated.save(function (err) { if (err) { return handleError(res, err);} return res.json(200, user); }); }); }; With this approach, my array updates properly, but when I try to perform the http put after one time, I get an error saying Error: { [VersionError: No matching document found.] message: 'No matching document found.', name: 'VersionError' } Here is my UserSchema: var UserSchema = new Schema({ name: String, username: String, eventsAttending: [{ type: String, ref: 'Event'}], }); If anyone could help that would be much appreciated.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25355550
type: Question
accepted answer: http://stackoverflow.com/a/25355550
tagged with: arrays
tagged with: mongoose
tagged with: javascript

http://stackoverflow.com/comment/39365042
comment on: http://stackoverflow.com/a/25264266
has text: @Bergi yeah, I fixed it into starting with an empty promise which is probably nicer anyway :)
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25308131
has comment: http://stackoverflow.com/comment/39446513
has title: JavaScript Ajax data is array but length is undefined
score: 1
has comment: http://stackoverflow.com/comment/39446630
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25308244
has comment: http://stackoverflow.com/comment/39446561
has comment: http://stackoverflow.com/comment/39446479
type: Question
has body: I have the following Json result: (Taken from the console) data Object {0: Object, 1: Object, 2: Object, 3: Object, 4: Object, 5: Object, 7: Object} if i in the console do data[0] i get the following result: Object {id: 125, Module_id: 2, academy_id: 7, Team_id: 5, end: "2014-08-12 00:00:00"…} However when i do data.length the value is undefined can anyone tell me what is going on?
downvote count: 0
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25308177
favorite count: 0
accepted answer: http://stackoverflow.com/a/25308244
tagged with: ajax
has answer: http://stackoverflow.com/a/25308177
linked to: http://stackoverflow.com/q/6756104
answer count: 3
has answer: http://stackoverflow.com/a/33100698

http://stackoverflow.com/q/25319891
upvote count: 2
has title: How can I get this function to be called a specific amount of times?
downvote count: 1
type: Question
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25319949
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25319949
has body: I would like to call a function a specific amount of times. I would like the number of times I would like my function to be called in an array as seen below. I have a for loop that goes through the array and I am attempting to call the function named "thefunction" as many times as the number in the array item. So the first item in the array is 8, so I first want "thefunction" function to be called 8 times which means I should see the alert message "thefunction" will display, 8 times and then 2 times as 2 is the next item in the array then 15 times. I'd also like to pause for a moment in between each set of calls. So after the function is called 8 times, it will pause for a moment before calling the function 2 times then again before it calls the function 15 times and on and on. Here is my code so far. var thearray = ['8','2','15']; for(j=0; j &lt; thearray.length; j++){ num = thearray[j]; var counter = 1; (function foo() { thefunction();// function I'm calling if (counter &lt; num) { counter++; setTimeout(foo, 400); } })(); } function thefunction (){ alert('test'); }
has comment: http://stackoverflow.com/comment/39468639
favorite count: 0

http://stackoverflow.com/comment/39508509
score: 0
has text: Not working …!! it only print one line..please check my fiddle
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25341092

http://stackoverflow.com/comment/39355831
comment on: http://stackoverflow.com/a/25259058
type: Comment
type: AnswerComment
has text: length of array is dynamic
score: 0

http://stackoverflow.com/comment/39401818
type: AnswerComment
comment on: http://stackoverflow.com/a/25284215
score: 0
type: Comment
has text: My fix, was adding the if. Error was something of cannot change volume attribute on a null element. That was happening on all the pages that dont have the audio html tag. Thats why the others jquery etc, were not running on them.

http://stackoverflow.com/a/25333495
accepted answer of: http://stackoverflow.com/q/25333467
answers question: http://stackoverflow.com/q/25333467
has body: Use Array#splice: var array = [1,2,3,4,5,6,7,8,9]; array.splice(0, 4); // returns [1,2,3,4] console.log(array); // logs [5,6,7,8,9]
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39461155
has text: Don't confuse "task" with "promise". Can we talk of "todo-items" or so? Often, promises represent the result of *executing* a *task* :-)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25315905
score: 0

http://stackoverflow.com/q/25387999
accepted answer: http://stackoverflow.com/a/25388047
linked to: http://stackoverflow.com/q/1732348
has comment: http://stackoverflow.com/comment/39594902
answer count: 3
downvote count: 0
possible better answer: http://stackoverflow.com/a/25388118
has comment: http://stackoverflow.com/comment/39595403
has answer: http://stackoverflow.com/a/25388036
favorite count: 0
linked to: http://stackoverflow.com/q/13140043
has comment: http://stackoverflow.com/comment/39595230
has comment: http://stackoverflow.com/comment/39595054
has comment: http://stackoverflow.com/comment/39595202
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39595575
has answer: http://stackoverflow.com/a/25388047
has comment: http://stackoverflow.com/comment/39595143
upvote count: 2
has comment: http://stackoverflow.com/comment/39595361
tagged with: greasekit
type: Question
has title: If page contains specific text then reload (using javascript)
tagged with: javascript
has answer: http://stackoverflow.com/a/25388118
has body: If the text We are sorry but we made a boo boo appears then Wait 5 seconds reload I would like to do this in JavaScript. Here is an attempt (function () { "use strict"; function walkTheDOM(node, func) { if (node &amp;&amp; node.nodeType) { if (typeof func === "function") { func(node); } node = node.firstChild; while (node) { walkTheDOM(node, func); node = node.nextSibling; } } } function filterElementsByContains(elements, string) { var toStringFN = {}.toString, text = toStringFN.call(elements), result, length, i, element; if (text !== "[object NodeList]" &amp;&amp; text !== "[object Array]" &amp;&amp; !($() instanceof jQuery)) { return result; } result = []; if (typeof string === "string") { string = new RegExp("^" + string + "$"); } else if (toStringFN.call(string) !== "[object RegExp]") { return result; } function getText(node) { if (node.nodeType === 3) { text += node.nodeValue; } } length = elements.length; i = 0; while (i &lt; length) { text = ""; element = elements[i]; walkTheDOM(element, getText); if (string.test(text)) { result.push(element); } i += 1; } return result; } if(filterElementsByContains([document.getElementsByTagName("table")[0]], /We are sorry but we made a boo boo/).length) { location.reload(); } The above could should, I think, work for the text if it appears in a specific place. I want to make it more general - so that the text could appear anywhere on that page. Also, I would like to know how to add a pause so that, for example, it waits 5 seconds before reloading. I guess I would add incorporate something like: setTimeout( function() { //location.reload(); }, 5000);
tagged with: fluid-mac-app-engine

mousewheel
tags question: http://stackoverflow.com/q/25340513
tags question: http://stackoverflow.com/q/25251163
type: Tag
tag name: mousewheel

http://stackoverflow.com/comment/39526325
type: Comment
comment on: http://stackoverflow.com/a/25351019
has text: @AbdulRahman: Well, I'd suggest not to just copy the code, but study it and adjust to your needs. The jsFiddle contains working code. Furthermore, iframes may be restricted to cross-domain restrictions, so it may not be possible to address the DOM from another domain.
type: AnswerComment
score: 0

http://stackoverflow.com/q/25355624
tagged with: http://stackoverflow.com/tag/html
has body: I am finding it difficult to figure out how the MEAN.IO stack defines the default.html template used through-out the modules and/or packages. I am trying to change one view to instead used the default.html template, to use one that I define. Their documentation http://mean.io/#!/docs says they use 'swig' as their templating system. However, I did a file search and inside the templates, I find 5 occurrences of 'swig' and it is only declared in html as text. I do not see where swig is being used, or injected in the back end neither. It should be in the back end. Any ideas? . Default is the html template that all my other pages use as its parent. I want to change that html for another. Here is what default.html looks like: {% include '../includes/head.html' %} {% if adminEnabled %} {% endif %} {% block content %}{% endblock %} {% include '../includes/foot.html' %}
score: 1
has title: MEAN.IO how do I change default template?
upvote count: 1
type: Question
tagged with: mean.io
has answer: http://stackoverflow.com/a/27883763
tagged with: swig
tagged with: javascript
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/39381647
has text: Regarding jQuery, he said: _would rather not if possible_
score: 1
comment on: http://stackoverflow.com/a/25273005
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25277550
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25277782
has answer: http://stackoverflow.com/a/25277782
type: AnsweredQuestion
has body: I have the following simple three layered markup, with each layer being a directive of its own. &lt;div class="schedule"&gt; &lt;div class="shift" ng-repeat="shift in schedule.shifts"&gt; &lt;div class="task" ng-repeat="task in shift.tasks"&gt; While I have not shown it in the markup above, I want each layer to be an isolated scope (so shifts would be isolated, and the tasks are also isolated within the shifts). I have a scope inside the schedule class, called scope.clipboard. I want to deploy this and allow the task to access this scope.clipboard. Since by isolating the shift, I need to pass everything that shift would have access to, the only way I know how to do this is to pass scope.clipboard to shift just so that I can then pass it to task, ie: app.directive('shift', function() { return { scope: { clipboard : '=' } } } app.directive('task', function() { return { scope: { clipboard : '=' } } } Is this the correct way? In other words, if you want to pass an isolated scope from layer-1 to layer-3, do you need to also pass it to layer-2?
has answer: http://stackoverflow.com/a/25277834
type: Question
has comment: http://stackoverflow.com/comment/39389906
has comment: http://stackoverflow.com/comment/39390019
tagged with: javascript
has title: AngularJS - Isolate scope from parent to child of child?
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25277834

codeigniter
tags question: http://stackoverflow.com/q/25234732
type: Tag
tags question: http://stackoverflow.com/q/25320266
tags question: http://stackoverflow.com/q/25280394
tags question: http://stackoverflow.com/q/25351442
tag name: codeigniter
tags question: http://stackoverflow.com/q/25342561
tags question: http://stackoverflow.com/q/25234733
tags question: http://stackoverflow.com/q/25302352
tags question: http://stackoverflow.com/q/25374779
tags question: http://stackoverflow.com/q/25357885
tags question: http://stackoverflow.com/q/25356337
tags question: http://stackoverflow.com/q/25370140

http://stackoverflow.com/a/25320045
downvote count: 0
has body: When you JSON stringify an array, you lose the addValue function. I modified your plunker to show the JSON.stringified list below the buttons (you can see that the addValue function is missing): So when the lists are saved and reloaded, the list data is restored, but the 'addValue' function is not. To make this work, you can move the addValue function to your controller: app.controller('TempController', function($scope) { ... this.addValue = function(list, value){ list.values.push(value); } } And hook up ng-click in the HTML: &lt;button type="button" ng-click="tmpCtrl.addValue(list, valueTyped);valueTyped = ''"&gt; Add Value &lt;/button&gt; Here is a Working Demo Plunker
type: Answer
answers question: http://stackoverflow.com/q/25319721
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25319721
type: AcceptedAnswer

http://stackoverflow.com/q/25241548
tagged with: http://stackoverflow.com/tag/html
has body: I am using the d3 zoom behaviour on my svg element and i also have a dblclick event of the svg element. Under desktop i can zoom with mouse wheel and double click as needed. However when i go to an ipad the double click does not go through. So i have added a touchstart listener to handle a double tap on the svg (the svg also has the zoom behaviour associated with it) The trouble i am getting is that the zoom appears to grab the touch start and then the underlining svg touchstart event does not go through so i cannot do my double tap. Is there a way to keep the touchstart in the zoom, as it is needed for the paning and pinch zooming i believe, as if i do .on('touchstart.zoom',null) panning does not work and pinch zoom does not work either. But allow me to bubble it up so i can do my double tap functionality. Cheers Mark UPDATE- Looking into this a bit more the W3C standard dictate that this is the way it should work and touch events are to be stopped from bubbling up
has title: get touchstart event to bubble up from d3 zoom to the svg
answer count: 0
tagged with: d3.js
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
has comment: http://stackoverflow.com/comment/45744959
has comment: http://stackoverflow.com/comment/45744350
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/45744869

http://stackoverflow.com/comment/39338903
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25249798
has text: this is the log of the `data` `0: {7:Graphic Design, 8:Portraits, 9:Photographs, 10:Compositions, 11:Paintings, 12:3D Modeling/Design, 13:Others}`

http://stackoverflow.com/comment/39500960
score: 0
type: Comment
has text: What if you tried using the `addEventListener` method? It may not alter the result too much but perhaps `elements[i].addEventListener('contextmenu', function(e) { e = null; });`.
comment on: http://stackoverflow.com/a/25336295
type: AnswerComment

http://stackoverflow.com/comment/39356552
type: Comment
type: QuestionComment
has text: I found the problem. I misunderstood a basic javascript concept. The dialog IS shown as modal but the execution follows after dialog() call. I thought that, as in other languages like java, dialog({modal:true}) was a blocking call (like dialog.setVisible(true) in java). Thx for your help anyway
score: 1
comment on: http://stackoverflow.com/q/25258773

http://stackoverflow.com/comment/39381772
has text: you should use double `==`. `=` is assignment, `==` is comparison.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25273017

http://stackoverflow.com/q/25356337
tagged with: codeigniter
has body: I need to print popup dialog box.I have tried several times,but I could get whole window with popup dialog box.I need to print only the dialog box. not the around content of the dialog box. here is my code view name: Date: Amount: Amount In letters: address: Account No: Bank:
type: Question
has comment: http://stackoverflow.com/comment/39538359
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39537578
has comment: http://stackoverflow.com/comment/39537294
has comment: http://stackoverflow.com/comment/39537554
answer count: 0
type: UnansweredQuestion
has title: print popup jquery dialog box

http://stackoverflow.com/a/25371039
type: Answer
upvote count: 1
downvote count: 1
has body: None of your functions are correctly defined. It looks like you want to do this: settest.html: &lt;script&gt; window.onload=function() { localStorage.setItem("one", true); } &lt;/script&gt; index.html: &lt;script&gt; window.onload = function () { setInterval(function() { var one = localStorage.getItem('one') || ''; if (one !== true) { var elem = document.getElementById("one"); elem.className = "hide"; } }, 1000); } &lt;/script&gt; Assuming you want it to check every second to see if it needs to set the class on a specific element to 'hide'.
has comment: http://stackoverflow.com/comment/39563098
answers question: http://stackoverflow.com/q/25370864
score: 0

http://stackoverflow.com/comment/39381785
comment on: http://stackoverflow.com/q/25273042
type: Comment
type: QuestionComment
score: 0
has text: This mostly covered here: http://stackoverflow.com/a/359509/1026459

http://stackoverflow.com/comment/39384563
type: AnswerComment
has text: it works! So the parameter in then() should be a function that return promise, but not a promise itself. Right?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25274432

http://stackoverflow.com/comment/39365753
comment on: http://stackoverflow.com/q/25264564
type: QuestionComment
has text: @RichardCane — That will give an array, not JSON.
type: Comment
score: 0

http://stackoverflow.com/comment/39306404
has text: @karthikr I have now added the [link](https://github.com/joliss/jquery-ui-rails) gem, but it didn't resolve anything.
comment on: http://stackoverflow.com/q/25232601
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25257901
downvote count: 1
type: Question
has body: When I try to do var ww = new OpenLayers.Format.WMSGetCapabilities(); I have an error that says: TypeError: OpenLayers.Format.WMSCapabilities is not a constructor Which is a lie, because that exists in manual. I have version 2.13 of OpenLayers Why is that?
tagged with: javascript
score: -1
upvote count: 0
answer count: 1
favorite count: 0
tagged with: openlayers
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25259734
has title: OpenLayers.Format.WMSCapabilities() is not a constructor

http://stackoverflow.com/a/25319228
score: 0
has comment: http://stackoverflow.com/comment/39468573
has body: One smart way, as stated by Jack, is to use the = sign to narrow down your search. You can further narrow this down to assignment with the assumption that the first time it occurs, it's probably getting assigned. This can be done as such: for f in $(find .); do grep -m 1 'topics[[:space:]]*=' -R; done This will apply the grep command on each file in the current directory and all subdirectories. It will then take the first time that the string occurs (in this case, 'topics'). Here is the manual page for grep that shows all the options: grep-man-page Here is the Stack Overflow question that shows how to grep on each file and get first/last result: get-last-line-from-grep-on-multiple-files Here is a Stack Overflow question dealing with whitespace in grep: grep-regex-whitespace
type: Answer
has comment: http://stackoverflow.com/comment/39467400
has comment: http://stackoverflow.com/comment/39468494
answers question: http://stackoverflow.com/q/25319196
has comment: http://stackoverflow.com/comment/39467419

http://stackoverflow.com/comment/39409130
type: Comment
comment on: http://stackoverflow.com/q/25288098
has text: can you make a fiddle?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39409237
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25287374
has text: Thank, will take a look and bind and will keep printing in the meantime.

http://stackoverflow.com/a/25372925
downvote count: 0
score: 24
has body: Yes. You can add it as a plotline, like this: yAxis: { // ...Options plotLines: [{ color: 'red', value: '15', // Insert your average here width: '1', zIndex: 4 // To not get stuck below the regular plot lines or series }] } See this JSFiddle demonstration.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25372736
upvote count: 24
answers question: http://stackoverflow.com/q/25372736
type: Answer

http://stackoverflow.com/comment/39594133
comment on: http://stackoverflow.com/q/25387156
score: 0
type: Comment
type: QuestionComment
has text: You know, each directive makes its own "html" tag specific to your application. You can't simply have one directive make another directive like the way you're doing. You have to define each one to represent a set of basic html elements independently of each other. Link and Compile is used to manipulate the DOM directly, it does not do the process of binding a new directive to the DOM.

http://stackoverflow.com/comment/43860100
has text: I was able to get the expose option to work at both command line and using API, here is [gist](https://gist.github.com/majgis/433fe8cc89a1b50a24b4).
comment on: http://stackoverflow.com/a/27712825
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39495690
comment on: http://stackoverflow.com/q/25333918
score: 0
type: Comment
type: QuestionComment
has text: Might do, but that's a whole library. I'm rather looking for a 10-ish line algorithm, that would be far simpler.

http://stackoverflow.com/q/25269397
upvote count: 0
downvote count: 1
type: AnsweredQuestion
has body: Thanks in advance to all first and I also apologize if the title for the question is misleading. I didnt know how to quite word my issue. Again I apologize. Now onto my question... I was recently given the task to create a login popup for the site I am working on. Long story short, there will be a link for "login" in each and every page on the site. On clicking the link, a popup/balloon will open up with the form elements "username &amp; password" and a button. Now I created the login popup using jquery ( since the page uses jquery anyway) fadeIn and fadeOut APIs. This example can be found here http://jsfiddle.net/8am2jecu/ . The above example is working fine the way I want it to. Now here comes the issue. As I had mentioned earlier, this functionality is going to go on every page. Hence for the sake of code efficiency, I thought of creating this whole nested elements on the fly using jQuery and call the function when the element is clicked. Hence I came up with this second example http://jsfiddle.net/8yw7c6j6/ . In the second example the fadeIn API is functioning properly but the fadeOut is not. Here is the relevant code for the issue. $(document).ready(function(){ $("#clickme").click(function(){ $('body').append('&lt;div id="popupLogin"&gt;&lt;div id="login_content"&gt;&lt;p id="exit" style="float:right;"&gt;&amp;Chi;&lt;/p&gt;&lt;div id="input_block"&gt;&lt;form action="" method="" style="text-align: center;"&gt;&lt;strong&gt;Username&amp;nbsp;:&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;input name="" type="text" size="25" class="inputField" /&gt;&lt;br&gt;&lt;strong&gt;&amp;nbsp;Password&amp;nbsp;:&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;input name="" type="password" size="25" class="inputField" /&gt;&lt;/form&gt;&lt;button type="submit"&gt;Login&lt;/button&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;'); $("#popupLogin").fadeIn(900); }); $("#exit").click(function(){ $("#popupLogin").fadeOut(700); }); }); as opposed to just having a section of html code inside the body secti…
score: -1
has title: accessing a child element and binding it to an event while dynamically creating nested elements in jquery
type: Question
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25269475
accepted answer: http://stackoverflow.com/a/25269475
favorite count: 0

http://stackoverflow.com/comment/39431158
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25299408
type: Comment
has text: `('' + 55534)` is a lot less to type though. :-)

http://stackoverflow.com/a/25382079
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/39583965
has comment: http://stackoverflow.com/comment/39583321
score: 2
has comment: http://stackoverflow.com/comment/39585140
has comment: http://stackoverflow.com/comment/39585966
answers question: http://stackoverflow.com/q/25380122
has comment: http://stackoverflow.com/comment/39584280
has body: At your site .aboutcontainer has margin-top: 115px; at main.css:131. So animation from margin-top: 115px; to margin-top: 115px; actually does nothing. You can set, for example, margin-top: -1000px for .aboutcontainer and see the animation in action.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25380122

http://stackoverflow.com/comment/39567196
comment on: http://stackoverflow.com/a/25373285
type: Comment
has text: this doesn't modify the image at all, only clips for viewing
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39368908
comment on: http://stackoverflow.com/q/25266211
type: QuestionComment
has text: `REGEX_STRING_REGEXP`? The purpose is obvious from name.
type: Comment
score: 0

http://stackoverflow.com/q/25281483
type: Question
downvote count: 0
tagged with: javascript
has body: How to get the e-mail header from an Office Mail App (the purpose of the app is to display some of the information found in the header)? I have failed to find any useful docs or sample on this. As the e-mail header I mean the text which looks like this: Received: from abc (def) by ghi (jkl) with mno; pqr From: abc &lt;def&gt; To: ghi &lt;jkl&gt; Subject: mno Date: pqr Message-ID: &lt;stu&gt; Accept-Language: vwx Content-Language: yza By the Outlook Mail App I mean the project created by choosing Visual Studio 2013 Update 3 - File - New - Project - Templates - Visual C# - Office/SharePoint - Apps - Apps for Office, choosing Mail as the app type and clearing all but Email message: Read form as where the app to appear.
tagged with: outlook-2013
score: 2
answer count: 1
tagged with: office-app
tagged with: exchange-server-2013
has answer: http://stackoverflow.com/a/34221761
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has title: How to get the e-mail header in Outlook App
linked to: http://stackoverflow.com/q/26092938

http://stackoverflow.com/comment/39577905
comment on: http://stackoverflow.com/q/25378956
score: 0
has text: For the moment I haven't tried anything yet. I'm searching the web for some clear explanation about a numerical algorithm to do the inverse Laplace. Found already some method's: Weeks method, Talbot's method,... any experience with one of those?
type: QuestionComment
type: Comment

parameters
tags question: http://stackoverflow.com/q/25231958
tags question: http://stackoverflow.com/q/25313353
type: Tag
tag name: parameters
tags question: http://stackoverflow.com/q/25378811

http://stackoverflow.com/q/25344825
has comment: http://stackoverflow.com/comment/39514467
answer count: 2
has body: Just a quick clarification question: is there any difference between promiseGeneratingFunction.then(successHandler, errorHandler).done(); and promiseGeneratingFunction.then(successHandler).catch(errorHandler).done(); ? Thanks
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
possible better answer: http://stackoverflow.com/a/25344864
tagged with: promise
has comment: http://stackoverflow.com/comment/39518332
score: 0
has answer: http://stackoverflow.com/a/25346183
accepted answer: http://stackoverflow.com/a/25346183
tagged with: node.js
has comment: http://stackoverflow.com/comment/39516183
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39514454
has answer: http://stackoverflow.com/a/25344864
type: Question
has comment: http://stackoverflow.com/comment/39515459
has title: q difference between then with 2 functions and then followed by catch

http://stackoverflow.com/comment/39524433
type: QuestionComment
comment on: http://stackoverflow.com/q/25349118
has text: The angular docs have a pretty good example [here](https://docs.angularjs.org/api/ng/directive/ngShow#usage_animations).
score: 0
type: Comment

http://stackoverflow.com/comment/39571008
score: 1
has text: Angular directives need to be compiled in order to make it works. Normally, if you have an `ng-app` in your page, angularjs will automatically compile all the elements under it when DOM loaded. After that, if you would like to dynamically add other directives you have to compile it either with `$compile` yourself, or by another machanism.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25338773

http://stackoverflow.com/q/25288663
has comment: http://stackoverflow.com/comment/39412733
tagged with: css
has comment: http://stackoverflow.com/comment/39410815
upvote count: 2
has answer: http://stackoverflow.com/a/25289384
has answer: http://stackoverflow.com/a/25291085
has answer: http://stackoverflow.com/a/25289177
has body: I have a div which has a basic width value, set in a css file. In that file, i also have a media query for a new basic width, upon orientation change to portrait. in my javaScript i have a function updating the width dynamically when document is ready. What happens is, that when the media query is called, the updated width - is the width which was set dynamically by the js, and it's automatically overwrites the new media query css width. In other words, once I dynamically set the width in the code - the media query will no longer take any effect. how can i make the media query css width overwrite the current width (which was set dynamically by js?) THANK YOU! HTML + JS : CSS: #list { width: 900px; } @media only screen and (orientation: portrait){ #list { width: 600px; } } P.S the use of !important did not work for me, since if i put it in the css - the js will take no effect. and if i put it in the js - the media query takes no effect - same will happen by putting it in both the js and the css
type: UnansweredQuestion
answer count: 4
score: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39411082
favorite count: 0
has answer: http://stackoverflow.com/a/25288717
type: Question
has title: how to make mediaQuery over write values which were set dynamically in the code?
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39550932
type: Comment
comment on: http://stackoverflow.com/a/25361279
type: AnswerComment
has text: You can check http://stackoverflow.com/a/25360351/3170029 that is working fine with all my requirement but is showing all sec like `5,4,3,2,1 -> redirect` that I don't want. I just want to make sure the visitor that page is working instead of giving the hidden redirect in only.
score: 0

http://stackoverflow.com/a/25285099
accepted answer of: http://stackoverflow.com/q/25284355
answers question: http://stackoverflow.com/q/25284355
score: 1
upvote count: 1
has body: In case when you add new parameter for data, you need to also update this information in loop which parse your data. drilldownNewData.push(data[i].newData); Example: http://jsfiddle.net/sbochan/vxm0gnz5/2/ Array is available in the this.options.newData reference (like in the dataLabels).
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39430502
type: Answer

http://stackoverflow.com/comment/39576739
comment on: http://stackoverflow.com/q/25378365
score: 0
type: Comment
has text: I have triple checked the paths and they are correct. The $photo variable returns the correct path to the files
type: QuestionComment

http://stackoverflow.com/q/25271040
has answer: http://stackoverflow.com/a/25291702
type: Question
has comment: http://stackoverflow.com/comment/39378167
has comment: http://stackoverflow.com/comment/39377979
tagged with: javascript
score: 0
tagged with: datatables
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has body: I am trying to add the TableTools extension for the jQuery plugin dataTables. I have gotten it onto the site but the .swf file is not being included. Here is the code: $(document).ready(function() { var table = $('#balances').DataTable({ tableTools: { "sSwfPath": "../_inc/content/current-loan-balances-report/copy_csv_xls_pdf.swf" } }); var tt = new $.fn.dataTable.TableTools( table ); $( tt.fnContainer() ).insertBefore('div.dataTables_wrapper'); } ); The table's ID is balances. the sSwfPath is where it said to specify the path for the swf file, which I have done. When I load the page, it says the file isn't being found, and in the console it is showing a different path than the one specified above.
has title: why is this dataTables jQuery plugin (TableTools) not working?
tagged with: tabletools

http://stackoverflow.com/comment/39302846
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25230527
has text: @muistooshort The router isn't triggered, on javascript link call, I can't see a difference, how did you make it work ?
type: Comment

hex
tags question: http://stackoverflow.com/q/25236493
tag name: hex
type: Tag

http://stackoverflow.com/a/25261868
type: Answer
has comment: http://stackoverflow.com/comment/39362003
has comment: http://stackoverflow.com/comment/49169110
has comment: http://stackoverflow.com/comment/39360869
score: 23
upvote count: 23
accepted answer of: http://stackoverflow.com/q/25261254
has body: You can add css style for responsive mobile display. paste it into your css file: @media only screen and (max-width:480px){ .dropdown-menu{ display: block; position: static; background-color:transparent; border:0 none; box-shadow:none; margin-top:0; position:static; width:100%; } .navbar-nav .dropdown-menu &gt; li &gt; a, .navbar-nav .dropdown-menu .dropdown-header { padding:5px 15px 5px 25px; } .navbar-nav .dropdown-menu &gt; li &gt; a{ line-height:20px; } .navbar-default .navbar-nav .dropdown-menu &gt; li &gt; a{ color:#777; } } you can see it in its entirety here : Demo jsfiddle hope that helps.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39361903
answers question: http://stackoverflow.com/q/25261254
has comment: http://stackoverflow.com/comment/39362474

http://stackoverflow.com/comment/131734461
type: Comment
comment on: http://stackoverflow.com/a/62176999
has text: Even shorter if data is always Blob :) `DL=(d,f)=>{let a=document.createElement("a"),u=URL.createObjectURL(d);a.download=f,a.href=u,a.click(),setTimeout(()=>URL.revokeObjectURL(u))}`
score: 1
type: AnswerComment

http://stackoverflow.com/comment/39590143
type: Comment
type: QuestionComment
has text: What does the Net tab say about the request to `xxx.com/site/admin.php?site_adres=`?
comment on: http://stackoverflow.com/q/25385051
score: 0

http://stackoverflow.com/comment/39405660
type: Comment
comment on: http://stackoverflow.com/q/25286214
score: 4
has text: Check path of `jquery-2.1.1.min.js`
type: QuestionComment

http://stackoverflow.com/a/25324741
downvote count: 0
has comment: http://stackoverflow.com/comment/39477573
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39477399
type: Answer
has comment: http://stackoverflow.com/comment/39481395
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/25324715
has body: You need to apply ":not" filter with p not with body. $("body p:not(.special)").click(function () { alert('test'); }); EDIT: For clicking anywhere on the page $("body").click(function () { alert('test'); }).find(".special").click(function(){return false;}); Fiddle here
accepted answer of: http://stackoverflow.com/q/25324715

http://stackoverflow.com/q/25263426
has body: I wanted to customize the colors in zoomable tree map. I am using color = d3.scale.category20c(); .attr("fill", function(d) {return color(d.name);}) here the name(d.name) attribute can be red, green, blue or any color and I want to have color according to given name. as of my current code color is not coming according to name. Thanks in advance
type: Question
tagged with: javascript
has title: customizing colors in d3.js zoomable treemap
has comment: http://stackoverflow.com/comment/39365119
score: 0
answer count: 1
tagged with: d3.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25264580

http://stackoverflow.com/comment/39405995
has text: can't get this to work on my script for some reason :(
type: Comment
comment on: http://stackoverflow.com/a/25286228
score: 0
type: AnswerComment

http://stackoverflow.com/comment/43848765
type: Comment
type: QuestionComment
has text: Can you please post your code?
score: 0
comment on: http://stackoverflow.com/q/25272809

http://stackoverflow.com/comment/39478594
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25325360
score: 1
has text: @GOTO0: ooh, cheers cheers, I knew I should have checked that.

http://stackoverflow.com/comment/39406982
type: Comment
type: QuestionComment
has text: Yeap but jsFiddle is not showing as the browse -_- I posted one with jsFiddle and after I made in on web it will not displayed the same...
comment on: http://stackoverflow.com/q/25286897
score: 0

http://stackoverflow.com/comment/39335507
comment on: http://stackoverflow.com/q/25248093
has text: it didn't work in my case when i add my dynamic class height sticks to same since it is position absolute
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/q/25315870
tagged with: asp.net
answer count: 0
type: UnansweredQuestion
tagged with: web-scraping
tagged with: node.js
has body: I am trying to login in to a site with nodejs. The site's asp.net login form has hidden fields: __EVENTTARGET, __EVENTVALILDATION, __VIEWSTATE, __EVENTARGUMENT I am trying the following code: process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; // Ignore 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' authorization error var request = require('request'); var cheerio = require('cheerio'); function postback(url, callback) { request.get(url, function onResponse(err, res, body) { $ = cheerio.load(body); var button = callback(err, $); if (button) { var form = { //__EVENTTARGET: button.attr('form1').match(/['"]([^"^']+)/)[0], // TODO image buttons __EVENTTARGET: button.attr('Button1'), __VIEWSTATE: $('#__VIEWSTATE').val(), __EVENTVALIDATION: $('#__EVENTVALIDATION').val(), __EVENTARGUMENT: $('__EVENTARGUMENT').val(), }; } }); } postback('https://example.com', function(err, $) { var button=$('input[type="image"]'); return button //console.log(err) //console.log($) }) It's not getting the values of __EVENTTARGET and __EVENTARGUMENT. These fields may needs a button click. How to click it with cheerio?
upvote count: 5
type: Question
score: 5
downvote count: 0
tagged with: javascript
favorite count: 0
has title: How to get asp.net hidden fields values with node js?

http://stackoverflow.com/a/25309980
has comment: http://stackoverflow.com/comment/39450157
has comment: http://stackoverflow.com/comment/39450189
downvote count: 0
has body: Use chaining of attribute-value selector with class selector: $("a[href='http://www.google.com'].abc").length Working Demo
type: Answer
answers question: http://stackoverflow.com/q/25309947
upvote count: 1
score: 1

http://stackoverflow.com/comment/39412141
type: QuestionComment
score: 1
has text: `->` http://learn.jquery.com/events/event-basics/
comment on: http://stackoverflow.com/q/25289610
type: Comment

http://stackoverflow.com/a/25363649
has comment: http://stackoverflow.com/comment/39551810
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39550833
has comment: http://stackoverflow.com/comment/39548785
has comment: http://stackoverflow.com/comment/39550502
has comment: http://stackoverflow.com/comment/39551820
has body: If I understand correctly, you want to add an object at the end of the array answerlst of the first element of the array $scope.atparticular.push. So you want: $scope.atparticular.push[0].answerlst.push({answerText: '',answerId: ''}); Note that this has nothing to do with angularJS per se. It's just plain JavaScript.
type: Answer
has comment: http://stackoverflow.com/comment/39572274
accepted answer of: http://stackoverflow.com/q/25363155
answers question: http://stackoverflow.com/q/25363155
has comment: http://stackoverflow.com/comment/39548764
has comment: http://stackoverflow.com/comment/39549251
has comment: http://stackoverflow.com/comment/39548443
has comment: http://stackoverflow.com/comment/39548335

http://stackoverflow.com/q/25368409
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39563558
answer count: 1
has answer: http://stackoverflow.com/a/43737796
tagged with: meteor
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39566478
has body: I have a problem with a test on travis-ci. I want to test color change of message and receive an error like in the title. Anyone know how to fix it? Thanks Javascript test('red color', function(done) { var e = document.getElementById('messages'); e.style.color = "#f00"; done(); }); HTML Messages: {{#each messages}} {{name}}: {{message}} {{/each}}
has title: ReferenceError: document is not defined
type: Question
has comment: http://stackoverflow.com/comment/39566148
tagged with: javascript
tagged with: travis-ci
score: 0

http://stackoverflow.com/a/25359742
upvote count: 2
has comment: http://stackoverflow.com/comment/39541039
type: Answer
has comment: http://stackoverflow.com/comment/39541327
score: 2
downvote count: 0
has body: You have to reassign MY_ARRAY MY_ARRAY = MY_ARRAY.map(function(d){ d.size = [somevalue]; return d; // as per comment }); Another way to directly rewrite your array could be using the array itself as initial value (see MDN link for more on that): MY_ARRAY.map(function(d, i){ this[i].d.size = [somevalue]; }, MY_ARRAY); From MDN: The map() method creates a new array with the results of calling a provided function on every element in this array.
answers question: http://stackoverflow.com/q/25359697

http://stackoverflow.com/a/25290945
has body: i do it by changing redirect return Json(Url.Action("ClubInfo", "Admin")); and in javascript $.ajax({ url: $("#MyForm").attr('action'), type: $("#MyForm").attr('method'), data: $("#MyForm").serialize(), success: function (result) { window.location.href = result; }, error:function () { alert("Invalid Email or password"); } });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25290019

meteor
tags question: http://stackoverflow.com/q/25340765
tags question: http://stackoverflow.com/q/25352582
tags question: http://stackoverflow.com/q/25338891
tags question: http://stackoverflow.com/q/25344444
tags question: http://stackoverflow.com/q/25344223
tags question: http://stackoverflow.com/q/25345685
tags question: http://stackoverflow.com/q/25255935
tags question: http://stackoverflow.com/q/25338169
tags question: http://stackoverflow.com/q/25373859
tags question: http://stackoverflow.com/q/25254848
tags question: http://stackoverflow.com/q/25271549
tags question: http://stackoverflow.com/q/25324845
tags question: http://stackoverflow.com/q/25248439
tags question: http://stackoverflow.com/q/25383118
tags question: http://stackoverflow.com/q/25230924
tags question: http://stackoverflow.com/q/25256430
type: Tag
tags question: http://stackoverflow.com/q/25373648
tags question: http://stackoverflow.com/q/25299484
tags question: http://stackoverflow.com/q/25378561
tags question: http://stackoverflow.com/q/25353885
tags question: http://stackoverflow.com/q/25378008
tags question: http://stackoverflow.com/q/25319874
tags question: http://stackoverflow.com/q/25362889
tags question: http://stackoverflow.com/q/25316261
tags question: http://stackoverflow.com/q/25333271
tag name: meteor
tags question: http://stackoverflow.com/q/25387749
tags question: http://stackoverflow.com/q/25369368
tags question: http://stackoverflow.com/q/25305254
tags question: http://stackoverflow.com/q/25368409
tags question: http://stackoverflow.com/q/25354656
tags question: http://stackoverflow.com/q/25388369

http://stackoverflow.com/comment/39473872
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25317843
has text: use js/Math to access Math

http://stackoverflow.com/comment/39324427
comment on: http://stackoverflow.com/a/25242360
has text: I'm afraid none of these changes made any difference and the console has not logged any errors.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25330053
has title: Unobtrusive JavaScript onload function
has body: Why does the unobtrusive JavaScript technique require the use of an onload function? Would my unobtrusive JavaScript code work outside of an onload function?
favorite count: 0
has answer: http://stackoverflow.com/a/25330138
has comment: http://stackoverflow.com/comment/39487907
tagged with: onload
has comment: http://stackoverflow.com/comment/39488108
type: AnsweredQuestion
score: 2
possible better answer: http://stackoverflow.com/a/25330135
upvote count: 3
has answer: http://stackoverflow.com/a/25330135
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25330138
answer count: 2
tagged with: javascript

http://stackoverflow.com/comment/39588481
score: 0
comment on: http://stackoverflow.com/a/25368240
type: Comment
has text: @ElmoVanKielmo I think he meant to reply to me
type: AnswerComment

http://stackoverflow.com/a/25246525
type: Answer
has comment: http://stackoverflow.com/comment/39332303
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25246431
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25246431
score: 3
has body: You need to use JSON.parse() to convert a JSON string back into an object. Also, since your object is an array, you need to index it before accessing the url property. var newObj = JSON.parse(jsonString); alert (newObj[0].url);
has comment: http://stackoverflow.com/comment/39333515

http://stackoverflow.com/comment/39383023
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25273315
has text: Since you may be willing to do some restructuring...if you are using SQL Server 2012 or later, you might look into using a [SEQUENCE](http://msdn.microsoft.com/en-us/library/ff878091(v=sql.110).aspx). However, I'm not sure if this is any better than your existing table with "next available id".

http://stackoverflow.com/q/25275592
tagged with: javascript
has comment: http://stackoverflow.com/comment/39386455
has comment: http://stackoverflow.com/comment/39386471
tagged with: this
answer count: 1
downvote count: 0
has title: Can I add a property to the current "this" object? How?
favorite count: 0
accepted answer: http://stackoverflow.com/a/25275895
type: AnsweredQuestion
has body: I am checking a this.hash property onClick of tab but onload hash doesn't exist, Can I add hash property onLoad to let this condition pass through? So self.$("first").ready(renderPage) is called onLoad and I am trying to add this.hash to it so it passes the condition in renderPage(). render : function () { self = this; renderPage = function () { console.log("this.hash : " + this.hash); if (this.hash) { // this.hash is only present when tab is clicked onLoad its undefined //do some stuff getTabClicked(this.hash); } buildString(); ajaxData.callAPI(function (data) { // process data and render output; }); } onloadCall = function () { $(self.el).html(self.template()); self.$(tab).html(self.templateFlyout()); self.$("#allTabs").tabs().addClass("xyz"); self.$("#first").tabs(); self.$("#second").tabs(); //this.hash = "first"; // but it gives error this is undefined. self.$("first").ready(renderPage); // I want to add this.hash before this call self.$("[id^=tabs-]").click(renderPage); onMenuChange(); }, readJson = function () { $.getJSON("./js/data/myJson.json", function (data) { jsonData = data; onloadCall(); }); }; readJson(); return this; }
upvote count: 1
has answer: http://stackoverflow.com/a/25275895
type: Question
score: 1
has comment: http://stackoverflow.com/comment/39386458
has comment: http://stackoverflow.com/comment/39386456

http://stackoverflow.com/q/25344867
answer count: 1
has answer: http://stackoverflow.com/a/25344888
has comment: http://stackoverflow.com/comment/39514511
tagged with: operator-precedence
favorite count: 0
tagged with: operators
accepted answer: http://stackoverflow.com/a/25344888
type: AnsweredQuestion
score: 3
has body: In a few cases, I have seen expressions of the form: !form.$valid &amp;&amp; 'invalid' || 'valid' Going by left-to-right precedence specified here, this seems to mean (!form.$valid &amp;&amp; 'invalid') || 'valid' I am confused about how this returns a string. I would think those strings are true because they are not null or undefined, which would mean the expression always returns true.
upvote count: 3
type: Question
has title: && and || in same expression in Javascript
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25697539
upvote count: 1
downvote count: 0
has body: As I understand it, .findAsync returns a promise for a cursor. If you want to pull the data into memory (as with .toArray) I think what you're looking for is something like: MongoClient.connectAsync('mongodb://127.0.0.1:27017/sr') .then(function(_db) { db = _db; return db .collection('posts') .find({}) .limit(limit) .sort(sort) .toArrayAsync(); }) .then(function(posts) { console.log('posts', posts); }) .catch(function(e) { console.log(e); });
type: Answer
answers question: http://stackoverflow.com/q/25297573
score: 1

http://stackoverflow.com/q/25344214
has answer: http://stackoverflow.com/a/25344276
has body: As in, sometimes when I look at code by other people, they will go var self = this; or in jquery for example, go var $self = $(this); is there a particular reason for doing so?
type: Question
has answer: http://stackoverflow.com/a/25344286
tagged with: this
has comment: http://stackoverflow.com/comment/39514027
tagged with: javascript
has comment: http://stackoverflow.com/comment/39513504
has answer: http://stackoverflow.com/a/25344262
has answer: http://stackoverflow.com/a/25344231
has comment: http://stackoverflow.com/comment/39515538
score: 0
answer count: 5
has comment: http://stackoverflow.com/comment/39513435
has comment: http://stackoverflow.com/comment/39513434
has answer: http://stackoverflow.com/a/25344224
duplicate of: http://stackoverflow.com/q/20279484
linked to: http://stackoverflow.com/q/4813119
type: UnansweredQuestion
has title: Is there a functional purpose for setting a variable to 'this'?
linked to: http://stackoverflow.com/q/20279484

http://stackoverflow.com/comment/39539250
has text: HI Raheel, Here is js fiddle jsfiddle.net/sohimohit/43zkoszu/04 now i am able to show and hide the div by clicking on showfield but when i am trying for an option of cancel this operation using cancelField it is not working one thing more i want to ask if i want to send branchid from brancharea viewmodel to branch viewmodel on click of showfield . how can i acheive this.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25322116

http://stackoverflow.com/comment/39499430
type: Comment
type: QuestionComment
has text: @DennisMartinez You got it! Would you mind posting that bit of code as an answer so I can accept and up vote it?
comment on: http://stackoverflow.com/q/25335990
score: 0

http://stackoverflow.com/a/25243965
has comment: http://stackoverflow.com/comment/39327869
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has body: You have to write two hover function for mouse in and out instead of using toggle like below : $(function() { $("ul").hover(function() { $(this).find('ul').show(); },function() { $(this).find('ul').hide(); }); $("ul").click(function() { $(this).find('ul').toggle(); }); }); Demo
type: Answer
answers question: http://stackoverflow.com/q/25243914
has comment: http://stackoverflow.com/comment/39327577
score: 2
has comment: http://stackoverflow.com/comment/39327499
accepted answer of: http://stackoverflow.com/q/25243914

http://stackoverflow.com/q/25292267
has comment: http://stackoverflow.com/comment/39420653
upvote count: 2
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/25293725
linked to: http://stackoverflow.com/q/25295620
has comment: http://stackoverflow.com/comment/41450002
score: 2
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
has title: bootstrap: tags in input and typeahead
has comment: http://stackoverflow.com/comment/39419198
type: Question
has body: I am trying to use bootstrap tagsinput in a form contained in a modal like this ... Tags: Also I am trying to use twitter typeahead with the following code var tagValues = ['ATag','AnotherTag']; var tagVals = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace, local: $.map(tagValues, function(tagValue) { return { value: tagValue }; }) }); // kicks off the loading/processing of `local` and `prefetch` tagVals.initialize(); $('#myTag').tagsinput({ typeaheadjs: { name: 'tagVals', displayKey: 'value', valueKey: 'value', source: tagVals.ttAdapter() } }); you can see in the image above what is the result. In this case the problem is that typeahead suggestions are not contained in the frame with rounded corners
accepted answer: http://stackoverflow.com/a/25293725
tagged with: javascript
tagged with: typeahead
answer count: 1
downvote count: 0
tagged with: bootstrap-tags-input
favorite count: 0

http://stackoverflow.com/comment/39482956
score: 1
has text: Your life as a web developer will be much easier if you learn to use developer tools for the browser of your choice. When I looked using Firebug, it was very obvious what is happening. Give it a try! it helps immensely with tweaking layout, debugging JavaScript, etc.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25327243

http://stackoverflow.com/a/25348349
answers question: http://stackoverflow.com/q/25343721
has comment: http://stackoverflow.com/comment/39527292
has body: The deferred object works slightly differently. You should explicitly declare a deferred variable like this: var dfd = new $.Deferred(); And when you want to fire done callback, you should call: dfd.resolve(); So your queueing part of the script now looks like this: $.when(dfd.promise()).done(function() { dfd = new $.Deferred(); var onfloor = $("#onfloor").text(); runMainscript(buttonclicked, floorQ, onfloor); }); And inside runMainscript you resolve this dfd deferred when elevator arrived to the floor. See demo. Now, all floors are in the queue using deferred object. I'm not an expert in deferreds, so maybe you can optimise this script further.
type: AcceptedAnswer
score: 0
has comment: http://stackoverflow.com/comment/39527434
type: Answer
accepted answer of: http://stackoverflow.com/q/25343721

http://stackoverflow.com/comment/39302653
type: Comment
has text: Sorry, I think my question may be a bit vague. Given that there is no helper defined for "myblock", the two templates (from what I can see) operate and output the same. Is there any difference between the two templates besides readability?
comment on: http://stackoverflow.com/a/25230866
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39369815
type: QuestionComment
comment on: http://stackoverflow.com/q/25266557
has text: I found this little tutorial which might be helpful for you... http://i-am-sean.co.za/highcharts-laravel-4/
score: 0
type: Comment

http://stackoverflow.com/comment/39494076
type: Comment
has text: My example was a bit poor so I provided some code, sorry about that.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25333130

http://stackoverflow.com/comment/39435562
comment on: http://stackoverflow.com/q/25301978
type: Comment
type: QuestionComment
has text: you running in local-host or on any live server. link the test case if possible
score: 0

http://stackoverflow.com/comment/39327299
type: QuestionComment
type: Comment
has text: @barakmanos nope, not how JS works. Inside a `function`, yes. Inside a `for` loop, no.
score: 0
comment on: http://stackoverflow.com/q/25243879

http://stackoverflow.com/q/25346745
tagged with: tags
tagged with: javascript
score: 0
tagged with: types
answer count: 1
tagged with: jquery
tagged with: razor
type: AnsweredQuestion
has title: cshtml script tag with no type
has answer: http://stackoverflow.com/a/25346759
accepted answer: http://stackoverflow.com/a/25346759
type: Question
has body: I am new to asp.net and frontend technologies in general. I have the following code: @foreach (var item in Model) { Delete } I know we can recognize the language in which the script is written by the type tag. E.g. <script type="text/javascript"... But without this type specified, how can I recognize the language of the script? Further in the script, what is the argument "function(data)" in the post statement doing and where is the data argument for that function coming from? Thanks!
has comment: http://stackoverflow.com/comment/39517841

http://stackoverflow.com/comment/39577828
score: 0
has text: @merlin yes，it's good idea. but i want to know how to do it
comment on: http://stackoverflow.com/q/25378682
type: Comment
type: QuestionComment

push
tags question: http://stackoverflow.com/q/25234829
tag name: push
type: Tag

http://stackoverflow.com/comment/39520320
comment on: http://stackoverflow.com/a/25331025
has text: Bah, I did nothing! Congrats on finding a solution :)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25376885
tagged with: alphabetical
type: Question
has comment: http://stackoverflow.com/comment/39574090
tagged with: arrays
answer count: 1
tagged with: javascript
has body: I'm trying to create some alternative "languages" for a roleplaying game that I administer. It's a simple character substitution, although in some places one character can be replaced with multiple. How can I do this with JavaScript arrays? Some examples: Elemental a b c d e f g h i j k l m n o p q r s t u v w x y z r n a y f z d u h g t e q b w m i v o k l x j c s p A B C D E F G H I J K L M N O P Q R S T U V W X Y Z R N A Y F Z D U H G T E Q B W M I V O K L X J C S P Orcish a b c d e f g h i j k l m n o p q r s t u v w x y z c w r p o d y a e b x g k z h q v u s m l j f n t i A B C D E F G H I J K L M N O P Q R S T U V W X Y Z C W R P O D Y A E B X G K Z H Q V U S M L J F N T I Magi's Tongue a b c d e f g h i j k l m n o p q r s t u v w x y z coa taj nel sa jo yin p g d w m hep qoi uxo lso bei ilok abi zel rol kef fas oel ero ve xo A B C D E F G H I J K L M N O P Q R S T U V W X Y Z COA TAJ NEL SA JO YIN P G D W M HEP QOI UXO LSO BEI ILOK ABI ZEL ROL KEF FAS OEL ERO VE XO
downvote count: 3
tagged with: converters
has comment: http://stackoverflow.com/comment/39574003
favorite count: 0
upvote count: 0
type: UnansweredQuestion
has title: Trying to Make an Alphabetical Converter With JavaScript Arrays
score: -3
has answer: http://stackoverflow.com/a/25378106
tagged with: forms

http://stackoverflow.com/comment/39587164
score: 0
has text: Do you want this to happen when a user presses enter?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25384125

http://stackoverflow.com/comment/39569655
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25374334
has text: This works perfectly fine :) : http://jsbin.com/wugixugesafi/1/

http://stackoverflow.com/comment/39366268
comment on: http://stackoverflow.com/a/25264156
type: Comment
has text: thanks, i will try this. What i need to do after the plugin installation via CLI? i need to add cordovaparse.h and cordovaparse.m to Xcode project? i need to include some .js file in html header? what is the javascript code that I need to insert in html file to read the getInstallationId? Thanks!
score: 0
type: AnswerComment

sequelize.js
type: Tag
tag name: sequelize.js
tags question: http://stackoverflow.com/q/25344881

http://stackoverflow.com/a/25288488
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25287781
has comment: http://stackoverflow.com/comment/39545481
upvote count: 1
has comment: http://stackoverflow.com/comment/39554138
type: Answer
has body: If the event handlers are one of the issues, it may help to set up your event handler like this: $("#myTable").on("click", "button.moveMe", function(e) { e.preventDefault(); var row = $(this).closest("tr").remove().clone() $('.my-other-table-class').append(row); }); This will set a handler on the table that has id="myTable". The handler will look for click events on buttons with the "moveMe" class. It will catch the event on rows that are added later, as well as the rows that exist when this hook is created. Reference: http://api.jquery.com/on/

http://stackoverflow.com/q/25321084
has body: Having a bit of a issue . A web page whose doctype is not declared contains a div id="abc" . I need to load a web page in this div whose doctype is &lt;! DOCTYPE&gt; . Major problem they are rendering in quirk mode , this leads to look problem . div "abc" is a popup window, with absolute position . Content is loaded on user request , content is dynamic and built using PHP and can't provide url to achieve this . There is any way to get same look as in HTML5 without changing content type of any page.
favorite count: 0
has comment: http://stackoverflow.com/comment/39471009
has comment: http://stackoverflow.com/comment/39470969
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
linked to: http://stackoverflow.com/q/18044073
has title: How to load a webpage in a div?
answer count: 1
has comment: http://stackoverflow.com/comment/39471113
downvote count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25321109
upvote count: 0
has comment: http://stackoverflow.com/comment/39470931
score: -5
has comment: http://stackoverflow.com/comment/39471045
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39498350
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25335413
type: QuestionComment
has text: Are the domain name and the email name always going to be identical like your three examples? You might be able to get the string between `.` and `@`, then go that length before `@` and split on there.

http://stackoverflow.com/q/25314979
tagged with: javascript
tagged with: documentation
favorite count: 0
tagged with: jsdoc
linked to: http://stackoverflow.com/q/36415111
has answer: http://stackoverflow.com/a/42651756
type: AnsweredQuestion
upvote count: 20
accepted answer: http://stackoverflow.com/a/42651756
downvote count: 0
has body: I'm trying to improve the documentation of my javascript code, and am following the JSDoc guidelines https://jsdoc.app/. I can't find how to document an intentional side-effect. For example the following method: /** * @description * Paints the object red. * @return */ Painter.paintItRed = function(someObj){ someObj.color = "red"; }; How do you document the fact that the method acts directly on the passed object? A different example: /** * @description * If the user has not setUp a config, show config Modal. * @return */ User.checkConfig = function(user){ if(!user.config.valid){ showConfigModal(); } }; These are contrived examples and probable "code smells", but that's another issue. I'm looking at some best-practices on how to document such behavior (for good or bad). Something perhaps better than //IMPORTANT!! This method is dangerous!
linked to: http://stackoverflow.com/q/2677564
type: Question
has comment: http://stackoverflow.com/comment/72432625
linked to: http://stackoverflow.com/q/14982923
has title: documenting side-effects of javascript methods
has comment: http://stackoverflow.com/comment/70585969
score: 20
answer count: 1
tagged with: code-structure

http://stackoverflow.com/comment/39463164
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25316858
has text: I feel really dumb now, but I'm completely lost on this splitting concept.

http://stackoverflow.com/q/25279174
has comment: http://stackoverflow.com/comment/39393946
has comment: http://stackoverflow.com/comment/39393891
score: 0
has title: Execution time between JS and PHP
has comment: http://stackoverflow.com/comment/39392440
tagged with: javascript
has comment: http://stackoverflow.com/comment/39394639
tagged with: ajax
tagged with: php
has body: In index.php I create the following variables with JS inside the HTML head tag: var phpMicrotime = &lt;?php echo round(microtime(1) * 1000); ?&gt;; var jsDateMicrotime = (new Date()).getTime(); Then with every ajax request I include: (new Date()).getTime() - jsDateMicrotime + phpMicrotime In ajax.php I then use this value to get the time it took for the request: round(microtime(1) * 1000) - $_POST["requestTimeSent"] So here's the problem; If it takes a few seconds to load index.php then jsDateMicrotime and phpMicrotime will be out of sync, so I need to subtract an offset which I figured I could do with window.performance.timing for JS. However, I can't figure out which value to use, or if it's even possible to get the loading time between the php and js execution using that approach.
answer count: 0
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39397122
has comment: http://stackoverflow.com/comment/39393045

http://stackoverflow.com/q/25240220
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/7189492
answer count: 4
tagged with: callback
has answer: http://stackoverflow.com/a/25240613
type: Question
has answer: http://stackoverflow.com/a/25240374
has answer: http://stackoverflow.com/a/25240321
has comment: http://stackoverflow.com/comment/39320435
score: 0
has title: How to know when the new value is assigned to global variable in callback function (JavaScript)
tagged with: global-variables
has body: Is there any trick to know when the new value is assigned to global variable in callback function in JavaScript. As I read in here,it is asynchronous , so JavaScript does not wait until the response is received. I need the new value in my Java code which run JavaScript code in my html page.
has comment: http://stackoverflow.com/comment/39320933
has answer: http://stackoverflow.com/a/25240398

http://stackoverflow.com/comment/39307421
type: AnswerComment
comment on: http://stackoverflow.com/a/25230319
has text: @Flame_Phoenix: dandavis doesn't seem to want to post an answer, so I've updated the above.
type: Comment
score: 1

http://stackoverflow.com/comment/39584936
has text: I only need to display the response into the table
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25381849

http://stackoverflow.com/comment/39388028
comment on: http://stackoverflow.com/a/25276297
score: 0
type: AnswerComment
has text: @uʍopǝpısdn added a note, good point raised, thanks.
type: Comment

http://stackoverflow.com/a/25309402
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25309300
has body: jQuery accepts second argument as context, so in your statement dd:nth-child(2) is considered as context and dd:nth-child(1) is searched in that context. If you're trying to remove brs. For that you can use this $('dd').find('br').remove();
type: Answer
downvote count: 0

http://stackoverflow.com/comment/39628692
comment on: http://stackoverflow.com/q/25374209
has text: @PM 77-1 - from data I meant the visible/invisible data which is being displayed in a row in the table.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39590290
type: AnswerComment
has text: And its OK to add ID?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25368705

http://stackoverflow.com/comment/39355230
has text: Your main problem is, you are changing your elements width and height on HOVER.. so everything else move around.. if you expect for things to stay in place when hovering, do not change their size.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25258415
type: QuestionComment

http://stackoverflow.com/q/25258830
upvote count: 1
tagged with: css
has body: I'm trying to centre an image, i've attached a jsfiddle to show the outcome of what I want, the only difference would be that the image is placed into the html and not the css code. http://jsfiddle.net/6y2qjxm0/3/ Here's the css I'm using in the fiddle and i've already taken the image url out. width:100%; height:100%; background: no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; and finally here's the html: &lt;div class="full-screen"&gt; &lt;img src="http://placehold.it/350x150"&gt; &lt;/div&gt; Failing this, does anyone know a better way of doing this? It must be centred and it must be 100% width and 100% height. Thanks UPDATE: The image must stay in proportion like the fiddle.
has answer: http://stackoverflow.com/a/25258933
type: AnsweredQuestion
score: 1
has title: Full screen image with image placed in the html
possible better answer: http://stackoverflow.com/a/25258933
type: Question
has answer: http://stackoverflow.com/a/25258990
has answer: http://stackoverflow.com/a/25259717
has answer: http://stackoverflow.com/a/25259135
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
accepted answer: http://stackoverflow.com/a/25259717
has answer: http://stackoverflow.com/a/25259018
answer count: 5

http://stackoverflow.com/a/25270280
has body: Get the matched group from index 1. ✽ Want to Be Lazy? Think Twice. https?:\/\/[^/]*(\/.*) Here is online demo sample code: var str="http://www.example.org/path/to/file.js?a12345678"; alert(str.match(/https?:\/\/[^\/]*(\/.*)/i)[1]);
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25270241
answers question: http://stackoverflow.com/q/25270241
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/q/25326447
score: 2
answer count: 0
upvote count: 2
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
tagged with: fabricjs
has body: I'm having a problem with JSON.stringify method for canvas, using fabricjs. I draw some shapes on the canvas, rectangles and circles, that form a groups with text for each of them. Rectangles and circles have the name attribute that I dynamically specify. I then create the json using JSON.stringify(canvas) and send it to the server. The first time, json contains the name attribute for each object/group. I then load that json from server and draw it on a new canvas. Still everything is fine, all the attributes are present, but when I try to use the method again in order to send an updated version of json to the server(I change the color of a circle or something like that) the newly formed json doesn't contain name attribute for none of the objects from the canvas. So I have not deleted or added new objects, I have just changed the color of an object. I have followed the instructions from the site and added name to the toObject method like this: rect.toObject = (function(toObject) { return function() { return fabric.util.object.extend(toObject.call(this), { name: this.name }); }; })(rect.toObject); And it works for the first json creation, but not for all consequential makings of json.
has title: JSON.stringify making json without canvas object names fabricjs
tagged with: canvas
downvote count: 0
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/24633740

http://stackoverflow.com/comment/39562183
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25370270
has text: TIL what was that K&R setting in my jshint configuration :)
score: 0

http://stackoverflow.com/a/25238660
has body: I don't think that's possible with css. What you are asking is for the left hand table to scroll vertically with it's container div, but not to scroll horizontally. I'd have a re-think on your requirements here. You could just put the right hand table inside a div with overflow:scroll, so only that one moves when you scroll horizontally. You'd have the issue then of the two no longer being lined up when you scroll vertically - could you make it high enough so so the whole table displays? Would that work for you? EDIT: In your js-fiddle then you've set height:500px; for .container. If you don't need that, then remove it so things will set their own height and display the whole table. Then you only have the sideways scroll to deal with, and that's doable (e.g. put a wrapper on the right hand table only that has overflow:scroll) No I'd not use position:fixed here, that sets something relative to the browser window, which is no good for users scrolling up and down. have a look at this: http://www.barelyfitz.com/screencast/html-training/css/positioning/ that's great to get your head around css positioning.
has comment: http://stackoverflow.com/comment/39319538
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25238409
answers question: http://stackoverflow.com/q/25238409
score: 0

http://stackoverflow.com/comment/39378578
has text: If intermediate values are inaccessible because they are used inside another module that doesn't publish them, they will stay inaccessible anyway.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25270917
score: 0

http://stackoverflow.com/q/25287692
has comment: http://stackoverflow.com/comment/39408388
has comment: http://stackoverflow.com/comment/39409824
linked to: http://stackoverflow.com/q/3975859
has comment: http://stackoverflow.com/comment/39410225
type: Question
has comment: http://stackoverflow.com/comment/39416851
has comment: http://stackoverflow.com/comment/39409763
tagged with: arrays
has comment: http://stackoverflow.com/comment/39411263
tagged with: javascript
tagged with: jquery
score: 0
has title: Creating a JSON object from a Multidimensional Javascript Array in the correct format for submission to Rails
answer count: 1
has body: Hi Guys I’m trying to create a javascript multidimensional array as seen below. $('#rfp_import_table &gt; tbody &gt; tr').each(function(row) { TableData[row] = { "sheet_name": $('#sheet_name_' + i).text(), "last_row": $('#sheet_last_row_' + i).text(), "sheet_id": $('#sheet_id_' + i).text(), "sheet_import": $('#sheet_import_' + i).is(':checked'), "sheet_import_column": $('#sheet_import_column_' + i).val() } i++; }); TableData = $.toJSON(TableData); This is creating an array that looks like [ { "sheet_name": "Offeror Instructions", "last_row": "99", "sheet_id": "0", "sheet_import": true, "sheet_import_column": "C" }, { "sheet_name": "S3 SAI_Availability_Scale", "last_row": "22", "sheet_id": "38", "sheet_import": true, "sheet_import_column": "C" }, { "sheet_name": "S4 SAI_Deploy_and_Admin", "last_row": "21", "sheet_id": "39", "sheet_import": true, "sheet_import_column": "C" } ] I need an array that can be submitted to rails (using ajax $ jquery not form_for..). I beleive the format I need is [“sheets”: { "sheet_name": "Offeror Instructions", "last_row": "99", "sheet_id": "0", "sheet_import": true, "sheet_import_column": "C" }, { "sheet_name": "S3 SAI_Availability_Scale", "last_row": "22", "sheet_id": "38", "sheet_import": true, "sheet_import_column": "C" }, { "sheet_name": "S4 SAI_Deploy_and_Admin", "last_row": "21", "sheet_id": "39", "sheet_import": true, "sheet_import_column": "C" } ] What would be the correct way to modify my javascript to produce the correct format? Thanks in advance.
has comment: http://stackoverflow.com/comment/39409894
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/33958415
tagged with: ruby-on-rails

http://stackoverflow.com/comment/39455902
has text: @MattHintzke note that if you need access to the individual "pieces" of the timestamp, the Date API provides that.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25313027
type: AnswerComment

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/25281217
tags question: http://stackoverflow.com/q/25344683

http://stackoverflow.com/comment/39483628
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25326973
has text: Yes it does sound much like your idea, that occurred to me. Also, this solution should work for everyone who has a similar problem.
type: AnswerComment

http://stackoverflow.com/a/25270455
downvote count: 0
has comment: http://stackoverflow.com/comment/39377548
type: Answer
answers question: http://stackoverflow.com/q/25270310
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25270310
has body: Note you're passing in ans into the function (which conveniently contains the question and answer pair), but you're not actually using that anywhere. The line: var answer =prompt (questions[i] , ''); Should probably be: var answer = prompt(ans[0], ''); // Display the question And the line: if(answer == questions[1]){ Should probably be: if(answer == ans[1]) { // Compare answer to correct answer Also, it might be better to store all your answers as strings rather than numbers, since you're comparing them to strings entered by the user. ['whats 3 * 3' , 9] should be ['whats 3 * 3' , '9'] A better design also might be to use JavaScript object literals to store the question/answer pairs. Something like: var questions = [ {Question: 'whats 2 + 2', Answer: '4'}, {Question: 'whats 3 * 3', Answer: '9'}, {Question: 'whats 2 * 7', Answer: '14'} ]; Then, you can change your code to: var answer = prompt(ans.Question, ''); // Display the question And: if(answer == ans.Answer) { // Compare answer to correct answer This is a bit easier to read.
has comment: http://stackoverflow.com/comment/39377405
score: 1
has comment: http://stackoverflow.com/comment/39377975
type: AcceptedAnswer

http://stackoverflow.com/a/25287191
upvote count: 4
accepted answer of: http://stackoverflow.com/q/25287031
has comment: http://stackoverflow.com/comment/42388595
downvote count: 0
answers question: http://stackoverflow.com/q/25287031
has comment: http://stackoverflow.com/comment/39407513
has comment: http://stackoverflow.com/comment/39407682
has comment: http://stackoverflow.com/comment/39408838
score: 4
has body: Yes, in theory. function A() { return function B() { } } &gt; new new A B {} or &gt; new new A() &gt; new new A() () since the parentheses are optional with the new operator. This takes advantage of the fact that a constructor may return something other than the constructed object. It is extremely unclear why anyone would ever want to do this. Also, this does not change the fact that new can only be invoked on a function. Dept. of Curiosities This function A() { return A; } allows you to do this new new new new new new new new new new new new A which there is no point whatsoever in doing. Prototype Chains You know that calling new on a constructor constructs an object with the prototype for that constructor. However, if you return any object other than this from a constructor, this, along with its associated prototype, is forever lost to the world. Whatever object you return has its own prototype, coming from wherever--not that of A. This applies equally to the case here where the constructor returns a function, in which case the relevant prototype is Function.prototype. Is there any way to arrange it, in the unlikely event that we cared, so that new A continues to return a functioning function, which we can do a new on, while also having access to A.prototype? Not easily. If you want additional properties on the function B returned from new A, then you can just add those properties before returning function B.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39409112
type: Answer

http://stackoverflow.com/q/25273979
has comment: http://stackoverflow.com/comment/39411256
tagged with: javascript
has comment: http://stackoverflow.com/comment/39391606
tagged with: jquery
has title: jquery value of global variable is not coming when its execution
score: 0
has body: this below code runs, but, my problem, for the variable 'cc', i unable to get the value. when page loads, i created element 'input' assigning this into global variable 'globalVar', my problem is not able get value of the global variable 'globalVar', pls see the code, you can have some idea. Any help? it would be more helpful. eq demo Home Test orders Access arrangements Pupil registration Teacher assessment Pupil results Phonics screening check NCA toolsTeacher assessment
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39383696
type: Question

faceted-search
tag name: faceted-search
type: Tag
tags question: http://stackoverflow.com/q/25313742

http://stackoverflow.com/comment/39358343
comment on: http://stackoverflow.com/q/25260582
has text: Do you really need 1 million list items?
type: Comment
type: QuestionComment
score: 7

http://stackoverflow.com/comment/39316069
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25236973
type: QuestionComment
has text: In general there is no data limit. People do upload files, you know? There are however limits on headers (at least in the HTML spec). And servers may reject too big requests. So it depends.

http://stackoverflow.com/q/25370417
has title: Custom street view button/control
tagged with: google-maps-api-3
has body: I would like to be able to have my own 'street view' button using google maps api v3. When the button is clicked I want this to load street view based on my latlng of the marker. Then I would like the button to change to say 'Back to map' and this would then load the default map view again. I am trying to use getStreetView(myLatlng) when the button is clicked but it's not loading the street view so I must be missing something here but I can't seem to find any help for this on the web. Here's my code:- var map; var myLatlng = new google.maps.LatLng(42.333029,-83.04559); /** * The HomeControl adds a control to the map that simply * returns the user to Chicago. This constructor takes * the control DIV as an argument. * @constructor */ function customStreetView(controlDiv, map) { // Offset from the corner controlDiv.style.padding = '10px'; // Create control div var controlUI = document.createElement('div'); controlUI.innerHTML = "View on street"; controlUI.className = "google_map_button" controlDiv.appendChild(controlUI); // Setup the click event listener google.maps.event.addDomListener(controlUI, 'click', function() { var panorama = map.getStreetView(myLatlng); if(panorama){panorama.setVisible(false);} }); } function initialize() { var mapOptions = { zoom: 17, center: myLatlng, panControl: true, zoomControl: true, mapTypeControl: false, scaleControl: true, streetViewControl: false, overviewMapControl: true } var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); // Set the marker var marker = new google.maps.Marker({ position: myLatlng, map: map, icon: 'images/google-map-marker.png' }); // Create the DIV to hold the control and // call the HomeControl() constructor passing // in this DIV. var homeControlDiv = document.createElement('div'); var homeControl = new customStreetView(homeControlDiv, map); homeControlDiv.index = 1; map.controls[google.maps.ControlPosition.TOP_RIGHT].push(homeControlDiv); google.maps.event.addDomListener(window, 'lo…
favorite count: 0
upvote count: 2
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25371598
accepted answer: http://stackoverflow.com/a/25371598
type: Question
tagged with: google-maps
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/25375764
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39578593
has comment: http://stackoverflow.com/comment/39576740
tagged with: durandal-2.0
tagged with: knockout-2.0
answer count: 1
type: UnansweredQuestion
has title: Durandal observable array not updating
has comment: http://stackoverflow.com/comment/39577951
has body: I copied the pagination example from the Durandal Samples into my code and I have noticed that the function gets called just once. Changing the values on the observable does not have any effect on the items observable array and does not make a fresh call to SimpleGrid . What am I doing wrong ? My gridViewModel does not get called with any data in it the first time and does not get called again. Thanks a lot. start.html start.js define(['durandal/system', 'plugins/http', 'durandal/app', './simpleGrid', 'knockout', 'moment'], function (system, http, app, SimpleGrid, ko, moment) { //Note: This module exports an object. //That means that every module that "requires" it will get the same object instance. //If you wish to be able to create multiple instances, instead export a function. //See the "welcome" module for an example of function export. var self = this; self.start_date = ko.observable(""); self.end_date = ko.observable(""); self.records_per_page = ko.observable(""); self.records = ko.observableArray([]); self.pages = ko.observableArray([]); var initialData = []; self.getShippersData = function () { var that = this; var obj = { start_date: this.start_date(), end_date: this.end_date(), search_for: this.search_for(), records_per_page: this.records_per_page() }; http.get('shippers.php/records', obj).then(function (response) { that.records(response.dbrecs); that.initialData = response.pages; that.pages(response.pages); console.log("updating pages"); }, function (error) { console.log("Error State : Call to shippers.php Failed"); }); }; self.search_for = ko.observable("").extend({ rateLimit: { timeout: 500, method: "notifyWhenChangesStop" } }); search_for.subscribe(function (searchTerm) { //make use of searchTerm i.e. search_for variable to make ajax call. //Whenever you change value of search_for, this method will invoke //console.log("This is a proxy for an AJAX call"); self.getShippersData(); }); console.log("This is after the shipper call"); console.log(initialData…
tagged with: knockout.js
has answer: http://stackoverflow.com/a/26712522

http://stackoverflow.com/a/25330729
accepted answer of: http://stackoverflow.com/q/25329394
type: AcceptedAnswer
downvote count: 0
score: 1
has body: It will register new watchers. However, if you have reason to know that these values will not be changing once they're set you can help inform AngularJS of this with a new option in 1.3.x (1.3.14 and higher, I think): &lt;div ng-repeat="item in items"&gt; &lt;/div&gt; This will create a short-lived watcher that waits until the value of item.name "settles" (becomes a real value and doesn't change for one digest). After that you won't have a watcher anymore. This is great for things like message lists that aren't going to change unless you yourself trigger it by adding/removing items.
type: Answer
has comment: http://stackoverflow.com/comment/39492976
upvote count: 1
answers question: http://stackoverflow.com/q/25329394

http://stackoverflow.com/a/25280138
score: 0
has body: A jQuery plugin like http://imakewebthings.com/jquery-waypoints will help you with this.
type: Answer
answers question: http://stackoverflow.com/q/25279755

http://stackoverflow.com/comment/39412958
has text: Why are you doing `?` anyway?
score: 3
comment on: http://stackoverflow.com/q/25290111
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39361968
comment on: http://stackoverflow.com/a/25261753
has text: Thanks to you both for this, the issue I have now is I never get into itemArray.push(myItem); as in the first instance item array is always [] if that makes sense.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/70535512
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25322905
score: 1
has body: This worked for me: io.on('connection', function(socket) { var userAgent = socket.handshake.headers["user-agent"]; console.log("User-Agent: " + userAgent); });

http://stackoverflow.com/comment/39358992
type: Comment
comment on: http://stackoverflow.com/a/25260941
has text: Don't just copy code from other peoples answers. If this question is a duplicate and can be answered by other existing questions then just flag as a duplicate.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25351442
upvote count: 1
has answer: http://stackoverflow.com/a/25393170
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25393170
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
has title: TinyMCE Standard Emoticons don't show on frontend
tagged with: tinymce
has body: I'm integrating tinyMCE in a CI\AngularJS app. the standard emoticons plugins adds something like this to my text: &lt;img src="bower_components/tinymce/plugins/emoticons/img/smiley-frown.gif" alt="frown"&gt; the path added to the image is correct when reached from the server side when creating the content, but it is not correct when approached from the frontend to view the created content there. to make the image show on my frontend I can change the url to be: &lt;img src="admin_client/app/bower_components/tinymce/plugins/emoticons/img/smiley-frown.gif" alt="frown"&gt; but then I won't see it when creating the content on server side. Another solution that works but does not seem right at all is to simply add a folder 'bower_components/tinymce/plugins/emoticons/img/' to my project root...
tagged with: angularjs
tagged with: codeigniter
tagged with: web-applications

http://stackoverflow.com/q/25308388
has title: Hide div after clicking on hyperlink which opens a page in iframe?
type: UnansweredQuestion
downvote count: 1
type: Question
has body: I have created a sharepoint webpart. Inside this webpart I generate some html. In this html I have a div with ID "Div1" with some information. Below this div I have an iframe which is initial hidden. And as last I have 2 hyperlinks which has as target the iframe. How can I make my html as follow: when I click on the hyperlink the iframe will be visible when I click on the hyperlink the div with ID "Div1" will be hidden when I click on the hyperlink the iframe will load the url in the hyperlink HTML: some information Google Yahoo maybe in jQuery?
score: -1
has answer: http://stackoverflow.com/a/25308966
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: sharepoint
favorite count: 0

http://stackoverflow.com/comment/40505101
comment on: http://stackoverflow.com/q/25285393
score: 0
has text: Did you figure anything out?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39450035
type: Comment
comment on: http://stackoverflow.com/a/25308846
has text: It turn's out that the patten directive checks if the input is empty or matches the pattern. https://github.com/angular/angular.js/blob/dd2a803f4f03ab629a51623c026d3e3f9dc9e91f/src/ng/directive/input.js#L2319
type: AnswerComment
score: 0

http://stackoverflow.com/a/25325207
accepted answer of: http://stackoverflow.com/q/25325019
answers question: http://stackoverflow.com/q/25325019
type: Answer
has body: // This creates a function, which then returns an object. // Person1 isn't available until the assignment block runs. Person = function() { return { //... } }; person1 = Person(); // Same thing, different way of phrasing it. // There are sometimes advantages of the // two methods, but in this context they are the same. // Person2 is available at compile time. function Person2() { return { //... } } person2 = Person2(); // This is identical to 'person4' // In *this* context, the parens aren't needed // but serve as a tool for whoever reads the code. // (In other contexts you do need them.) person3 = function() { return { //... } }(); // This is a short cut to create a function and then execute it, // removing the need for a temporary variable. // This is called the IIFE (Immediate Invoked Function Expression) person4 = (function() { return { // ... } })(); // Exactly the same as Person3 and Person4 -- Explained below. person5 = (function() { return { // ... } }()); In the contexts above, = function() {}(); = (function() {}()); = (function() {})(); All do exactly the same thing. I'll break them down. function() {}(); &lt;functionExpression&gt;(); // Call a function expression. (&lt;functionExpression&gt;()); // Wrapping it up in extra parens means nothing. // Nothing more than saying (((1))) + (((2))) (&lt;functionExpression&gt;)(); // We already know the extra parens means nothing, so remove them and you get &lt;functionExpression&gt;(); // Which is the same as case1 Now, all of that said == why do you sometimes need parens? Because this is a *function statement) function test() {}; In order to make a function expression, you need some kind of operator before it. (function test() {}) !function test() {} +function test() {} all work. By standardizing on the parens, we are able to: Return a value out of the IIFE Use a consistent way to let the reader of the code know it is an IIFE, not a regular function.
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/25329950
type: Answer
has comment: http://stackoverflow.com/comment/39487712
upvote count: 0
score: -2
answers question: http://stackoverflow.com/q/25329786
downvote count: 2
has body: Edit2: sorry I misread the original question, you cannot get a square root of a negative number in JS. Multiplying by -1 and then multiplying by 'i' (square root of -1) is the way it would be done in maths iirc, but that is not available in JS either. Edit: Pi is Math.PI in Javascript, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math for all the possible functions and properties, including various constants. You can't continue with calculations once you've got NaN, but you can find where you're getting NaN and fix. You'll be wanting these: parseInt(variablename, 10); Converts the value of 'variablename' into an integer. The second argument is the radix, which here I've put as 10 as I'm assuming you're using decimals. If you didn't have this it might try to convert it depending on what it gets, so something like parseInt('08') is not the same as 8! More: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt the string '10px' will get changed to 10 by parseInt, but 'foo20' will return NaN. parseFloat(variableName); converts the value of 'variablename' into a floating point number.

http://stackoverflow.com/a/25270067
answers question: http://stackoverflow.com/q/25266114
downvote count: 0
type: Answer
has body: Take a look here If you add an element to the DOM, the page will be repainted. If you add 100 elements one by one, it will be repainted 100 times, and that's slow. Create a single container and add nodes for the items to it before appending it to your page. var container = $('&lt;div&gt;'); $.each(items, function (index, itm) { var el = $('&lt;div&gt;'); el.attr('id', ID_PREFIX + index); el.html(createHtml(itm)); container.append(el); }); $('#list-container').append(container); Something like the above (using jQuery, but you can be fine with plain JS). (of course createHtml is an utility function you can define to get the markup for your item and items is the array with your data) That said, I agree with @Bergi above: do you really need to show all items at the same time? Could you set a scrolling view that populates as you scroll down? Next thing you can do, use RactiveJs or React to efficiently manage data-binding.
score: 3
upvote count: 3

http://stackoverflow.com/q/25366611
type: Question
has answer: http://stackoverflow.com/a/25366898
has comment: http://stackoverflow.com/comment/39553966
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25366898
score: 0
answer count: 1
tagged with: jasmine
has comment: http://stackoverflow.com/comment/39559005
has title: How do I assert that an inner function was called with jasmine?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39553877
has body: I have a class style declaration with javascript in my app and I need to test that an inner method was called. The structure is like this.... angular.module("MyApp").factory('myClass', ['$rootScope', function (rootScope) { function active(type) { //how do I see if this method was called if cleartools public method is called? } return { active: active, clearActives: function() { active(''); } } }]); How do I see if function active() was called if clearActives() is called?

http://stackoverflow.com/comment/39555254
score: 0
type: Comment
type: QuestionComment
has text: No, basically I can filter the data already via a filter input on the repeater (it happens in real-time as you type), e.g. ` ` but I'm wanting to add a full form that uses a query string and then filters the data that way instead if that makes sense? It should return objects in the JSON file that match the query.
comment on: http://stackoverflow.com/q/25366913

buildpack
tag name: buildpack
type: Tag
tags question: http://stackoverflow.com/q/25285124

http://stackoverflow.com/a/25327306
upvote count: 1
has body: What you are doing is fine. If you wanted to add jQuery, it would handle the test for you.
has comment: http://stackoverflow.com/comment/39483096
score: 1
accepted answer of: http://stackoverflow.com/q/25327247
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39482816
type: Answer
answers question: http://stackoverflow.com/q/25327247

http://stackoverflow.com/comment/39531814
has text: Anyone? Anyone at all?
score: 0
comment on: http://stackoverflow.com/q/25329045
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25320876
type: AnsweredQuestion
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/25321000
type: Question
tagged with: javascript
has title: How to drag a falling object?
has body: I took a look at the snow fall plug-in in jQuery. I divided my window into two panels per se. One for falling effect the other to collect and move objects around. I am able to click on one snow flake and set its position to a new point and stop it (from moving). However I want to move it around in the pane. How can I achieve this? There's another issue. After a flake is repositioned, on each consecutive clicks, the flake seems to do continuous repositioning. The best would be, ---------EDIT Fall the snow (done) Drag a falling snow to the other pane (right side). Snow flake should stop falling. Should be able to drag it anywhere within right side. Double click to delete any stopped and draggable flakes in other pane (Right side) Here's the current code. jsFiddle // Snow Falling function fallingSnow() { var snowflake = $('&lt;div class="snowflakes"&gt;&lt;/div&gt;'); $('#snowZone').prepend(snowflake); snowX = Math.floor(Math.random() * $('#site').width()/3); snowSpd = Math.floor(Math.random() + 50000); snowflake.css({'left':snowX+'px'}); snowflake.animate({ top: "700px", opacity : "5", }, snowSpd, function(){ $(this).remove(); fallingSnow(); }) //on click, the flake to be stopped, and re-positioned. To be able to drag it. $( function() { $(snowflake).click( function() { $(this).toggleClass("blue-cell"); var pos = $(this).position().left + 200; var s = $(this); snowflake.css({'left': pos+'px'}); $(s).stop(); $(s).draggable(); }); }); //on double click I want to remove the draggable flake in right side pane // $(s).click(function(){ // $(s).remove(); // }); } var timer = Math.floor(Math.random() +2000); window.setInterval(function(){ fallingSnow(); }, timer); Refrences: The original code was take from this post.
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39470452
tagged with: jquery
tagged with: jquery-ui-draggable
has answer: http://stackoverflow.com/a/25321000
favorite count: 0
linked to: http://stackoverflow.com/q/19333422
has comment: http://stackoverflow.com/comment/39470579
tagged with: css

http://stackoverflow.com/comment/39464986
comment on: http://stackoverflow.com/q/25243816
type: Comment
type: QuestionComment
has text: Check java.nio package. You will have something to implement Comet application. That is reverse Ajax.
score: 0

http://stackoverflow.com/q/25313196
score: 0
has comment: http://stackoverflow.com/comment/39491095
answer count: 1
type: UnansweredQuestion
has body: the problem: after clicking a checkbox I change the cursor to "wait", but only after about 6 seconds the wait-cursor is to see. How to avoid this 6 sec pause ? many thanks in advance Wicki code edited ! Cursor-Test Cursor ändern: standard->wait->länger dauernde Aktion->standard wait-cursor erst nach ca. 6 sec Five
has answer: http://stackoverflow.com/a/25313556
type: Question
has title: cursor to "wait" while "time-consumer" is running after it back to standard
tagged with: javascript
has comment: http://stackoverflow.com/comment/39456002

http://stackoverflow.com/comment/39459538
type: QuestionComment
comment on: http://stackoverflow.com/q/25314901
score: 0
type: Comment
has text: @StriplingWarrior, i mean total of five seconds.

http://stackoverflow.com/q/25243922
tagged with: datetime
tagged with: python
has answer: http://stackoverflow.com/a/25243994
favorite count: 0
type: UnansweredQuestion
has body: In JavaScript: new Date(2014, 5, 1).getTime() // results: 1401561000000 While in python: import time import datetime time.mktime(datetime.datetime(2014, 5 , 1).timetuple()) # results -&gt; 1398882600.0 How can I convert python time to a JavaScript unix time stamp?
upvote count: 3
has answer: http://stackoverflow.com/a/25244065
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has title: Python to JavaScript unix time conversion
score: 3

http://stackoverflow.com/a/25287327
has body: It's state based. You have to reset lineWidth later on to the value you want for the next path. Live Demo var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); ctx.beginPath(); ctx.moveTo(20,20); ctx.lineTo(20,100); ctx.lineTo(70,100); ctx.lineWidth = 10; ctx.closePath(); ctx.stroke(); ctx.fillStyle="red"; ctx.fill(); ctx.lineWidth = 3; //this ctx.beginPath(); ctx.arc(200, 100, 50, 0, 2 * Math.PI); ctx.fillStyle="blue"; ctx.fill(); ctx.stroke(); ctx.closePath();
has comment: http://stackoverflow.com/comment/39407603
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25287234
accepted answer of: http://stackoverflow.com/q/25287234
score: 0
type: Answer

http://stackoverflow.com/q/25232531
possible better answer: http://stackoverflow.com/a/25233694
favorite count: 0
has answer: http://stackoverflow.com/a/25233694
has body: I'm reading Effective Javascript by David Herman, and just learned this about how JavaScript handles numbers: "all numbers in JavaScript are double-precision floating-point numbers, that is, the 64-bit encoding of numbers specified by the IEEE 754 standard -- commonly known as "doubles". If this fact leaves you wondering what happened to the integers, keep in mind that doubles can represent integers perfectly with up to 53 bits of precision. All of the integers from -9,007,199,254,740,992 (-2^53) to 9,007,199,254,740,992 (2^53) are valid doubles." (p. 7) I was curious, so I threw together this jsfiddle to try it out: var hilariouslyLargeNumber = 9007199254740992; console.log(hilariouslyLargeNumber); // 9007199254740992 console.log(hilariouslyLargeNumber + 1); // 9007199254740992 console.log (hilariouslyLargeNumber === hilariouslyLargeNumber); // true console.log(hilariouslyLargeNumber === hilariouslyLargeNumber+1); // true console.log(hilariouslyLargeNumber === hilariouslyLargeNumber-1); // false I sort of understand why this is the case -- in simple (simple, simple) language, there aren't any more 'slots' for any more 0s and 1s for how JavaScript encodes numbers, and so it has to stop at 9,007,199,254,740,992. So: what do I do if I find myself in possession of 9,007,199,254,740,993 puppies, and want to write some code to help me remember which one is which? Do I need to use something other than JavaScript? If so, why?
has comment: http://stackoverflow.com/comment/39305777
has comment: http://stackoverflow.com/comment/39305921
accepted answer: http://stackoverflow.com/a/25232792
score: 2
upvote count: 3
downvote count: 1
type: AnsweredQuestion
has title: What if I need to count 9,007,199,254,740,993 of something?
has comment: http://stackoverflow.com/comment/39305735
linked to: http://stackoverflow.com/q/1725341
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25232792
has comment: http://stackoverflow.com/comment/39306182
tagged with: javascript

http://stackoverflow.com/q/25277975
answer count: 2
has comment: http://stackoverflow.com/comment/39390571
upvote count: 0
tagged with: javascript
has title: How to get the id of an item in an array?
has comment: http://stackoverflow.com/comment/39390477
favorite count: 0
has comment: http://stackoverflow.com/comment/39390446
has answer: http://stackoverflow.com/a/25278064
has body: var a = document.getElementById('abc'); alert(a.id) // it works. var b = document.getElementsByClassName('qwe'); alert(b[0].id); // this is not working. returns only empty space : '' I don't know why this happening. a is object, and b is array object. and b[0] is object property. and also object. Is there any one who can explain this happening's reason and solution clearly? ps. sorry for miss 'document'. I missed it when I write this question. but in the source code, I didn't miss it.
has comment: http://stackoverflow.com/comment/39390679
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/39390470
score: -1
has comment: http://stackoverflow.com/comment/39390590
has answer: http://stackoverflow.com/a/25278024
type: Question

http://stackoverflow.com/q/25372489
tagged with: css
possible better answer: http://stackoverflow.com/a/25373086
has answer: http://stackoverflow.com/a/25373086
has body: I can toggle the show/hide of a checkbox because it can be unchecked but the behavior is different on a radio group because clicking a checked radio button doesn’t uncheck it, only clicking another radio button in the same group. DEMO WORKS FOR CHECKBOX NOT RADIO GROUPS How can I modify this so it works for radio buttons and checkboxes in the same function? In this example I can click Item4 but it doesn’t hide upon clicking the others in the radio group. How it should work: Put data-info-id="infox" on the input Put id="infox" on the container usually a div jQuery solutions are welcome. HTML Item 1 Checkbox Content checkbox group Item2 Radio Item3 Radio Item4 Radio Content radio group CSS [id^="info"] { display: none; } JS document.addEventListener('change', function(e) { var id = e.target.getAttribute('data-info-id'); var checked = e.target.checked; if (id) { var div = document.getElementById(id); if (div) div.style.display = checked ? 'block' : 'none'; } });
upvote count: 1
has title: Combining show/hide toggle with radio buttons AND checkboxes
type: Question
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25373095
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: radiobuttonlist
accepted answer: http://stackoverflow.com/a/25373095
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25362589
accepted answer: http://stackoverflow.com/a/25362796
has answer: http://stackoverflow.com/a/25362785
type: Question
possible better answer: http://stackoverflow.com/a/25362650
has answer: http://stackoverflow.com/a/25362650
tagged with: javascript
has answer: http://stackoverflow.com/a/25362721
score: 0
tagged with: jquery
has title: Jquery slide hide-show div with an image
has answer: http://stackoverflow.com/a/25362796
has comment: http://stackoverflow.com/comment/39546132
tagged with: http://stackoverflow.com/tag/html
answer count: 4
type: AnsweredQuestion
has body: I have a banner which I need changing on a click. at the moment I have hidden the 2nd banner and currently banner 1 shows. When I click the arrow I want banner 1 to hide and banner 2 to show etc.. only problem I tried using html. &lt;div class="homeArrow"&gt;&lt;img src="https://cdn1.iconfinder.com/data/icons/defaulticon/icons/png/256x256/arrow-right.png" alt=""/&gt;&lt;/div&gt; i want homeArrow to be the click button to show next banner but not sure how to connect to jquery... This is JS fiddle: http://jsfiddle.net/8a7GL/152/

http://stackoverflow.com/q/25367836
score: 0
has body: I have a dynamically-generated list of plants that I have gotten from a MySQL query. In each row of the resulting list, I have a select dropdown list of plant sizes to allow users to change the size of each plant. I would like to warn the user upon clicking on the dropdown list that they need to click the submit button to update when they change the size any given plant. The current JavaScript I have plugged in displays the correct message only in the first row of results, no matter which row I click the select dropdown in. Here is the code that currently works and will only appear the first row of the list. I realize this is old syntax, but I see so much diverse information out there, that I'm having a hard time sorting out what to do. I am much better at php than JavaScript. $(document).ready(function() { $(".plantSize").click(function() { $("#reCalc").css({ color:"red" }).html("Click button to update after making changes.").width(400); });}); echo ' .5 feet 1 foot 2 feet 3 feet 4 feet 5 feet 6 feet 7 feet 8 feet 9 feet 10 feet '; $peak_water = $peak_et * $etaf * 0.7854 * 1 * .623; echo number_format($peak_water,1) . ' gal./wk. '; ';
answer count: 1
has comment: http://stackoverflow.com/comment/39556507
has comment: http://stackoverflow.com/comment/39559378
has comment: http://stackoverflow.com/comment/39556402
tagged with: javascript
has answer: http://stackoverflow.com/a/25369318
has comment: http://stackoverflow.com/comment/39556441
linked to: http://stackoverflow.com/q/203198
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25369318
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39556527
has title: Add javascript onclick message to php dynamic list
has comment: http://stackoverflow.com/comment/39557106

http://stackoverflow.com/comment/39440648
type: QuestionComment
comment on: http://stackoverflow.com/q/25304663
has text: If you're new the PHP for AJAX things my advice is that you check [jQuery](http://jquery.com/) and also have some read on [separation of concerns](http://symfony.com/doc/current/book/from_flat_php_to_symfony2.html), though in the symfony documentation this document shows why the separation of concerns - buissnes logic & presentation mainly - are important and how to achieve it (you can achieve it without using a framework :-)
score: 0
type: Comment

http://stackoverflow.com/q/25282034
tagged with: ajax
tagged with: jquery-events
has body: I am trying to track user events happening on my site. One way to do this is send an ajax request every time you see an event. But this will unnecessarily load the server. One way to mitigate this problem is to send request in bulk on unload event(right now I have set a threshold of 16 events). But the problem arises during "unload/beforeunload" event. The following are the problems I am facing: AJAX request does not work unless they are synchronous. But I need to use asynchronous as its counterpart could cause problems if the server response is slow. Most of the questions raised on this matter in Stack Overflow suggests you to use "sync". Some of them are given below. Sending a post Request with Javascript on unload/beforeunload. Is that possible? Ajax request with JQuery on page unload I can use images. Well this method works fine (requests are logged) but its a GET request. I need POST request. I can use a form with the result loading in a hidden iframe. This works fine (requests are logged) on Chrome (36.0.1985.125) but fails on Firefox (31.0). But on Chrome I am facing a strange problem. That is, if I remove "target" attribute, the request is not being logged. Is "target" attribute necessary to initiate a request during "unload/beforeunload" event? One of the Stack Overflow answer suggested that form submission is asynchronous. If that is so why does not browser cancel the request as it does for an AJAX request during "unload/beforeunload" event? and same question for images too. How to make form submission synchronous? The test code which I used is given below. I am using XAMPP server on MAC. test.html Front end code. test.php Backend code.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/47216691
downvote count: 0
has title: Sending post request on window unload event (AJAX request Vs Form submit Vs Image request)
score: 1
favorite count: 0
tagged with: forms
linked to: http://stackoverflow.com/q/17188149
linked to: http://stackoverflow.com/q/1821625
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/21228349
upvote count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25290706

http://stackoverflow.com/comment/39414056
type: QuestionComment
score: 0
has text: It gives me null pointer exception.
comment on: http://stackoverflow.com/q/25288330
type: Comment

http://stackoverflow.com/comment/39501536
comment on: http://stackoverflow.com/q/25337081
score: 0
type: QuestionComment
has text: By Mistake I have voted UP for Amin Jafari....
type: Comment

http://stackoverflow.com/q/25378862
tagged with: angularjs
type: AnsweredQuestion
has title: AngularJS directive for Word Count not triggered on user selecting text and pressing delete/backspace
score: 1
upvote count: 1
type: Question
tagged with: angularjs-directive
tagged with: javascript
has answer: http://stackoverflow.com/a/25379212
has body: I have written a directive for my AngularJS app that counts the amount of words in a textarea and if it is lower than a determined threshold I set the ng-valid item to false. All is well however the word count doesn't seem to work when the user selects some or all the text in the textarea and then deletes the selected content using the backspace or delete button. How to I capture this event? My directive is below, I thought the binding to the onmouseup event would cover such a scenario: .directive('wordCount', function () { return { restrict: 'A', // only activate on element attribute require: '?ngModel', // get a hold of NgModelController link: function (scope, element, attrs, ngModel) { // do nothing if no ng-model if (!ngModel) { return; } // scope.minWordCount is taken from the scope!!!! We repeat this so put into reuseabe function if (!scope.minWordCount) { return; } function checkWordCount() { if (element[0].value === '') { scope.wordCount = 0; } else { scope.wordCount = element[0].value.replace(/\s+/gi, ' ').split(' ').length; } // replace the numbers by finding the first space scope.wordCountText = scope.wordCount + ' ' + scope.wordCountText.substr(scope.wordCountText.indexOf(' ') + 1); if(scope.wordCount &gt; scope.minWordCount - 1) { ngModel.$setValidity('wordcount', true); } else { ngModel.$setValidity('wordcount', false); } } var page = angular.element(window); page.bind('load', function () { checkWordCount(); }); // Listen for change events to enable binding element.bind('blur keyup keydown keypress click change focus onmouseup', function () { checkWordCount(); }); } }; }) ;
downvote count: 0
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25379212

http://stackoverflow.com/comment/39455013
type: QuestionComment
comment on: http://stackoverflow.com/q/25311974
has text: nothing, unfortunately
score: 0
type: Comment

http://stackoverflow.com/comment/39380943
comment on: http://stackoverflow.com/q/25271931
score: 0
has text: I can see how to activate the button, but how do I make it so when the user clicks it, it activates the conn.accept() portion?
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39578502
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25377136
score: 1
has text: When you want the results from autocomplete, fetch them(and don't request the geocoder) https://developers.google.com/maps/documentation/javascript/places-autocomplete#place_autocomplete_service

http://stackoverflow.com/q/25290299
upvote count: 12
tagged with: javascript
tagged with: dom
score: 12
answer count: 2
downvote count: 0
favorite count: 0
possible better answer: http://stackoverflow.com/a/25290476
has answer: http://stackoverflow.com/a/25290476
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25290371
has body: I'm looking for a robust way of dynamically injecting a query string parameter when a visitor clicks on a static anchor-link. For example a link: Test I want to pass a query string to the next page but have to assign the value dynamically. How can I achieve this? I know this is simple I'm just missing something obvious! =\ Thanks in advance, John d
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25290371
type: Question
has title: Add Query-String parameter to static link on click

http://stackoverflow.com/a/25339402
score: 0
has body: @user3946910 Try like this. in your index.html and in your test.js file add this. $(document).ready(function(){ alert("yes"); }); Like this just import all plugins in the html itself, and create fresh .js page to write just your own script. I hope it will help.
answers question: http://stackoverflow.com/q/25339333
type: Answer

http://stackoverflow.com/a/25373484
has body: You can clear the markup from the partial view using empty(): $('#EditTestSection').empty(); Which you would include as part of your submit function.
type: AcceptedAnswer
upvote count: 5
answers question: http://stackoverflow.com/q/25373387
type: Answer
has comment: http://stackoverflow.com/comment/39567521
accepted answer of: http://stackoverflow.com/q/25373387
downvote count: 0
score: 5
has comment: http://stackoverflow.com/comment/39567595

http://stackoverflow.com/comment/39483711
comment on: http://stackoverflow.com/a/25311042
score: 0
type: AnswerComment
type: Comment
has text: The error container **div** is generated by the plugin

http://stackoverflow.com/comment/39316080
type: AnswerComment
has text: Yeah see you around. I hope you're still here in my next jquery problems to come. Hahaha :D
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25237537

http://stackoverflow.com/comment/39359526
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25247207
has text: The partID you see, 2 in your example, is the part number. You want to issue UID FETCH 1234 BINARY.PEEK[2] (if the server supports the BINARY extension) or BODY.PEEK[2]. BINARY.PEEK gives you the raw data, BODY.PEEK has to be decoded according to the encoding field you also have. At this point you have a string in RAM, and I expect you can find a way to write that string to a file using node.js.

http://stackoverflow.com/a/25362626
type: Answer
downvote count: 0
score: 5
has comment: http://stackoverflow.com/comment/39549861
has body: You can use the flag JSON_HEX_TAG, so that &lt; and &gt; will be encoded as \u003C and \u003E respectively. json_encode($str, JSON_HEX_TAG)
upvote count: 5
answers question: http://stackoverflow.com/q/25362056

http://stackoverflow.com/a/25383768
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25381849
has body: JS function GetPreviousDowntimeEvents($http) { var self = this; self.PreviousDowntimeEvents = []; self.AjaxData = ngHesto.Ajax.Get($http , { url: PREVIOUS_DOWNTIME_EVENTS , success: function (data) { self.PreviousDowntimeEvents = data.data; console.log(self.PreviousDowntimeEvents); } }); } var ngAppModule = angular.module('myApp', []); ngAppModule.controller('DowntimeController', ['$scope','$http', function ($scope, $http) { $scope.GetPreviousDowntimeEvents = new GetPreviousDowntimeEvents($http); }]); HTML {{previousdowntime.CategoryId}} {{previousdowntime.StartTime}} {{previousdowntime.EndTime}} {{previousdowntime.Comment}}
accepted answer of: http://stackoverflow.com/q/25381849
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39410407
score: 0
type: QuestionComment
has text: yes, the best (and only?) way is to make the svg responsive itself. as the reply linked above suggests
type: Comment
comment on: http://stackoverflow.com/q/25288188

http://stackoverflow.com/q/25288443
upvote count: 0
answer count: 1
has body: why this javascript effect cannot use in ie7 ? http://jsfiddle.net/peap/cb0nesfh/ IE7 NOT work Why i cannot use this function in ie7 function over(event) { $('.notch2').stop().animate({top: '33px' , opacity: 1}, 100); $('.mask').stop().animate({top: '0px' , opacity: 1}, 100); } but i can use this on ie 7 function over(event) { $('.notch2').show(); $('.mask').show(); }
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39409785
tagged with: http://stackoverflow.com/tag/html
tagged with: css
linked to: http://stackoverflow.com/q/1552020
has title: Why this javascript effect cannot use in ie7?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25288579
downvote count: 1
tagged with: internet-explorer
tagged with: javascript
score: -1
duplicate of: http://stackoverflow.com/q/1552020
type: Question
has comment: http://stackoverflow.com/comment/39410228

http://stackoverflow.com/q/25309434
has body: I always get the wrong date when I use var date = new Date(timestring), there is always +2 GMT hours. var unsortedPlayTimes = [{date:'2014-08-11T09:30:00'}, {date:'2014-08-11T08:30:00'}, {date:'2014-08-11T08:15:00'}, {date:'2014-08-11T08:45:00'}, {date:'2014-08-11T12:30:00'}, {date:'2014-08-11T10:30:00'}, {date:'2014-08-11T11:30:00'}, {date:'2014-08-11T07:30:00'}, {date:'2014-08-11T13:00:00'}, {date:'2014-08-11T23:00:00'}, {date:'2014-08-12T00:00:00'}, {date:'2014-08-12T01:00:00'}, {date:'2014-08-12T05:00:00'}, {date:'2014-08-12T09:00:00'}, {date:'2014-08-11T14:00:00'}, {date:'2014-08-11T18:30:00'}, {date:'2014-08-11T13:00:00'}]; function SortandFilterPlayTimes (allPlayTimes) { var filteredPlayTimes = []; $.each(allPlayTimes, function(index, value) { var date = new Date(value.date); if ($.inArray(date,filteredPlayTimes) === -1) { filteredPlayTimes.push(date); } }); }; Why is JavaScript always adding this +2 hours ?
answer count: 3
downvote count: 1
has answer: http://stackoverflow.com/a/25309749
favorite count: 0
has answer: http://stackoverflow.com/a/25309548
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39449027
tagged with: date-parsing
upvote count: 0
has title: Date parsed with gmt + 2 hours
has answer: http://stackoverflow.com/a/25309538
type: Question
has comment: http://stackoverflow.com/comment/39448915
tagged with: javascript
score: -1
tagged with: date

http://stackoverflow.com/a/25389281
has body: It looks like you're looking for the splice method: function insert(target, source, position) { Array.prototype.splice.apply(target, [position, 0].concat(source)); return target; } var numbers = [1,3,5,7,9,11]; var letters = ['a','b','c']; insert(numbers, letters, 3); console.log(numbers); &gt;&gt; [1, 3, 5, "a", "b", "c", 7, 9, 11]
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39597245
answers question: http://stackoverflow.com/q/25389207
upvote count: 2

http://stackoverflow.com/q/25244493
answer count: 4
score: 2
has comment: http://stackoverflow.com/comment/39328494
has comment: http://stackoverflow.com/comment/39328753
has answer: http://stackoverflow.com/a/25244863
type: Question
has answer: http://stackoverflow.com/a/25245002
has comment: http://stackoverflow.com/comment/39328853
has comment: http://stackoverflow.com/comment/39328567
has body: I cannot position info-pop-title on top of bar-header as you can see from my current code the text "TEST----" is visible but under the bar-header element. http://jsfiddle.net/uvh4ymh9/ Could you point me out what am I doing wrong and how to fix it PS: I cannot change structure for the HTML, only CSS solution ChannelLive logo 0 TEST----------------- ☆☆☆☆☆ null Play Details
has answer: http://stackoverflow.com/a/25244683
tagged with: javascript
has comment: http://stackoverflow.com/comment/39328833
has comment: http://stackoverflow.com/comment/39328369
upvote count: 2
has comment: http://stackoverflow.com/comment/39328723
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25244800
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Positioning z-index does not work as expected
tagged with: css

http://stackoverflow.com/comment/39381665
type: Comment
comment on: http://stackoverflow.com/a/25266632
type: AnswerComment
has text: Simply, if you wish input translated into paragraphs (i.e.) so: `$('#apexir_rollover_content a').each(function() { var innerEle = $(this).children(); var simpleParagraph = $(' ').text(innerEle.val()); $(this).replaceWith(simpleParagraph); }); });` bye
score: 0

http://stackoverflow.com/comment/39393854
has text: @Downvoter: Why? Any suggestions on how I can improve the question? If not, please upvote again, since this is a legit question that is not answered by the appcelerator docs by now. Thanks.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25267803
type: QuestionComment

http://stackoverflow.com/q/25272296
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25272364
has title: Jquery function - on element
has comment: http://stackoverflow.com/comment/39380401
answer count: 2
possible better answer: http://stackoverflow.com/a/25284215
has answer: http://stackoverflow.com/a/25284215
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25272364
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I have this jquery code, working 100%. This is executing on every page load, when i import my js file in the html. My question, how can i make use of this code, only when the element is present, or call it directly from the element itself? I have similiar functions, but, on html's that dont have specific elements, javascript execution halts. Sometimes because the html elements dont exist on that specific html file. /** * Message Box Display */ $(document).ready(function() { $("#Message-Box" ).slideDown("slow", function() { $("#Message-Box").addClass('Show'); setTimeout(function(){ $('#Message-Box').addClass('Hide'); }, 5000); }); });
has comment: http://stackoverflow.com/comment/39380448
type: Question

http://stackoverflow.com/q/25292811
has answer: http://stackoverflow.com/a/25294424
possible better answer: http://stackoverflow.com/a/25294424
type: AnsweredQuestion
upvote count: 2
has title: Multiply form td by input
has answer: http://stackoverflow.com/a/25292908
type: Question
tagged with: javascript
has body: I have a form, with a table inside. Each row 4 columns: Item Name Item Price (this is set by me, not user) Quantity (set by user input) Total (price*qty) I want it to reflect totals live. JSFiddle: http://jsfiddle.net/uyyzkLny/ Code Snippet: Salmon 28 0.00 -- $(document).ready(function () { $(".txtMult input").keyup(multInputs); function multInputs() { var mult = 0; // for each row: $("tr.txtMult").each(function () { // get the values from this row: var $val1 = $('.val1', this).val(); var $val2 = $('.val2', this).val(); var $total = ($val1 * 1) * ($val2 * 1) $('.multTotal',this).text($total); mult += $total; }); $("#grandTotal").text(mult); } }); Issue: Keep getting 0. (or NaN). From what I know about Jquery, the issue is that I'm treating val1 as user input instead of hard-coded. How do I fix that? Is that the problem? TIA
has answer: http://stackoverflow.com/a/25292965
answer count: 3
score: 2
accepted answer: http://stackoverflow.com/a/25292908
downvote count: 0
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/25329487
answer count: 2
possible better answer: http://stackoverflow.com/a/25330011
tagged with: javascript
tagged with: countdown
accepted answer: http://stackoverflow.com/a/25329707
tagged with: clearinterval
score: 0
tagged with: setinterval
has answer: http://stackoverflow.com/a/25329707
has answer: http://stackoverflow.com/a/25330011
has title: Reset countdown interval with clearInterval doesn't work
has body: I don't know how to reset ongoing counter. I have two counters on my page. It seems it works properly, but when I want to set new value to counter2 when it is still counting down, I see in my div two counting times. New and old one. var interval1; var interval2; function countdown(element, minutes, seconds, timer) { var el = document.getElementById(element); clearInterval(timer); timer = setInterval(function() { if(seconds == 0) { if(minutes == 0) { (el.innerHTML = "---"); clearInterval(timer); return; } else { minutes--; seconds = 60; } } if(minutes &gt; 0) { var minute_text = minutes + (minutes &gt; 1 ? ' minutes' : ' minute'); } else { var minute_text = ''; } var second_text = seconds &gt; 1 ? '' : ''; el.innerHTML = minute_text + ' ' + seconds + ' ' + second_text + ''; seconds--; }, 1000); } function setCounter1(mins) { countdown('timeLeft', mins, 00, interval1); } function setCounter2(mins) { countdown('timeLeft2', mins, 00, interval2); } If for example I have set counter2 for 10mins, and after a minute I call setCounter2(3), I see in my timeLeft2 div two counters. How can I reset ongoing counter? Thanks for your help!
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39487156
type: Question

http://stackoverflow.com/q/25301018
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39473819
possible better answer: http://stackoverflow.com/a/63622740
tagged with: google-chrome-app
has comment: http://stackoverflow.com/comment/39455772
has answer: http://stackoverflow.com/a/63622740
has comment: http://stackoverflow.com/comment/39467227
has answer: http://stackoverflow.com/a/25319132
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39435949
score: 1
has comment: http://stackoverflow.com/comment/39464669
upvote count: 1
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/39454957
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25319132
has body: I have searched tutorials like https://developer.chrome.com/apps/app_identity, but I cannot see how I can retrieve a user's email address logged in chrome. I can only get a token for the chrome.identity api https://developer.chrome.com/apps/identity so the example code for getting the token works chrome.identity.getAuthToken({'interactive': true}, function(token) { console.log('user token: ' + token); }); but from here how do I get the email. Note: this is for an app not an extension, thus context_script did not work in my manifest from auth example. Also chrome.identity.getProfileUserInfo is for the beta version 37, I tried it also but enail was empty. I am out of options, but i know there is a way to get the email.
answer count: 2
has title: Chrome App, getting logged in user's email address

http://stackoverflow.com/comment/39465039
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25317976
has text: Ah, beat me by one sec.

http://stackoverflow.com/a/25387617
has body: Try this function getValueFromRadioButton(name) { //Get all elements with the name var buttons = document.getElementsByName(name); for(var i = 0; i &lt; buttons.length; i++) { //Check if button is checked var button = buttons[i]; if(button.checked) { //Return value return button.value; } } //No radio button is selected. return null; } IDs are unique so you should not use the same ID for multiple items. You can remove the all the radio button IDs if you use this function.
score: 8
accepted answer of: http://stackoverflow.com/q/25387081
answers question: http://stackoverflow.com/q/25387081
type: AcceptedAnswer
downvote count: 0
upvote count: 8
type: Answer

http://stackoverflow.com/a/25306447
has body: Because orderBy filter, you can use that. Your ng-repear would probably look similar to this: ng-repeat="item in items | orderBy: orderByDate" and then on your controller you would define the orderByDate function: $scope.orderByDate = function(item) { var parts = item.dateString.split('-'); var date = new Date(parseInt(parts[2], parseInt(parts[1]), parseInt(parts[0])); return date; }; Implementation of the function is up to you. I choose to create Date from the string. The object you return from orderByDate function is then used to be order with using &lt;, =, > operators. EDIT: solution for :reverse Since :reverse can't be used with a function passed as parameter, you can implement your custom function to return reversed value itself. In such case using Date is not possible, I would construct a number then and returned it with minus: $scope.orderByDate = function(item) { var parts = item.dateString.split('-'); var number = parseInt(parts[2] + parts[1] + parts[0]); return -number; };
has comment: http://stackoverflow.com/comment/39445752
downvote count: 0
answers question: http://stackoverflow.com/q/25306216
score: 8
upvote count: 8
type: Answer
has comment: http://stackoverflow.com/comment/39446322
has comment: http://stackoverflow.com/comment/39447757
has comment: http://stackoverflow.com/comment/39446037

http://stackoverflow.com/q/25352662
has body: Can't figure out the proper syntax to place this javascript code into a .js file.
score: 0
has comment: http://stackoverflow.com/comment/39527983
tagged with: external
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25352756
has answer: http://stackoverflow.com/a/25352792
has comment: http://stackoverflow.com/comment/39528027
tagged with: file
type: Question
answer count: 2
tagged with: javascript
has title: javascript to external .js file

http://stackoverflow.com/q/25265519
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/25364275
tagged with: jquery
has body: I am using semantic-ui and I want to show some info text in dropdown. But it act as a link even it's a Here profile, settings and logout are link and rest are text(non-clickable) sample mockup I tried with. Narottam Guattom Action one Action one Action one Semantic-ui treat that div as a link and dropdown get closed on click. Is there better way to implement this in semantic-ui Or how can I prevent click event.
possible better answer: http://stackoverflow.com/a/25265687
favorite count: 0
has title: Simple non clickable text in semantic-ui dropdown
has answer: http://stackoverflow.com/a/25265687
tagged with: semantic-ui
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/25364275
type: Question
score: 1
tagged with: javascript

http://stackoverflow.com/q/25367722
upvote count: 1
downvote count: 1
tagged with: internet-explorer
has body: IE 11 does not seem to be recognizing MSFullscreenChange. I have this code in the script: document.addEventListener("MSFullscreenChange", function () { if (document.msFullscreenElement != null) { console.info("Went full screen"); } else { console.info("Exited full screen"); } }); In other words, I'm using the exact code shown here on Microsoft's own site, but nothing's being printed out in the console, and I know fullscreen is enabled. I also noticed I'm getting the SEC7118 message: XMLHttpRequest for https://gdata.youtube.com/feeds/api/videos/qywzeXowktA?v=2&amp;alt=json required Cross Origin Resource Sharing (CORS). That wouldn't be affecting it, would it?
type: Question
has comment: http://stackoverflow.com/comment/39561707
score: 0
has comment: http://stackoverflow.com/comment/45518722
has title: IE 11 not listening to MSFullscreenChange
has comment: http://stackoverflow.com/comment/39562008
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/21475597
has comment: http://stackoverflow.com/comment/39568033
answer count: 0
has comment: http://stackoverflow.com/comment/114173198
type: UnansweredQuestion

http://stackoverflow.com/q/25338593
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has body: I presume the is cause to my problem is a Jquery conflict. Please correct me in the first place if it isn't the case looking at below. I'm new to Jquery and trying to insert a drop down plug in to a site. The attempt is successful, however an already existing Jquery image slider goes away when the drop down works. My code looks like below. Links which relevant to the image slider plug in: and the links for the dropdown plugin; When I remove the jqueryminx.js link the image slider works fine. So I tried doing the following as suggested by one of the stakoverflow questions but couldn't get to work. My attempt as follows. tried to use noConflict; $.noConflict(true); and also here. $.noConflict(true); Doesn't seems to be working. Any help would be much appreciated. Thank you.
has title: Jquery conflict while attaching Jquery.min.js
has answer: http://stackoverflow.com/a/25338913
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25338913

http://stackoverflow.com/comment/39488365
type: AnswerComment
comment on: http://stackoverflow.com/a/25330185
type: Comment
has text: And i still dont know how to pass the latitude and longitude values to a label,its still using txtAddress which i dont want.
score: 0

snap.svg
tags question: http://stackoverflow.com/q/25351919
type: Tag
tags question: http://stackoverflow.com/q/25376617
tags question: http://stackoverflow.com/q/25377921
tags question: http://stackoverflow.com/q/25238748
tags question: http://stackoverflow.com/q/25276919
tag name: snap.svg
tags question: http://stackoverflow.com/q/25253776

http://stackoverflow.com/comment/39556399
type: Comment
has text: Have you tried calling the chart code in the success callback of the getJSON function?
comment on: http://stackoverflow.com/q/25367291
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39549778
type: QuestionComment
has text: Also, you currently are printing the *wrong* stack - it is created when `new Error`, not when `new CustomError` is called. Have a look at https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
type: Comment
comment on: http://stackoverflow.com/q/25364152
score: 0

http://stackoverflow.com/a/25317773
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/39465156
has comment: http://stackoverflow.com/comment/39465095
has comment: http://stackoverflow.com/comment/39465456
score: 2
has body: Basically you want to place the iframe in a container that is positioned absolutely. Then place it directly over the image. Here is an example. Please note the iframe link will not work inside of the fiddle due to JS Same origin issues. http://jsfiddle.net/weyg1opk/ You do not have iframes enabled .container { position: relative; top: 110px; left: 68px } .image_container { width: 421px; height: 365px; } .preview_image{ position: absolute; } .iframe_example { width: 270px; height: 155px; z-index: 1000; }
downvote count: 0
has comment: http://stackoverflow.com/comment/39465374
answers question: http://stackoverflow.com/q/25317582

import
type: Tag
tags question: http://stackoverflow.com/q/25304006
tag name: import

http://stackoverflow.com/a/25292245
has body: Maybe this solution can help you? $("a.icon-loading-link").click(function(e){ var link = $(e.target).prop("href"); //save link of current &lt;a&gt; into variable /* Creating new icon-tag, for example $("&lt;img/&gt;", {src: "link/to/file"}).appendTo("next/dt"); */ e.preventDefault(); //Cancel opening link return false; //For WebKit browsers });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25291681

http://stackoverflow.com/q/25336845
answer count: 1
tagged with: javascript
score: 0
has body: Not being very good at maths, I'm struggling with this. I've got a conversion of lat/lon into a target: lat = Math.max(-85, Math.min(85, lat)); phi = THREE.Math.degToRad(90 - lat); theta = THREE.Math.degToRad(lon); target.x = 512 * Math.sin(phi) * Math.cos(theta); target.y = 512 * Math.cos(phi); target.z = 512 * Math.sin(phi) * Math.sin(theta); Can anyone tell me how I would reverse that, i.e. convert a Vector into lat/lon?
tagged with: three.js
accepted answer: http://stackoverflow.com/a/25344756
has title: Three.js Maths conversion
type: AnsweredQuestion
tagged with: math
has answer: http://stackoverflow.com/a/25344756
type: Question

http://stackoverflow.com/q/25264035
has comment: http://stackoverflow.com/comment/39364791
has answer: http://stackoverflow.com/a/25264157
has answer: http://stackoverflow.com/a/25264082
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39364675
tagged with: javascript
score: -7
has title: How to get the pathname in JS after the /?
duplicate of: http://stackoverflow.com/q/6944744
favorite count: 0
linked to: http://stackoverflow.com/q/6944744
has body: If the current url is: "https://stackoverflow.com/questions/ask" What's a good way to just get: "questions/ask" ?
downvote count: 7
has comment: http://stackoverflow.com/comment/39364639
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39364954

http://stackoverflow.com/comment/39304413
has text: have you tried createing a Class with those var for example public String Name , public String city , which json are you using in Android?>
comment on: http://stackoverflow.com/q/25231864
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39643700
has text: YOU MY FRIEND ARE A GENIUS, my boss wanted me to do it your way :)
type: Comment
comment on: http://stackoverflow.com/a/25330657
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39573826
score: 0
type: Comment
type: QuestionComment
has text: refresh the listview after appending.
comment on: http://stackoverflow.com/q/25376722

http://stackoverflow.com/comment/39303662
has text: @theftprevention thank, glad you like it. That regex technique is very useful
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25230717

http://stackoverflow.com/q/25279025
has title: Size limit on sending an email in Cloud Code via SendGrid
answer count: 0
has body: There appears to be an issue sending an large email through Parse cloud code using the SendGrid module. Certain messages wont send and return with a 400 error. {"Cache-Control":"no-cache","Connection":"close", "Content-Type":"text/html","Date":"Wed, 13 Aug 2014 03:21:13 GMT", "Server":"nginx/1.4.7"},"text":" 400 Bad request \nYour browser sent an invalid request.\n \n" When I reduce the size of the html string I send, it works without any trouble. There's little to no documentation on Sendgrid for Parse. Below is the code where I send the email. The html string I send is roughly 4300 characters. var hostEmail = host.attributes.user.attributes.email; var subject = visitorFullName + " is here to see you"; var html = '@@html-email text goes here'; SendGrid.sendEmail({ to: hostEmail, from: "no-reply@example.co", subject: subject, html: html }, { success: function(httpResponse) { response.success('email sent'); }, error: function(httpResponse) { response.error(httpResponse); } }); Is there any way to get this working with long strings? Thanks!
score: 0
has comment: http://stackoverflow.com/comment/39392373
type: Question
tagged with: sendgrid
tagged with: javascript
tagged with: email
tagged with: parse-platform
has comment: http://stackoverflow.com/comment/39413666
type: UnansweredQuestion

http://stackoverflow.com/comment/39593334
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25387121
has text: Just FYI: I know this isn't part od the question but for performance reasons you should only append to the dom once. Maybe rewrite the adding of the options elements as string concatenation and append the string after the loop. Diving into the DOM is a very expensive operation.

http://stackoverflow.com/comment/39528630
score: 0
type: AnswerComment
has text: @user3648221 well, yes, I designed it for single option. If you need multiple options, you can use [this code](http://jsfiddle.net/Regent3000/b2eh2w07/20/)
type: Comment
comment on: http://stackoverflow.com/a/25348698

http://stackoverflow.com/comment/39336610
type: Comment
has text: @BoltClock Uhm, I should have checked browser support before answering. I assumed it would be better because I use Firefox Nightly, so it has been working for me for a considerable amount of time.
type: AnswerComment
comment on: http://stackoverflow.com/a/25247615
score: 0

http://stackoverflow.com/comment/60591421
score: 2
has text: @joeytwiddle "Bulk" operations are not async until you call `.execute()`. The purpose is that any "back and forth" to the server is going to cost in IO, so you are trying to minimalize it. True that in a synchronous loop you possibly have `.execute()` happening several times and using several connections. But you can alter that with something like [`async.whilst`](https://github.com/caolan/async#whilst) or other control where the iteration can be controlled by a callback ( and therefore inside `.execute()` ) to handle completion. That's a bit harder to do with promises, but still possible.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25286719

http://stackoverflow.com/comment/39501497
type: QuestionComment
has text: I am included fancybox jquery. and also check it on view source. it was includeed.
comment on: http://stackoverflow.com/q/25337124
score: 0
type: Comment

http://stackoverflow.com/comment/39591417
type: Comment
type: QuestionComment
has text: Just checked, and yes it was defined correctly (as far as I know). I'm writing my code in Visual Studio, so if it wasn't defined properly I would probably see some sort of error, or my code wouldn't run
comment on: http://stackoverflow.com/q/25384086
score: 0

http://stackoverflow.com/comment/39421083
score: 0
type: Comment
has text: did you disable the buttons @Narutkowski?
comment on: http://stackoverflow.com/a/25292002
type: AnswerComment

http://stackoverflow.com/comment/39413107
comment on: http://stackoverflow.com/q/25290017
has text: Hit the F12 key and you'll get debugging tools. Exactly how they work varies from browser to browser, but it's definitely worth your time to get familiar with the tools. It's like flying blind without them.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39418394
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25292835
score: 0
has text: Hmm, `.schedule` is already on page, you are injecting ` ` etc.. tags inside a div container, are you trying to update the entire page with new HTML?

http://stackoverflow.com/q/25322389
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39473214
has comment: http://stackoverflow.com/comment/39473173
type: AnsweredQuestion
has title: Jquery does not preserve my events replaceWith
type: Question
has answer: http://stackoverflow.com/a/25322633
score: 0
has body: I first copy my element into another box: $('#PageContainer').after($('&lt;div/&gt;', {style: 'display: none', id: 'ersatz_div'})); $('#ersatz_div').html($('#PageContainer').clone()); Next i put the element, that i want to print, into my visible box: $('#PageContainer').html(element); window.print(); And at the end i transfer the html back into the visible container: $('#PageContainer').replaceWith($('#ersatz_div #PageContainer').clone()); $('#ersatz_div').remove(); Although i used clone() the events do not exisit anymore. I read some similar question that state i should use .on("click" instead of click() but this would mean that i had to change a lot of code! Is there another posibility? Thanks
answer count: 1
accepted answer: http://stackoverflow.com/a/25322633

http://stackoverflow.com/comment/39386401
has text: @elclanrs thanks though Im still trying to get the hang of regex but nice!
comment on: http://stackoverflow.com/q/25275364
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39470277
has text: I'd tell **them** to write a parser to run your pages through, it shouldn't be your responsibility to be irresponsible.
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25320734

http://stackoverflow.com/comment/39451622
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25304858
has text: @Moob, place the cursor at the start of the text and press pagedown. it will scroll the page and move the cursor to the end of the text within the textarea. It's the same in a giant textarea, or in wordpad.
score: 0

http://stackoverflow.com/comment/39453956
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25311741
has text: @user3703527 the small box is the empty button.

cryptography
tag name: cryptography
type: Tag
tags question: http://stackoverflow.com/q/25250192
tags question: http://stackoverflow.com/q/25288311

http://stackoverflow.com/q/25378644
has comment: http://stackoverflow.com/comment/39577700
has comment: http://stackoverflow.com/comment/39577061
type: UnansweredQuestion
downvote count: 2
type: Question
has answer: http://stackoverflow.com/a/25378880
score: -2
has answer: http://stackoverflow.com/a/25378833
answer count: 2
upvote count: 0
has title: Appending paragraph numbers to table of contents headings
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I've got a bit of a problem here that I can't seem to solve for the life of me. I have a page of text structured like so: Main heading 1 Nam a dapibus felis, id adipiscing libero. Aliquam volutpat vel metus at molestie. Curabitur gravida sed justo at feugiat. In ut pellentesque lorem. Nunc mollis, libero a vestibulum pharetra, neque enim lacinia odio, ut dignissim nisl lectus vitae nisl. Curabitur ac erat nibh. Suspendisse posuere vitae metus at semper. Aliquam vitae tellus id nulla porttitor pellentesque at nec elit. Sed nec arcu quis est eleifend gravida. 2 Nam a dapibus felis, id adipiscing libero. Aliquam volutpat vel metus at molestie. Curabitur gravida sed justo at feugiat. In ut pellentesque lorem. Nunc mollis, libero a vestibulum pharetra, neque enim lacinia odio, ut dignissim nisl lectus vitae nisl. Curabitur ac erat nibh. Suspendisse posuere vitae metus at semper. Aliquam vitae tellus id nulla porttitor pellentesque at nec elit. Sed nec arcu quis est eleifend gravida. At the top of my page, I have a table of contents, generated at runtime by the CMS: Heading 1 Main heading A heading Using JavaScript or jQuery (or any other method people could suggest!) I need to find a way of grabbing the paragraph numbers (defined by the class paranum) found underneath the headings on the page, and displaying them inline with the table of contents, like so: Any help is massively appreciated!

http://stackoverflow.com/q/25365730
has body: I have a program in node.js. It connects to a web service that offers a JSON file with data, but the file only shows a limited amount of data (500 records per request), starting with the value of the index parameter in the request. "lastentry" returns the ID of the last record from the current page of data. Lastpage is a boolean that indicates when the last page is reached. The first request looks like this: http://example.com/data.json?index=0 I build this function to get the ID of the last record. It calls itself until lastpage is true. The index variable increases correctly with every request, according to the value I read from the JSON, but "url" doesn't change and always stays at 0, even though it is built from the index variable. Why is that? var lastpage = false; var index = 0; var url = "http://example.com/data.json?index=" + index; function getLastEntry() { request(url, function (err, resp, body) { if (err || resp.statusCode != 200) { // error handling } else { var data = JSON.parse(body); index = data.lastentry; lastpage = data.lastpage; if (lastpage == false) { getLastEntry(); } } } } getLastEntry();
type: Question
answer count: 1
tagged with: javascript
tagged with: variables
score: 0
tagged with: increment
has title: Javascript value doesn't change when the variable contained in it increases
has comment: http://stackoverflow.com/comment/39552121
has answer: http://stackoverflow.com/a/25365781
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25365781

http://stackoverflow.com/q/25286967
has body: I am trying to add a message in my jsp after the process is done by hitting the submit button. function onSubmit() { alert("Master_Data.xlsx and Consistency_Check_Data.xlsx are located under d:/stage/MasterDataReports"); } Master Data File Site Name <jsp:useBean id="masterDao" class="master.dao.MasterDataDao"/> ALL <c:forEach items="${masterDao.allSites}" var="siteDto"> ${siteDto.name} </c:forEach> Division <jsp:useBean id="masterDaoUtil" class="master.dao.util.MasterDataConstants"/> <%=MasterDataConstants.DIVISION_TYPE_AUDIT_MANAGEMENT_GLOBAL_NAME%> <%=MasterDataConstants.DIVISION_TYPE_CHANGE_MANAGEMENT_GLOBAL_NAME%> <%=MasterDataConstants.DIVISION_TYPE_DEA_MANAGEMENT_GLOBAL_NAME%> <%=MasterDataConstants.DIVISION_TYPE_EHS_MANAGEMENT_GLOBAL_NAME%> <%=MasterDataConstants.DIVISION_TYPE_EVENT_MANAGEMENT_GLOBAL_NAME%> **strong text** Right now the submit process will only happen after I clear the alert. Is there a way that I can either pop an alert after the submit process is done or if I can add a message to the jsp page? Thanks in advance Sonny Here is my updated Servlet that is causing error: package master.service; import java.io.IOException; import java.sql.SQLException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; **strong text**import javax.servlet.http.HttpSession; @SuppressWarnings("serial") public class MasterDataServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response, HttpSession session) throws IOException, ServletException { MasterDataService masterDataService = new MasterDataService(); try { int siteId = Integer.parseInt(request.getParameter("siteId")); int divisionId = Integer.parseInt(request.getParameter("divisionId")); //For master data file masterDataService.createMasterDataFile(siteId, divisionId,false); //For consistency checker file masterDataService.createMasterDataFile(siteI…
has title: How to create an alert message in jsp page after submit process is complete
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25287443
has answer: http://stackoverflow.com/a/25287443
accepted answer: http://stackoverflow.com/a/25287195
upvote count: 10
type: Question
downvote count: 0
score: 10
tagged with: jsp
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/39429296
has answer: http://stackoverflow.com/a/25287195
favorite count: 0

http://stackoverflow.com/comment/39429432
comment on: http://stackoverflow.com/q/25298675
score: 0
type: Comment
type: QuestionComment
has text: oh, and in the future, learn the difference between objects and arrays before you try to use them.

http://stackoverflow.com/comment/39596127
comment on: http://stackoverflow.com/q/25388711
has text: ugh. 30 secs. Thanks a lot. Wonder how this works though https://coderwall.com/p/r3_geg
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/q/25280510
type: AnsweredQuestion
score: 1
tagged with: directive
accepted answer: http://stackoverflow.com/a/25280730
type: Question
has title: AngularJS: Directive - Attributes null
tagged with: null
tagged with: javascript
has body: I'm new to Angular and after a few weeks of struggling through it now I ran into a problem i cannot solve. So now I'm asking this question here hopeing somebody can help me or give me a hint :) My Problem is located on a custom directive. The directive expects 6 Attributes. 5 of them a simple Strings or Numbers. One is an Array, containing JSON-Objects which is loaded before from a REST-Service in the Controller. So now the Problem is, that the directive only gets 3 of them with its value and the others as null. I've tried observing the Attributes with $observe but that didn't work. So now I am at my wit's end and hope somebody has THE ANSWER :D Many thanks in advance! DIRECTIVE (simplyfied) myAppDirectives.directive('myDirective',['aService', function(aService) { return { restrict : 'E', scope : { a: '@', b: '@', c: '@', d: '@', e: '@', f: '@' }, link : function postLink(scope, element, attrs) { console.log(attrs.a); console.log(attrs.b); console.log(attrs.c); console.log(attrs.d); console.log(attrs.e); console.log(attrs.f); attrs.$observe('a', function(value) { console.log('a has changed value to ' + value); }); attrs.$observe('b', function(value) { console.log('b has changed value to ' + value); }); attrs.$observe('c', function(value) { console.log('c has changed value to ' + value); }); attrs.$observe('d', function(value) { console.log('d has changed value to ' + value); }); attrs.$observe('e', function(value) { console.log('e has changed value to ' + value); }); attrs.$observe('f', function(value) { console.log('f has changed value to ' + value); }); } }]); HTML-SNIPPET &lt;my-Directive a="{{a}}" b="{{b}}" c="{{c}}" d="{{d}}" e="{{e}}" f="{{f}}"&gt; &lt;/my-Directive&gt; CONTROLLER-SNIPPET (simplyfied the $http-Call) $scope.a= 200; $scope.b= 250; $scope.c= -1; $scope.d= 'Doret'; $scope.e= 100; $scope.f= [{"a":"Lorem","b":1},{"a":"Ipsum","b":2}];
downvote count: 0
answer count: 1
tagged with: attributes
favorite count: 0
has answer: http://stackoverflow.com/a/25280730
tagged with: angularjs
upvote count: 1

http://stackoverflow.com/a/25319250
has body: This is one way you could solve your problem of re-binding the click handler to all elements. You can create the DOM element using $(' '), add the click handler to only that element, using $(' ').click(...), and then append it to the body with $(' ').click(...).appendTo("body"). Example: (function ($) { $.fn.addDiv = function () { $(' ').click(function () { $('body').addDiv(); }).appendTo("body"); return this; }; }(jQuery)); Usually Event Delegation would be used to handle events on future elements. Example: (function ($) { $.fn.addDiv = function () { this.append(' '); return this; }; }(jQuery)); $(document).on("click", "div", function(){ $('body').addDiv(); });
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25319155
upvote count: 2
answers question: http://stackoverflow.com/q/25319155

http://stackoverflow.com/comment/39397914
comment on: http://stackoverflow.com/q/25281830
score: 0
type: Comment
type: QuestionComment
has text: lol that worked, I'm annoyed it was so easy! Thanks a lot, if you write it as an answer I'll accept and +1. Cheers :)

http://stackoverflow.com/comment/39407336
has text: This is little more than a curiosity, but: the spec does not disallow non-function *host objects* from implementing an internal `Construct` property, though I don't know of any actual host environment that supplies non-function constructors.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25287062

http://stackoverflow.com/comment/39417411
score: 0
has text: But there is no parent in this case, only siblings.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25292390

http://stackoverflow.com/q/25279625
favorite count: 0
type: UnansweredQuestion
has title: How can I fix this issue with edge values in Conway's Game of Life?
has answer: http://stackoverflow.com/a/25279874
tagged with: conways-game-of-life
score: 1
upvote count: 1
type: Question
tagged with: javascript
has body: I am trying to build Conway's Game of Life in JavaScript. The problem I am having is with edge values and undefined variables. I have several variables assigned to the squares surrounding a given square, which inevitably leads to some variables being undefined if the square is at the edge. In the JavaScript console, it says that on line 93, it cannot read property 'style' of null. I tried to fix this issue thusly: if (typeof s1n1 === null) { count += 0; } else if (s1n1.style.backgroundColor === 'rgb(0, 0, 0)') { count += 1; } Basically what I am trying to do is if a variable is undefined, it skips over it and adds nothing to the count variable, and goes to the next variable. However, the way it is coded now is not working. link: http://jsfiddle.net/stalin666/mp8kx889/
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39393662

http://stackoverflow.com/q/25304688
type: AnsweredQuestion
has title: Specification mandate value for attribute required
has answer: http://stackoverflow.com/a/25304871
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25304871
answer count: 1
downvote count: 0
has body: I was working with Django/Dojo project. As suddenly I cannot modify HTML file. When I trie to edit it, my browser shows this message: This page contains the following errors: error on line 11 at column 79: Specification mandate value for attribute required Below is a rendering of the page up to the first error. The line that causing the problem is: &lt;input data-dojo-type="dijit/form/ValidationTextBox"&gt; I don't understand what is causing this. Is this Dojo problem, or Dreamweaver's or Google Chrome's?
favorite count: 0
score: 6
tagged with: django
upvote count: 6
tagged with: dojo

http://stackoverflow.com/a/25373732
has comment: http://stackoverflow.com/comment/39600304
type: AcceptedAnswer
score: 4
has body: There are several ways to do this. But from what you already have the simplest is to use innerHTML: queryContact.find({ success: function(results4) { var html = ""; alert("Successfully retrieved " + results4.length + " entries."); // Do something with the returned Parse.Object values html += ' '; for (var i = 0; i < results4.length; i++) { var object4 = results4[i]; contactNameArray[i] = object4.get('ContactName'); contactNumberArray[i] = object4.get('ContactNumber'); html += " Number " + i + " is: "; html += " " + contactNameArray[i] + " "; } html += ' '; document.body.innerHTML += html; }, error: function(error) { alert("Error: " + error.code + " " + error.message); } }); As for centering the table on the page the best way is to use CSS. Unfortunately centering anything in CSS is a bit of a hack. There are several ways to do it. See the answers to this question for all the ways of doing it: How to horizontally center a in another ?. Note: scroll through the answers, not just read the top one. There really are a lot of ways to do this and some may not work for you. A few notes about innerHTML: Although innerHTML looks like a variable it actually behaves more like a function. Specifically it invokes the HTML compiler of the browser. So if you pass it incomplete tags like: someDiv.innerHTML += ' '; it will see that as an incomplete 'table' tag and deals with it the way the browser usually does when it sees an incomplete 'table' tag. For some browsers that means removing the table from the DOM. For others that means immediately inserting a closing tag to make it valid. What this means is that when you later append the closing tag like this: someDiv.innerHTML += ' '; what happens is that the browser will think you did this: ^ ^ | |_________ what you're trying to insert | auto inserted by the browser earlier and deal with it the way browsers usually do - consider that tag invalid and discard it. So you need to pass innerHTML well-formed html which is why I created the t…
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39607077
accepted answer of: http://stackoverflow.com/q/25373281
answers question: http://stackoverflow.com/q/25373281
upvote count: 4

http://stackoverflow.com/comment/39571054
type: QuestionComment
has text: Can you give me the simple example for this? Mention this in answer.
comment on: http://stackoverflow.com/q/25347441
score: 0
type: Comment

http://stackoverflow.com/comment/39565214
has text: If you use regular parentheses `()` inside regex, you not only group matches but "remember" them for later if you are using `replace()`. The syntax `$n` calls up one of the backreferences where `n` is a 1-based index in the order of capturing groups as specified by `()`. So, in this case, `$1` refers to the "junk at the beginning" group, `(.*?)`. Note however non-capturing groups (`(?:)`) do not create backreferences.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25335195
type: Comment

http://stackoverflow.com/comment/39352862
comment on: http://stackoverflow.com/q/25245994
score: 0
type: Comment
type: QuestionComment
has text: Because I am writting acceptance test in JS and I would like to have generic method to finding messages.

adaptive-design
type: Tag
tags question: http://stackoverflow.com/q/25254219
tag name: adaptive-design

http://stackoverflow.com/comment/39509932
score: 1
type: Comment
type: QuestionComment
has text: Add minimal relevant code to the question. Links-only code is not permitted on Stack Overflow.
comment on: http://stackoverflow.com/q/25338159

http://stackoverflow.com/a/25308542
type: Answer
has body: Since Legacy support was required and I had trouble even with the use of a table, I improvised a non-CSS only solution. Clicking on the buttons 1-4 gives me the divisor (nDays) and I used it to divide the width of the container, which gave me the correct width for each div which houses the forecast day div. dayWidth = parseInt(420/nDays); $('#i'+i).css('width',dayWidth); $('#i'+i).css('display','inline-block'); Works great, without all the convolutions of trying to make CSS do it automatically. And here is the result.
answers question: http://stackoverflow.com/q/25291963
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39490059
has comment: http://stackoverflow.com/comment/39448044
upvote count: 1

http://stackoverflow.com/comment/39316858
type: QuestionComment
has text: @NavinRauniyar: On browsers that support it.
comment on: http://stackoverflow.com/q/25238153
score: 0
type: Comment

http://stackoverflow.com/q/25372635
downvote count: 0
has body: Lets say I wanted to change all instances of United States or US into U.S. is there a more elegant way to do that than running several replaces: function replaceUS() { newString = oldString.replace("United States", "U.S."); newerString = newString.replace("US", "U.S."); } I know that if I needed to check against a huge list utilizing a loop would be helpful, but is there a more elegant solution if I only have a few options to check for. I know the following doesn't work, but if it did, it would be what I am trying to describe. Is there anything analogous? function replaceUS() { newString = oldString.replace("United States" || "US", "U.S."); }
type: Question
has comment: http://stackoverflow.com/comment/39565994
tagged with: javascript
upvote count: 2
tagged with: replace
duplicate of: http://stackoverflow.com/q/16576983
has comment: http://stackoverflow.com/comment/39567791
answer count: 2
favorite count: 0
has answer: http://stackoverflow.com/a/25372900
accepted answer: http://stackoverflow.com/a/25372900
has title: Easiest way to replace one or another string with a value
possible better answer: http://stackoverflow.com/a/25372682
has answer: http://stackoverflow.com/a/25372682
linked to: http://stackoverflow.com/q/16576983
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/39567758

http://stackoverflow.com/comment/39395607
has text: priyan99 Found the solution. I need the solution like this. http://jsfiddle.net/LCB5W/37/. Thanks for your efforts, Bro.
score: 1
comment on: http://stackoverflow.com/a/25280557
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25367987
score: 6
tagged with: coffeescript
type: Question
has comment: http://stackoverflow.com/comment/39556901
tagged with: javascript
has comment: http://stackoverflow.com/comment/39563837
has body: Hi I have an area chart with several X (year) &amp; Y (price) values. As I've found there is easy way to get X, Y coodinates value for chart when user clicks on one of the point on line however clicking outside line i.e. SVG/Chart-Body area can provide only X, Y which are coordinates of planes rather than data. Point on Chart: circles = c.svg().selectAll 'circle.dot' circles.on 'click', (d) -&gt; console.log 'POINT', 'Datum:', d O/P: POINT Datum: {x: Fri Feb 01 1980 00:00:00 GMT+0000 (GMT Standard Time), y: 666} Point outside chart: svg.on 'click', () -&gt; console.log 'SVG', d3.mouse(@) O/P: SVG [605.5, 394.5] Now is there any way I could get nearest data coordinates when clicked on SVG? e.g SVG [605.5, 394.5] would be (something like nearest [X, Y] using) {x: Fri Feb 01 1980 00:00:00 GMT+0000 (GMT Standard Time), y: 666} or some other way to translate SVG X, Y into Data X, Y? Original data is in the form of, [ {x: Fri Jan 01 1980 00:00:00 GMT+0000 (GMT Standard Time), y: 666}, {x: Fri Feb 01 1980 00:00:00 GMT+0000 (GMT Standard Time), y: 668}, {x: Fri Mar 01 1980 00:00:00 GMT+0000 (GMT Standard Time), y: 700}, {x: Fri Apr 01 1980 00:00:00 GMT+0000 (GMT Standard Time), y: 750}, . . . {x: Fri Dec 01 2010 00:00:00 GMT+0000 (GMT Standard Time), y: 2000}, . . . ]
tagged with: dc.js
has comment: http://stackoverflow.com/comment/39557044
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39561236
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39557445
has answer: http://stackoverflow.com/a/25422204
upvote count: 6
has comment: http://stackoverflow.com/comment/39562324
tagged with: http://stackoverflow.com/tag/svg
has title: D3.js get nearest X & Y coordinates for Area Chart
tagged with: d3.js

http://stackoverflow.com/comment/39307426
type: Comment
comment on: http://stackoverflow.com/a/25233233
score: 0
type: AnswerComment
has text: Wouldn't that work only if the webpage was running? I thought the question was about automatising the call.

http://stackoverflow.com/comment/39467551
score: 0
type: Comment
has text: Check out my additional edit, I added some code. I think that its better have it enabled by "default", then disable it as necessary. You could even add another listener to re-enable it.
comment on: http://stackoverflow.com/a/25318980
type: AnswerComment

http://stackoverflow.com/comment/39486482
score: 0
type: Comment
has text: it's selecting each `b` which is children of a `p`. @KevinRichards
type: AnswerComment
comment on: http://stackoverflow.com/a/25328772

http://stackoverflow.com/comment/39754751
comment on: http://stackoverflow.com/a/25381200
has text: I have added an example. There is even an design-principle that says something like "delegaton is better then inheritence". I don't always agree with that, however I think it is much better then multiple inheritence as you would have it here.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25297620
has comment: http://stackoverflow.com/comment/39427932
has body: I have an array of resources called companies, and I run some query calls on another resource based on that, and then fire a callback. I tried the following, but the callback gets called straight away: $q.all(companies.map(function(company) { return Person.query({ companyId: company.id }); })).then(function(people) { // do stuff }); http://plnkr.co/edit/OxasetGYU7xwojUNreiA?p=preview
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25297873
type: Question
accepted answer: http://stackoverflow.com/a/25297873
tagged with: javascript
score: 0
has title: AngularJS $q.all firing then straight away
answer count: 1
has comment: http://stackoverflow.com/comment/39427725
tagged with: promise
tagged with: angularjs
tagged with: angular-promise
has comment: http://stackoverflow.com/comment/39427720

http://stackoverflow.com/q/25318555
type: Question
tagged with: rotation
has answer: http://stackoverflow.com/a/67436640
linked to: http://stackoverflow.com/q/1080792
tagged with: javascript
has answer: http://stackoverflow.com/a/71182667
has title: Vertical (rotated) text in HTML table headers
tagged with: text-styling
score: 0
answer count: 3
linked to: http://stackoverflow.com/q/272799
has answer: http://stackoverflow.com/a/25319455
has body: My table headers are much wider than the data in the table, so I am trying to rotate the text in the headers to save space. I've been trying out the suggestions in this question, and I've also taken a look at this and this. However, none of the answers seem to actually work: here is my attempt in a JSFiddle. The text can rotate, but the &lt;th&gt; elements don't resize properly, which was the whole point of trying to rotate the text. Now that it's been 2-4 years since those questions have been asked, are there any new solutions to this problem?
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4264527

http://stackoverflow.com/comment/39336706
type: AnswerComment
has text: Yeah I forgot about your css file. Just do as @lkmhr mentionned above in your css and change the `#` symbol for a `.` and it should fix this issue.
type: Comment
comment on: http://stackoverflow.com/a/25247193
score: 0

http://stackoverflow.com/q/25305168
tagged with: sharepoint-2013
type: Question
tagged with: javascript
tagged with: sharepoint
score: 0
answer count: 2
tagged with: jquery
has title: How to add Jquery to MasterPage 2013
has answer: http://stackoverflow.com/a/25308555
accepted answer: http://stackoverflow.com/a/25308555
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25325755
has answer: http://stackoverflow.com/a/25325755
has body: I'm trying to add jQuery to sharepoint 2013 master page. What I did: 1) Copy jquery - "jquery-1.11.1.min.js" to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\LAYOUTS. Copy seattle.html and add &lt;!--SPM:&lt;SharePoint:ScriptLink language="javascript" name="/_layouts/jquery-1.11.1.min.js" runat="server" Localizable="false" /&gt;--&gt; Upload seattle.html as ASP NET MASTERPAGE Publish it ---> Nothing happend. To seattle.master wasn't appear Sharepoint:Scriptlink 2) Copy jquery - "jquery-1.11.1.min.js" to SiteAssets. My application is on root site collection so for instance access to jquery is http://localhost/SiteAssets/jquery-1.11.1.min.js Copy seattle.html Add !--SPM:&lt;SharePoint:ScriptLink language="javascript" name="'~sitecollection/SiteAssets/jquery-1.11.1.min.js" runat="server" Localizable="false" /&gt;--&gt; Still no effect What is the correct way from begining to the add of adding Jquery to Sharepoint 2013?

http://stackoverflow.com/comment/39364578
comment on: http://stackoverflow.com/q/25263990
score: 0
has text: *"I want to write it to that variable too."* -- As in you want to write to *both* variables? Currently you are writing to one.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25371664
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39564357
has answer: http://stackoverflow.com/a/25371741
has comment: http://stackoverflow.com/comment/39564181
answer count: 1
has comment: http://stackoverflow.com/comment/39564406
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has title: Using on('click') instead of click
has body: After it being suggested I make a more targeted question, I have this issue. Currently I have this code omShortcodes.modules.toggle = { init: function() { jQuery('.omsc-accordion .omsc-toggle').addClass('omsc-in-accordion').find('.omsc-toggle-title').click(function(){ var $toggle=jQuery(this).parent(); if($toggle.hasClass('omsc-expanded')) { $toggle.removeClass('omsc-expanded'); $toggle.find('.omsc-toggle-inner').slideUp(300); return false; } var $acc=$toggle.parents('.omsc-accordion'); if(!$acc.hasClass('omsc-multiopen')) $acc.find('.omsc-toggle.omsc-expanded').removeClass('omsc-expanded').find('.omsc-toggle-inner').slideUp(300); $toggle.find('.omsc-toggle-inner').slideDown(300,function(){ var h=jQuery(this).parent().height(); var pos=jQuery(this).parent().find('.omsc-toggle-title').offset(); var scroll=jQuery(window).scrollTop(); var wh=jQuery(window).height(); if(pos.top &lt; scroll || (pos.top &gt; scroll &amp;&amp; pos.top+h &gt; scroll+wh)) jQuery('html,body').animate({ scrollTop: pos.top+'px' }, 200); }).find('iframe[src*="maps.google"]').each(function(){ jQuery(this).attr('src',jQuery(this).attr('src')); }); $toggle.addClass('omsc-expanded'); }); jQuery('.omsc-toggle').not('.in-accordion').find('.omsc-toggle-title').click(function(){ var $toggle=jQuery(this).parent(); var $inner=$toggle.find('.omsc-toggle-inner'); if(!$inner.length) return false; if($inner.is(':animated')) return false; $toggle.toggleClass('omsc-expanded'); $inner.slideToggle(300); if($toggle.hasClass('omsc-expanded')) { $inner.find('iframe[src*="maps.google"]').each(function(){ jQuery(this).attr('src',jQuery(this).attr('src')); }); } return false; }); } } But it doesn't work with AJAX, only when the page is loaded directly. I've been advised to use on('click') instead of click. I have tried jQuery('.omsc-accordion .omsc-toggle').addClass('omsc-in-accordion').find('.omsc-toggle-title').on('click', '.omsc-accordion', function(){ jQuery('.omsc-accordion .omsc-toggle').addClass('omsc-in-accordi…
has comment: http://stackoverflow.com/comment/39564183

http://stackoverflow.com/a/25350136
has comment: http://stackoverflow.com/comment/39524369
has body: You simply included wrong ui-tree-handle Templates. Working Version: http://plnkr.co/edit/wiOWgql8jMN2NUKYmCGl?p=preview Use this: {{item.title}} Instead of this: {{item.title}} Same for your sub items.
score: -1
downvote count: 1
has comment: http://stackoverflow.com/comment/39526552
type: Answer
answers question: http://stackoverflow.com/q/25349527
upvote count: 0
has comment: http://stackoverflow.com/comment/39524440

http://stackoverflow.com/a/25297513
score: 0
has body: You could do it with an easier API and still keep both together (without having them both together) var socialMedias = (function() { var medias = { facebook: "http://facebook.com", twitter: "http://twitter.com", instagram: "http://instagram.com", dribbble: "http://dribbble.com", }; return function(socials) { if (!socials) { return medias; } var output = "&lt;ul&gt;"; var myList = document.querySelectorAll('.socialSpot'); for (var key in socials) { output += '&lt;li&gt;&lt;a href="' + this[key] + '"&gt;&lt;img src="_assets/' + key + '.png" alt="' + key + 'icon"&gt;&lt;/a&gt;&lt;/li&gt;'; } output += '&lt;/ul&gt;'; for (var i = myList.length - 1; i &gt;= 0; i--) { myList[i].innerHTML = output; }; }; })(); So socialMedias() return the map, individual entry can be fetched like socialMedias().facebook and socialMedias(myArgument) would run the method
has comment: http://stackoverflow.com/comment/39436108
type: Answer
has comment: http://stackoverflow.com/comment/39427425
answers question: http://stackoverflow.com/q/25297302

http://stackoverflow.com/q/25274339
has comment: http://stackoverflow.com/comment/39420971
has body: So i've got my defaults of 1Mb chunks to upload, and 5 simultaneous chunks at once, but after those chunks have completed my client side doesn't send the remaining chunks. Hence the max out at 5Mb, does any one know why? I've not changed any other default settings, testChunks are enabled. My node side post is modelled upon cleversprocket 's answer here : reassemble binary after flow.js upload on node/express server My get side is based upon: //'found', filename, original_filename, identifier //'not_found', null, null, null $.get = function(req, callback) { var chunkNumber = req.param('flowChunkNumber', 0); var chunkSize = req.param('flowChunkSize', 0); var totalSize = req.param('flowTotalSize', 0); var identifier = req.param('flowIdentifier', ""); var filename = req.param('flowFilename', ""); if (validateRequest(chunkNumber, chunkSize, totalSize, identifier, filename) == 'valid') { var chunkFilename = getChunkFilename(chunkNumber, identifier); fs.exists(chunkFilename, function(exists) { if (exists) { callback('found', chunkFilename, filename, identifier); } else { callback('not_found', null, null, null); } }); } else { callback('not_found', null, null, null); } }; I don't understand why it's not firing again, the processes go: Try and GET file chunk, no chunk, reply 404, POST CHUNK, POST PARTLY_DONE. (x5 for each simultaneous upload). Then it doesn't upload anymore chunks, it just stops in some part (numerous console.logs haven't cleared up the issue). I've removed 404 from permanent errors so that the application shouldn't stop, yet it still does. Any help would be great as files are likely to be larger than 5Mb at times. Thanks, Joe EDIT (FULL POST CODE): Client side settings (only change default settings from mg-flow): chunkSize: 1024 * 1024, forceChunkSize: false, simultaneousUploads: 5, singleFile: false, fileParameterName: 'file', progressCallbacksInterval: 0, //instant feedback speedSmoothingFactor: 1, query: {}, headers: {}, withCredentials: false, preproces…
has title: Flow.js ( in Angular.js) uploads to node.js failing if greater than 5MB
answer count: 1
downvote count: 0
tagged with: file-upload
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
tagged with: xmlhttprequest
tagged with: node.js
score: 1
linked to: http://stackoverflow.com/q/23449065
upvote count: 1
has answer: http://stackoverflow.com/a/25328983
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39369092
has text: What's the difference in effectiveness?
comment on: http://stackoverflow.com/a/25266218
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39375820
has text: css's background-size can make an image stretch to fit an element.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25269852

http://stackoverflow.com/q/25265425
tagged with: javascript
tagged with: jquery
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/25269804
favorite count: 0
has title: Cannot properly refresh Bootstrap scrollspy spying on element
tagged with: twitter-bootstrap
upvote count: 7
has body: I've been referencing this post regarding Bootstrap's scrollspy component. In my code, I instantiate a new scrollspy to spy on the body element using: $("body").scrollspy({ offset: 25 }); Later on in my code, I make an AJAX call and add/remove elements from the page. This causes the scrollspy to be misaligned, so I need to refresh the scrollspy. I have tried performing this refresh operation many ways, such as: $("body").scrollspy("refresh"); and $('[data-spy="scroll"]').each(function () { $(this).scrollspy('refresh'); }); However, neither of these code snippets bring about any change in the behavior of the scrollspy. I believe this is because the scrollspy is spying directly on the body element, but I am unsure of how to have the scrollspy refresh following my AJAX calls. Does anyone know how I might refresh my scrollspy?
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/13134013
score: 7
accepted answer: http://stackoverflow.com/a/25269804
type: Question
answer count: 1

http://stackoverflow.com/q/25279974
upvote count: 3
has body: This is my Javascript code Html5Template_300x250 = function(config) { this.config = config; var self = this; this.init(); Html5Template_300x250.prototype = { // Function That Creates Element Var d: function(id) { return document.getElementById(id); }, // Initialize DCO HTML5 template init: function() { alert("test1"); this.startAd(); }, startAd: function() { alert("test2"); } }; } From the HTML file i am creating method like this var sr_Config = { bgColor:'#fff', ctaText:'Learn More', border: 'true' }; var Html5Template = new Html5Template_300x250(sr_Config); But i am getting Error TypeError: this.init is not a function this.init(); I am not sure what is wrong here i have also tried self.init() but still it is not working. I am new to javascript and learning OOPS in Javascript if anyone can tell me what i am doing wrong here that would be great. Thanks in advance
type: Question
accepted answer: http://stackoverflow.com/a/25280089
tagged with: javascript
has title: Javascript TypeError: this.init is not a function Error
has comment: http://stackoverflow.com/comment/39394337
score: 3
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25280089
type: AnsweredQuestion
tagged with: oop

http://stackoverflow.com/a/25258179
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39354488
has comment: http://stackoverflow.com/comment/39354417
has comment: http://stackoverflow.com/comment/39354877
has body: The beforeShowDay is called for each day showed in the calendar... so in a month view... the method is called for each date in the month. You can just log the value of date in the callback to see how it is called jQuery(function ($) { $('#selector').datepicker({ beforeShowDay: function (date) { console.log(date); return [true]; } }); }); Demo: Fiddle
has comment: http://stackoverflow.com/comment/39354428
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39354335
accepted answer of: http://stackoverflow.com/q/25258159
type: Answer
answers question: http://stackoverflow.com/q/25258159

http://stackoverflow.com/q/25285305
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25285640
has body: I have an array. Array ( [0] =&gt; Array ( [title] =&gt; Badminton Men's Singles Gold Medal Kashyap Parupalli [mp4] =&gt; http://www.tensports.com/media/video/kashyap.mp4 [webm] =&gt; http://www.tensports.com/media/video/kashyap_VP8.webm [playThumb] =&gt; {filedir_2}Kashyap_medal.jpg [videoPoster] =&gt;{filedir_3}Kashyap_medal.jpg ) [1] =&gt; Array ( [title] =&gt; Boxing Men's Welter (69kg) Silver medal: Mandeep Jangra [mp4] =&gt; http://www.tensports.com/media/video/MandeepJangraMedal.mp4 [webm] =&gt; http://www.tensports.com/media/video/MandeepJangraMedal_VP8.webm [playThumb] =&gt; {filedir_2}Mandeep_Jangra_medal.jpg [videoPoster] =&gt;{filedir_3}Mandeep_Jangra_medal.jpg ) ) I am trying to convert it in a object like below. Javascript Format required : videos = [ { src : [ 'http://www.tensports.com/media/video/kashyap_VP8.webm', 'http://www.tensports.com/media/video/kashyap.mp4' ], poster : '{filedir_2}Kashyap_medal.jpg', title : "Badminton Men's Singles Gold Medal Kashyap Parupalli" }, { src : [ 'http://www.tensports.com/media/video/MandeepJangraMedal.mp4', 'http://www.tensports.com/media/video/MandeepJangraMedal_VP8.webm' ], poster : '{filedir_2}Mandeep_Jangra_medal.jpg', title : "Boxing Men's Welter (69kg) Silver medal: Mandeep Jangra" } ]; what I have done : var videoObject = $.parseJSON(&lt;?php echo $js_VideoURL ?&gt;);//where $js_VideoURL = json_encode($above-array); $.each(videoObject, function(key, value) { console.log('stuff : ' + key + ", " + value); }); It's giving me error.I am uncertaing about getting the data in required format.Any help?
has comment: http://stackoverflow.com/comment/39406947
tagged with: video.js
has answer: http://stackoverflow.com/a/25285407
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/39404077
has answer: http://stackoverflow.com/a/25285325
has comment: http://stackoverflow.com/comment/39403988
type: Question
has comment: http://stackoverflow.com/comment/39406859
has title: php array to javascript format?
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39464380
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25317207
has text: Does it mean anything that the second for loop occurs inside a $("#inputField").change function?

http://stackoverflow.com/q/25248862
answer count: 1
downvote count: 0
has title: What is the best way to create animations with x3Dom?
tagged with: x3dom
favorite count: 0
has comment: http://stackoverflow.com/comment/39386386
has answer: http://stackoverflow.com/a/25281151
tagged with: x3d
has comment: http://stackoverflow.com/comment/39379349
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has body: I want to build a scene that has some animations that are toggled by a checkbox. When clicked I want the height of all box elements to scale to '.1'. When clicked again I want it to return to the original height. I have experimented with Routes and TimeSensors but have found them difficult to work with. Are there any simpler options for animating in x3dom? Here is some code I have used in my template
accepted answer: http://stackoverflow.com/a/25281151
tagged with: javascript

http://stackoverflow.com/q/25365188
tagged with: javascript
tagged with: jquery
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/44768031
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I want to pass certain value obtained using featureclick option to the customized infowindow template. sublayer.on('featureClick', function(e, latlng, pos, data, layer) { var hello=data.name; alert("mouse clicked polygon with data: " + hello); }); sublayer.infowindow.set('template', $('#infowindow_template').html()); }).on('error', function() { console.log("some error occurred"); }); I want to pass the value of the variable 'hello' to the info-window template. Is it possible?
answer count: 0
has title: Is it possible to pass parameters to html template in cartodb
upvote count: 1
type: Question

http://stackoverflow.com/a/25301749
answers question: http://stackoverflow.com/q/25301636
has body: You need ensure if DOM is loaded already using $(function(){.. }); and prevent default behaviour of link using e.preventDefault() $(function(){ $("#GoButton").click(function(e) { e.preventDefault(); $("#myDiv").html("Hello World"); }); }); Demo
upvote count: 1
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39435063
type: Answer
has comment: http://stackoverflow.com/comment/39435117

http://stackoverflow.com/comment/39507871
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25340197
score: 0
has text: The easiest would be putting the `ng-form` on the div. But why exactly do you do something like this, it sound strange for me to have two `ng-model` that binding the same property and have the same name.

http://stackoverflow.com/comment/39524366
comment on: http://stackoverflow.com/q/25350415
score: 0
type: QuestionComment
type: Comment
has text: you have to call the change() function on each newly created input so that it shows the preview when it changes.

http://stackoverflow.com/comment/39467283
has text: This is what i get from `request.post.get("data")`: `{"nodes":[{"type":"node","title":"new concept","id":0,"x":658,"y":100},{"type":" node","id":2,"title":"new Node","x":334,"y":60}],"edges":[{"source":2,"target":0 }]}`. Isn't there something wrong in my ajax call?
score: 0
comment on: http://stackoverflow.com/q/25318198
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39568486
score: 0
type: Comment
type: QuestionComment
has text: That paragraph is worded terribly, I'll grant you that. Thankfully, MDN is a Wiki :)
comment on: http://stackoverflow.com/q/25373907

http://stackoverflow.com/a/25303579
score: 0
has comment: http://stackoverflow.com/comment/39438234
has body: You just need to hide the image and switch it in when it loads, behind the image you place your spinner, to do that you wrap the img in a div, in that div you define your spinner. The wrapper uses css to hide the image. Then we use the img onload event to fire a small function (see below) that fades the image in when it has loaded. Here is how you do it http://jsfiddle.net/4a1wj359/1/ // switches your image in when it loads var loaded = function(img){ img.classList.add('loaded'); }; &lt;div class="img_wrapper"&gt; &lt;img id="image1" src="http://theselby.com/media/2_28_11_SupremeCoffee7598.jpg" alt="" onload="loaded(this)"/&gt; &lt;/div&gt; See the fiddle for all the css, note i use a black box not a spinner, you add your spinner image in place of my black background. I also fade the image in after it loads slowly you can change that as you wish.
type: Answer
answers question: http://stackoverflow.com/q/25302771

http://stackoverflow.com/q/25306090
has title: Loading Indicator does not appear when the radio button is chosen and the 'add' button is clicked
type: AnsweredQuestion
has body: I am using Rails4 version. Here are the choices that I need to make: When I do my choice for the first time and click the 'Add' button, the loading indicator doesn't appear. When I do it second time and click the 'Add' button the loading indicator appears and working fine. I am not really good with javascript, so I do not really know how to trigger the loading indicator to appear at first attempt. Here is my code: My VIEW file: &lt;div id="loading-indicator" style="display:none"&gt; &lt;%=" Wait..."%&gt;&lt;%= image_tag("/images/ajax-loader-8.gif", :id =&gt; "loading-indicator") %&gt; &lt;/div&gt; My CSS file: #loading-indicator { left: 10px; top: 10px; } My 'create.js' file: $(document) .ajaxStart(function() { $('#loading-indicator').show();// show on any Ajax event. $("#notice").html("&lt;%= escape_javascript(render :partial =&gt; 'layouts/flash' , :locals =&gt; { :flash =&gt; flash }).html_safe %&gt;").hide(); }) .ajaxStop(function() { $("#notice").html("&lt;%= escape_javascript(render :partial =&gt; 'layouts/flash' , :locals =&gt; { :flash =&gt; flash }).html_safe %&gt;").show(); $('#loading-indicator').hide(); // hide it when it is done. }); $("#transaction_paypal").html("&lt;%= escape_javascript(render :partial =&gt; 'trans')%&gt;"); Thank you.
accepted answer: http://stackoverflow.com/a/25365172
type: Question
has comment: http://stackoverflow.com/comment/39551075
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39444253
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has answer: http://stackoverflow.com/a/25365172
has comment: http://stackoverflow.com/comment/39448120

http://stackoverflow.com/q/25245803
has comment: http://stackoverflow.com/comment/39332280
has answer: http://stackoverflow.com/a/25246687
type: Question
has answer: http://stackoverflow.com/a/25246972
has body: I'm working on creating a basic heatmap for a site using the following: $(document).ready(function() { $(document).on('mousedown', function(evt) { console.log('X: '+ evt.pageX); console.log('Y: '+ evt.pageY); $.post('clickmap.php', { x:evt.pageX, y:evt.pageY }); }); });' fiddle: http://jsfiddle.net/8jjo7q5y/ Works great, besides when also including click coordinates of a click over an iframe. It appears that this is possible when using CrazyEgg and I've personally tested CrazyEgg by clicking a Google Ad (housed inside an iframe) and the heatmap data returned properly to CrazyEgg. Any ideas on how to accomplish click tracking an entire page body with iframes included.
has title: Track click coordinates of a page, including iframes
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/2381336
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25246612
has comment: http://stackoverflow.com/comment/39331019
type: UnansweredQuestion
tagged with: iframe
tagged with: heatmap

http://stackoverflow.com/a/25285872
type: Answer
answers question: http://stackoverflow.com/q/25285705
score: 1
upvote count: 1
has body: You can report the issue using this instructions: https://support.google.com/chrome/answer/95315?hl=en or here: https://code.google.com/p/chromium/issues/list
downvote count: 0

http://stackoverflow.com/q/25290174
has title: jquery filter comparing dates
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25304845
tagged with: jquery-ui
tagged with: javascript
tagged with: date
has body: I'm currently trying to create a filter that will allow me to select a date using jQueryUI datepicker. This date will then be compared to the value of a hidden input. The parent div of the hidden input will then be hidden using .hide() function if the hidden date is less than the date select using the picker. &lt;div data-value="I0001-APP0277-S" class="server_wrapper" style="display: block;"&gt; &lt;div class="detail_wrapper"&gt;....&lt;/div&gt; &lt;input type="hidden" class="buildStart_hidden" value="4/25/2014 1:46:19 pm"&gt; &lt;/div&gt; &lt;input type="text" id="buildStart_filter" class="secondary_live_filter hasDatepicker"&gt; Using this code: $('#buildStart_filter').change(function(){ var date = $(this).val(); $('.buildStart_hidden').each(function(){ if(date&gt;$(this).val().split(' ')[0]){ $(this).parent().hide(); } }); }); But using this code doesn't work. I think it may be due to the comparison of string values rather than date values. What can I change to make the comparison work?
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25293808
has answer: http://stackoverflow.com/a/25293808
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25304845

message
tags question: http://stackoverflow.com/q/25269852
tag name: message
tags question: http://stackoverflow.com/q/25355255
type: Tag

http://stackoverflow.com/comment/107817725
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25305890
type: Comment
has text: this isn't just "JS"

http://stackoverflow.com/a/35955748
answers question: http://stackoverflow.com/q/25306233
upvote count: 0
score: -2
has body: Check the documentation of the new version of eventDrop, the parameters order has changed and that is why your code is not working: function( event, delta, revertFunc, jsEvent, ui, view ) { }
type: Answer
downvote count: 2

http://stackoverflow.com/q/25310871
tagged with: internet-explorer-8
tagged with: asp.net-mvc
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25311082
has comment: http://stackoverflow.com/comment/39456175
score: 0
tagged with: asp.net-mvc-5
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25311082
has body: Our current development is in VS 2008 using WebForms and JQuery. We must support IE8. For new projects I would like to start using VS 2013/MVC but I am not sure if support of IE8 will be an issue. I have used VS 2013 for short time on co-worker's PC and I noticed it includes JQuery, Bootstrap, modernizr-2.6.2.js and respond.js frameworks (of those I am only a bit familiar with JQuery) in project generated from MVC template. Note that I am fairly new to web development and JavaScript in particular. JQuery used in this project is version 1.10.2 and 1.* JQuery branch supports IE8. Bootstrap is v. 3.0.0 and IE8 support has some limitations as I found here: http://getbootstrap.com/getting-started/#support Are these a big deal/show stoppers? Are there workarounds? Information I found on modernizr is not completely clear. On one hand this page http://modernizr.com/docs/ says: "We support IE6+, Firefox 3.5+, Opera 9.6+, Safari 2+, Chrome.". On the other hand the same page says: "If you don't support IE8 and don't need to worry about FOUC, feel free to include modernizr.js whereever." As far as respond.js it seems there are some issues for which people usually find workarounds. Are there any issues inherent to latest version of MVC itself (other than JavaScript component compatibility) that make it incompatible with IE8?
has title: Looking to switch to VS 2013/MVC for web development but need to support IE8
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39457121
type: Question

http://stackoverflow.com/q/25347198
has comment: http://stackoverflow.com/comment/39521273
has comment: http://stackoverflow.com/comment/39518866
answer count: 0
has body: my file manifes.js look like this { "manifest_version": 2, "name": "Youtube test", "description": "This extension lalala", "version": "1.0", "icons": { "128" : "icon.png" }, "content_scripts": [ { "matches": ["http://youtube.com/*"], "js": ["test.js"] } ] } my test.js try to console to test it work or not &lt;script type="text/javascript"&gt;&lt;/script&gt; window.onload=function(){console.log('work test');}; &lt;/script&gt; but it does nothing when I go to youtube? What's wrong?
has comment: http://stackoverflow.com/comment/39521366
has comment: http://stackoverflow.com/comment/39521371
tagged with: google-chrome
has title: content_scripts of Chrome manifes.js doesn't work
type: Question
has comment: http://stackoverflow.com/comment/39521395
has comment: http://stackoverflow.com/comment/39521301
tagged with: javascript
score: 0
tagged with: google-chrome-extension
type: UnansweredQuestion

http://stackoverflow.com/comment/39352711
type: AnswerComment
type: Comment
has text: Ok Fine. Thank you so much. I have some doubt. Plz give me clarification. If i have 2 rows in same dates, now i deleted 1 duplicate row. counter was not updated to 1. Still showing counter is 2. what's the problem?
comment on: http://stackoverflow.com/a/25246017
score: 0

http://stackoverflow.com/comment/39356981
has text: essentially, to make it work, `index.php` *is* the loading screen, and then it loads whatever else you wanted in the background via AJAX, and displays it on success. I'd only recommend it if there is a hefty loading process.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25259617

http://stackoverflow.com/q/25314430
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25328093
has body: i am trying to call an ajax action instead of reloading the page but something doesn't seems to be working here is my index where i implement the ajax.action method @model IEnumerable<MessagingProject.Models.chating> @{ ViewBag.Title = "Index"; } Index @Ajax.ActionLink("Info", "info","Chat", new AjaxOptions { UpdateTargetId = "AliHamadi", InsertionMode = InsertionMode.Replace, HttpMethod = "get" }) @Html.ActionLink("Create New", "Create") @Html.DisplayNameFor(model => model.sending) @Html.DisplayNameFor(model => model.reciving) @foreach (var item in Model) { @Html.DisplayFor(modelItem => item.sending) @Html.DisplayFor(modelItem => item.reciving) @Html.ActionLink("Info", "info", new {ID=item.id }) | @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ }) } and here is my action info action method public PartialViewResult info() { var model = messageContext.messages.Select(r => r.name == "ali").Single(); return PartialView("info",model); } and here is my layout view where i implement my jquery scripts @ViewBag.Title @Html.ActionLink("Home", "Index", "Home") @Html.ActionLink("Chatting", "Index", "Chat") @Html.ActionLink("About", "About", "Home") @RenderBody() Copyright W3schools 2012. All Rights Reserved. @* @Content.Script("jquery-2.1.1.min.js", Url) *@ i get the whole page reloading instead of calling the info method and implement it in the index view
linked to: http://stackoverflow.com/q/7809380
upvote count: 3
type: AnsweredQuestion
score: 3
tagged with: asp.net-mvc
accepted answer: http://stackoverflow.com/a/25328093
tagged with: javascript
has comment: http://stackoverflow.com/comment/39464585
has title: ajax.actionlink(){} is reloading the page instead of calling ajax
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/39458345
downvote count: 0
tagged with: jquery

http://stackoverflow.com/a/25300860
type: Answer
accepted answer of: http://stackoverflow.com/q/25300757
has body: You need to use .prop() instead of .attr() also, use .closest() to find the closest ancestor element matching the selector. jQuery(function ($) { //clicking the parent checkbox should check or uncheck all child checkboxes $(".parentCheckBox").click(function () { $(this).closest('fieldset').find('.childCheckBox').prop('checked', this.checked); }); //clicking the last unchecked or checked checkbox should check or uncheck the parent checkbox $('.childCheckBox').click(function () { var $fs = $(this).closest('fieldset'); $fs.find('.parentCheckBox').prop('checked', !$fs.find('.childCheckBox').is(':not(:checked)')) }); }); Demo: Fiddle
answers question: http://stackoverflow.com/q/25300757
score: 2
downvote count: 0
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/39427596
has text: http://tablefilter.free.fr/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25297460

http://stackoverflow.com/q/25369145
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/39559059
type: Question
downvote count: 0
has comment: http://stackoverflow.com/comment/39559118
tagged with: javascript
tagged with: jquery
has body: I've started to accumulate quite a few lines of Javascript code for a website. Everything has been in one file so far and that file is becoming impossible to maintain. If there is an error in one line, the entire file breaks. I've tried splitting the code up into multiple files but there are some shared methods across objects like: validateEmail(address). Right now, I have my code organized into objects, like so: var ProductPage = { addToCartBtn: "#add-to-cart", init: function() { ProductPage.initAddToCartPopup(); ProductPage.initSidebar(); ... }, ... }; Then, I call ProductPage.init() on $(document).ready. My issue is: when splitting ProductPage into a separate file as ContactPage, for example I cannot access ContactPage.validateEmail(). I believe this is because my code is wrapped in jQuery's: (function ($) { ... })(jQuery); Does anyone have insight on how they have organized large systems of Javascript? Also, I plan on doing optimization with putting all of this into one file and compressing it. So, any method which will benefit both maintainability and ease of optimization would be awesome.
has comment: http://stackoverflow.com/comment/39559370
has title: Organizing large javascript files
answer count: 1
has comment: http://stackoverflow.com/comment/39559451
has answer: http://stackoverflow.com/a/25369241
favorite count: 0
has comment: http://stackoverflow.com/comment/39559043
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39559503
has comment: http://stackoverflow.com/comment/39602535
has comment: http://stackoverflow.com/comment/39559557

http://stackoverflow.com/q/25357957
has body: If a web page contains multiple iframes, and each of them contains an angular app (all of the same version): Is there a way to make Angular be loaded just once, and be reused by all of the apps in each iframe? i.e. share window.angular What implications are there, if the main page itself is an angular app? What complications can occur when these iframes being served from a different domain than the main page?
favorite count: 0
has title: AngularJs within multiple iframes on the same page
answer count: 0
type: UnansweredQuestion
tagged with: iframe
upvote count: 1
score: 1
type: Question
downvote count: 0
tagged with: javascript
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html